On 7/20/20 4:00 AM, Vladimir Sementsov-Ogievskiy wrote:
On shutdown nbd driver may be in a connecting state. We should shutdown
it as well, otherwise we may hang in
nbd_teardown_connection, waiting for conneciton_co to finish in
BDRV_POLL_WHILE(bs, s->connection_co) loop if remote server is down.

How to reproduce the dead lock:


Same reproducer as in the previous patch (again, where a temporary sleep or well-placed gdb breakpoint may be more reliable than running two process loops).



Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
  block/nbd.c | 14 ++++++++++----
  1 file changed, 10 insertions(+), 4 deletions(-)


Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to