Opened 9 years ago

Last modified 3 years ago

#7501 assigned bug

mount_nfs hangs when mounting a share on a VBox host from a Haiku guest

Reported by: scgtrp Owned by: nobody
Priority: normal Milestone: R1
Component: Network & Internet/Stack Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


I attempted to create a NFS share on my VirtualBox host system and mount it from the guest as a temporary replacement for proper shared folders; mount_nfs completely hangs and is unkillable except by rebooting when I try to mount it.

The server is Debian's nfs-kernel-server, version 1:1.2.3-2. I am attaching the relevant part of the system logs as captured from the serial port.

Attachments (1)

nfs.log (9.9 KB ) - added by scgtrp 9 years ago.
Relevant portions of serial logs + backtraces of mount_nfs's threads

Download all attachments as: .zip

Change History (4)

by scgtrp, 9 years ago

Attachment: nfs.log added

Relevant portions of serial logs + backtraces of mount_nfs's threads

comment:1 by anevilyak, 9 years ago

It looks like this may be a problem in the UDP module. NFS is closing the post office socket and then waiting for the post office worker thread to exit. However, the post office worker thread is trapped in recvfrom() on the aforementioned socket and never returns. I would expect close() to cause that recvfrom to return with an error, but it apparently doesn't.

comment:2 by axeld, 9 years ago

This is indeed how Haiku should behave in this case, although it's worth mentioning that this is not defined by the POSIX standard, and other platforms may behave differently. Linux, for example, would definitely let the recvfrom() hang as well.

So in any case, you should not rely on this technique when writing portable code.

comment:3 by axeld, 3 years ago

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.