Skip to content

Commit 96b9d3a

Browse files
authored
Merge pull request ceph#56034 from tchaikov/wip-msgr-dont-panic-at-hot-unplug
msg: do not abort if driver->del_event() returns -ENOENT Reviewed-by: Radoslaw Zarzynski <[email protected]> Reviewed-by: Kefu Chai <[email protected]>
2 parents 69a634c + 543fe9f commit 96b9d3a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/msg/async/Event.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "include/compat.h"
1818
#include "common/errno.h"
19+
#include <cerrno>
1920
#include "Event.h"
2021

2122
#ifdef HAVE_DPDK
@@ -285,7 +286,10 @@ void EventCenter::delete_file_event(int fd, int mask)
285286
return ;
286287

287288
int r = driver->del_event(fd, event->mask, mask);
288-
if (r < 0) {
289+
if (r < 0 && r != -ENOENT) {
290+
// if the socket fd is closed by the underlying nic driver, the
291+
// corresponding epoll item would be removed from the interest list, that'd
292+
// lead to ENOENT when removing the fd from the list.
289293
// see create_file_event
290294
ceph_abort_msg("BUG!");
291295
}

0 commit comments

Comments
 (0)