Skip to contentSkip to conversation

CIFS shares keep hanging with VirtualBox

DISCUSSION Frédéric L. W. Meunier 2 participants 5 messages Apr 19, 2012 – Apr 20, 2012 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I use VirtualBox (4.1.12) on Windows 7 Ultimate SP1. The guest is Linux (kernel 3.3.2, cifs-utils 5.3), which I boot directly from a partition.

If I use CIFS to access the Windows partitions, the connections constantly hang and the applications to access it deadlock until killed.

For example:

$ cd /mnt
$ ls

It hangs (the share in question is mounted under /mnt/ntfs2).

'ps' returns "3174 pts/0 D+ 0:00 ls --color=auto" and the load average increases until I 'kill -9' the process.

The only message I get in the logs is "CIFS VFS: Server 192.168.1.64 has not responded in 300 seconds. Reconnecting..."

After that, the share only works if remounted.

I don't know what's causing it, but it works perfectly from VMware Player using the same setup, so it looks like a bug in VirtualBox, not in CIFS ?

This isn't a new issue, as I started using VMware Player in July 2011 after giving up getting CIFS to work reliably with VirtualBox.

I'm attaching a log created with 'echo 7 > /proc/fs/cifs/cifsFYI', just in case it helps, and am willing to do other things to, it not solve it, at least know what to blame. At 14:26, I killed both 'ls' processes and unmounted the partition.

#3 lore raw
In reply to a message not in the archive
Quoted 9 lines · Jeff Layton
Quoted 5 lines · On Thu, 19 Apr 2012 14:36:27 -0300 Frédéric L. W. Meunier wrote:

I use VirtualBox (4.1.12) on Windows 7 Ultimate SP1. The guest is Linux (kernel 3.3.2, cifs-utils 5.3), which I boot directly from a partition.

If I use CIFS to access the Windows partitions, the connections constantly hang and the applications to access it deadlock until killed.

Quoted 7 lines

Looks like the server just isn't responding to echo requests. Sniffing the traffic between client and server might be good to confirm that:

https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting#Wire_Captures

Are you connecting to the CIFS server in windows 7 with this? Or some other VMware SMB server thingy?

Yes. It's the same computer. I use VirtualBox in Windows 7 to boot Linux, which is installed in the same hard drive. Then, in Linux, I use CIFS to have access to the Windows 7 partitions.

I captured a log with 'tcpdump', but I don't think it's of any use. It stopped logging at 16:01 but the hang happened after that. It didn't log anything from the problematic 'ls', 'kill -9' and 'umount /mnt/ntfs2'.

#4 lore raw
Quoted 18 lines · Frédéric L. W.
Quoted 9 lines · Jeff Layton
Quoted 5 lines · On Thu, 19 Apr 2012 14:36:27 -0300 Frédéric L. W. Meunier wrote:

I use VirtualBox (4.1.12) on Windows 7 Ultimate SP1. The guest is Linux (kernel 3.3.2, cifs-utils 5.3), which I boot directly from a partition.

If I use CIFS to access the Windows partitions, the connections constantly hang and the applications to access it deadlock until killed.

Quoted 7 lines

Looks like the server just isn't responding to echo requests. Sniffing the traffic between client and server might be good to confirm that:

    https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting#Wire_Captures

Are you connecting to the CIFS server in windows 7 with this? Or some other VMware SMB server thingy?

Quoted 7 lines

Yes. It's the same computer. I use VirtualBox in Windows 7 to boot Linux, which is installed in the same hard drive. Then, in Linux, I use CIFS to have access to the Windows 7 partitions.

I captured a log with 'tcpdump', but I don't think it's of any use. It stopped logging at 16:01 but the hang happened after that. It didn't log anything from the problematic 'ls', 'kill -9' and 'umount /mnt/ntfs2'.

Maybe capture a log (with netmon on wireshark) on the windows side to see what the trace shows.

Presumably some odd networking issue with virtual box, but may be useful to see which command fails/timesout by looking at dmesg output on the client (running the test after enabling /proc/fs/cifs/cifsFYI setting it to 7 e.g.).

At least with the server returning maxmpx of 50, it is less likely to be the bug with too many outstanding requests.

Signature · 3 lines
Thanks,

Steve
#6 lore raw
In reply to a message not in the archive
Quoted 9 lines · Steve French
Quoted 4 lines · Frédéric L. W.

I captured a log with 'tcpdump', but I don't think it's of any use. It stopped logging at 16:01 but the hang happened after that. It didn't log anything from the problematic 'ls', 'kill -9' and 'umount /mnt/ntfs2'.

Maybe capture a log (with netmon on wireshark) on the windows side to see what the trace shows.

Quoted 8 lines

Presumably some odd networking issue with virtual box, but may be useful to see which command fails/timesout by looking at dmesg output on the client (running the test after enabling /proc/fs/cifs/cifsFYI setting it to 7 e.g.).

At least with the server returning maxmpx of 50, it is less likely to be the bug with too many outstanding requests.

I noticed that if I change the connection in VirtualBox from NAT to Bridged Adapter, the hangs don't occur (at least after about 2h).

Are you still interested in a log from Windows in NAT mode, where the hangs happen, or this is definitely an issue / "feature" in VirtualBox ?

What I don't know is if CIFS could do anything to exit gracefully instead of deadlocking the application trying to access the share.

#7 lore raw
Quoted 19 lines · Frédéric L. W.
Quoted 9 lines · Steve French
Quoted 4 lines · Frédéric L. W.

I captured a log with 'tcpdump', but I don't think it's of any use. It stopped logging at 16:01 but the hang happened after that. It didn't log anything from the problematic 'ls', 'kill -9' and 'umount /mnt/ntfs2'.

Maybe capture a log (with netmon on wireshark) on the windows side to see what the trace shows.

Quoted 8 lines

Presumably some odd networking issue with virtual box, but may  be useful to see which command fails/timesout by looking at dmesg output on the client (running the test after enabling /proc/fs/cifs/cifsFYI setting it to 7 e.g.).

At least with the server returning maxmpx of 50, it is less likely to be the bug with too many outstanding requests.

Quoted 8 lines

I noticed that if I change the connection in VirtualBox from NAT to Bridged Adapter, the hangs don't occur (at least after about 2h).

Are you still interested in a log from Windows in NAT mode, where the hangs happen, or this is definitely an issue / "feature" in VirtualBox ?

What I don't know is if CIFS could do anything to exit gracefully instead of deadlocking the application trying to access the share.

I would love to investigate in more detail (obviously if easy cifs changes can lessen or resolve strange networking problems, we are all for it) but I have other problems with virtualbox setup at the moment that make it hard for me to see whether I run into the same issue.

Signature · 3 lines
Thanks,

Steve