I have a Windows 2003 Server exporting a directory to a Linux client.
The Linux client is running Knoppix (see http://www.knopper.net/knoppix/ ) which
is a Linux based on Debian. The smbmount is version 3.0.0beta2-1.
When the client creates a lot of files and directories on the server share,
suddenly accessing the share is not possible any more. It's still possible to
mount or unmount the share on the client but reading a directory's content or
writing a file fails.
knoppix:/mnt # ll /mnt/test
ls: /mnt/test: Cannot allocate memory
If you now try to access the server share with smbclient (instead of smbmount)
you get the message:
OS=[Windows Server 2003 3790] Server=[Windows Server 2003 5.2]
smb: \> dir
NT_STATUS_INSUFF_SERVER_RESOURCES listing \*
It seems that the samba client has kind of "gridlocked" the server.
Windows Server eventlog shows an error with eventid 2020 stating:
"Der Server konnte keinen ausgelagerten Poolspeicher reservieren, da der Pool
leer war." (Sorry, the windows is a German version). This message suggests that
the server may have used up all memory resources (either RAM or paged memory).
The only way to regain access to the server is to reboot it. Rebooting the
client does not help.
Btw, smbmount version 2.2.2 exhibits the same behaviour.
Created attachment 317 [details]
DoS Shell script that creates and deletes directories
This is a testcase.
Instructions to DoS your Windows 2003 server.
On the Linux client:
- use smbmount to mount a Windows share.
- cp the shell script to your /tmp folder and make it executable
- cd to the mountpoint
- run the script /tmp/winblast.sh
The script will create 1000 directories and then takes turns deleting and
re-creating them. There will be no more than those 1000 directories.
After having created (and deleted) about 3.5 millions directories the server
ceases working. You won't be able to accesss directories or files on the
Created attachment 318 [details]
Image that show the memory consumption on the server
On Windows you can monitor several parameters (e.g. number of open files, used
memory) with performance monitor.
This way you can log the memory usage while the testcase (shell script) is
running on the client.
The image clearly shows that more memory is used up every second until the
point when the server ceases serving.
I also tried to create only files (instead of directories like in the testcase),
but this way the server was unaffected. It must have something to do with
Happy New Year, everybody!
I translated the bash script to a Windows batch file.
I ran it on a Windows 2000 PC which was acting as client
to the Windows 2003 Server.
Using this setup, the bug did not appear.
Seems to me it's strongly related to Samba.
Microsoft has confirmed this problem.
Thanks for the update. If a client can crash a server,
it's a server bug. :-) Marking as invalid since it will
be up to MS to fix this.
thanks for paying attention. Of course, it's not a problem of the interface but
of the implementation. OTOH using a Windows client as described in comment #4,
the Server does not crash.
Therefore, I guess a windows client's SMB idiom may differ from the one Samba
"speaks". As MS might fix this bug by simply rejecting Samba's directory
handling, there may be work to do on the Samba side as well.
Update: XP Service Pack 2 RC1 seems to fix that problem for XP.
originally reported against 3.0.0beta2. CLeaning out
non-production release versions.