Comment 2 for bug 711951

Revision history for this message
Stéphane Graber (stgraber) wrote :

root@ltsp-natty-i386:/home# nbd-client localhost 2000 /dev/nbd0
Negotiation: ..size = 483060KB
bs=1024, sz=483060
root@ltsp-natty-i386:/home# nbd-client localhost 2000 /dev/nbd1
Negotiation: ..size = 483060KB

So first connect works, second hangs.

root@ltsp-natty-i386:/home# ps aux | grep nbd-client
root 10936 0.0 0.0 1884 84 ? S 17:36 0:00 nbd-client localhost 2000 /dev/nbd0
root 10938 0.0 0.0 1884 648 pts/4 D+ 17:36 0:00 nbd-client localhost 2000 /dev/nbd1

stracing a third nbd-client shows that it hangs at:
ioctl(3, NBD_SET_BLKSIZE

Full strace: http://paste.ubuntu.com/561493/

I also get the following in dmesg:
[ 4891.262725] nbd: registered device at major 43
[ 4916.372069] nbd0: unknown partition table
[ 5040.140230] INFO: task nbd-client:10938 blocked for more than 120 seconds.
[ 5040.140244] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 5040.140247] nbd-client D c06068a0 0 10938 4549 0x00000004
[ 5040.140262] f6fd7e80 00000086 c100d860 c06068a0 f58068c0 c06068a0 c100daec c09108c0
[ 5040.140268] f35e5e84 00000478 c100dae8 c09108c0 c09108c0 f58068c0 c100d860 c100cbc0
[ 5040.140273] 00000000 00000000 00000000 00000086 f6fd7f04 f6fbe910 00000000 f6fd7e54
[ 5040.140279] Call Trace:
[ 5040.140357] [<c0149bf0>] ? default_wake_function+0x10/0x20
[ 5040.140372] [<c0135fe8>] ? __wake_up_common+0x48/0x70
[ 5040.140411] [<c05f6116>] __mutex_lock_slowpath+0xd6/0x140
[ 5040.140449] [<c0343af1>] ? apparmor_capable+0x21/0x70
[ 5040.140453] [<c05f5c85>] mutex_lock+0x25/0x40
[ 5040.140458] [<f8073080>] nbd_ioctl+0x50/0x190 [nbd]
[ 5040.140462] [<c05f729f>] ? _raw_spin_lock_irqsave+0x2f/0x50
[ 5040.140466] [<f8073030>] ? nbd_ioctl+0x0/0x190 [nbd]
[ 5040.140476] [<c035bf44>] blkdev_ioctl+0x244/0x820
[ 5040.140507] [<c0252fc9>] ? fsnotify+0x199/0x290
[ 5040.140539] [<c03f651d>] ? tty_ldisc_deref+0xd/0x10
[ 5040.140564] [<c024d2ff>] block_ioctl+0x3f/0x50
[ 5040.140567] [<c024d2c0>] ? block_ioctl+0x0/0x50
[ 5040.140578] [<c023037b>] do_vfs_ioctl+0x7b/0x2e0
[ 5040.140582] [<c03efcd0>] ? tty_write+0x0/0x200
[ 5040.140586] [<c0230667>] sys_ioctl+0x87/0x90
[ 5040.140589] [<c05f7524>] syscall_call+0x7/0xb