Bug #17195
closedThere seems to be a thread waiting indefinitely in krbd.cc
0%
Description
We recently encountered this issue where rbd map hangs. From the thread trace we identified this piece of code:
if (poll(fds, 1, -1) < 0)
return -errno;
in krbd.cc does not have a timeout associated with it. It might be nicer to have some timeout even if it is 2-3 minutes otherwise the call hangs forever.
if (poll(fds, 1, 120000) < 0)
return -errno;
Updated by Jason Dillaman over 7 years ago
- Project changed from Ceph to rbd
- Priority changed from Normal to Low
Updated by Jason Dillaman almost 7 years ago
- Status changed from New to Resolved
Updated by Yang Dongsheng about 5 years ago
Abhi N wrote:
We recently encountered this issue where rbd map hangs. From the thread trace we identified this piece of code:
if (poll(fds, 1, -1) < 0)
return -errno;in krbd.cc does not have a timeout associated with it. It might be nicer to have some timeout even if it is 2-3 minutes otherwise the call hangs forever.
if (poll(fds, 1, 120000) < 0)
return -errno;
https://github.com/ceph/ceph/pull/14051
This PR tried to fix this bug, but I found it doesn't work well. Because poll return 0 in timeout, rather than negative value.
I send a new PR to fix it: