I activated auditd and asked it to monitor /var/lock/qemu-nbd-nbd0 and here is the result :
audit[1754]: SYSCALL arch=c000003e syscall=49 success=yes exit=0 a0=3 a1=7ffe6a0075f0 a2=6e a3=7ffe6a0075e0 items=2 ppid=1752 pid=1754 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=qemu-nbd exe=/usr/bin/qemu-nbd key=(null)
audit: SOCKADDR saddr=01002F7661722F6C6F636B2F71656D752D6E62642D6E62643000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
audit: CWD cwd=/
audit: PATH item=0 name=/var/lock/ inode=570 dev=00:16 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=PARENT cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
audit: PATH item=1 name=/var/lock/qemu-nbd-nbd0 inode=1371 dev=00:16 mode=0140755 ouid=0 ogid=0 rdev=00:00 nametype=CREATE cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
audit: PROCTITLE proctitle=71656D752D6E6264002D72002D73002D6600726177002D63002F6465762F6E626430002F6465762F736462
kernel: block nbd0: shutting down sockets
the socket is well created and left in place while the qemu-nbd process gets killed.
nothing else appears about nbd after the kernel message.
regards, lascaP.