Bug 878 - access to server share suddenly ceases working. smbmount makes windows server stop serving.
access to server share suddenly ceases working. smbmount makes windows server...
Status: RESOLVED INVALID
Product: Samba 3.0
Classification: Unclassified
Component: smbmount (unmaintained)
3.0.0preX
All Linux
: P3 major
: none
Assigned To: Samba Bugzilla Account
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-11 02:08 UTC by Daniel Kabs
Modified: 2005-11-14 09:31 UTC (History)
0 users

See Also:


Attachments
DoS Shell script that creates and deletes directories (761 bytes, text/plain)
2003-12-11 02:30 UTC, Daniel Kabs
no flags Details
Image that show the memory consumption on the server (11.40 KB, image/png)
2003-12-11 02:35 UTC, Daniel Kabs
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Kabs 2003-12-11 02:08:50 UTC
Hello,

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.
Example:
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.

Cheers,
Daniel Kabs
Germany
Comment 1 Daniel Kabs 2003-12-11 02:30:17 UTC
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
server.
Comment 2 Daniel Kabs 2003-12-11 02:35:15 UTC
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.
Comment 3 Daniel Kabs 2003-12-15 07:52:28 UTC
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
directory handling.

Comment 4 Daniel Kabs 2004-01-08 08:45:13 UTC
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.

Cheers
Daniel Kabs
Comment 5 Daniel Kabs 2004-03-09 02:14:43 UTC
Microsoft has confirmed this problem.

Cheers
Daniel
Comment 6 Gerald (Jerry) Carter 2004-03-09 05:41:58 UTC
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.
Comment 7 Daniel Kabs 2004-03-09 06:50:21 UTC
Hello Jerry, 

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.

Cheers,
Daniel
Comment 8 Daniel Kabs 2004-04-16 07:33:25 UTC
Update: XP Service Pack 2 RC1 seems to fix that problem for XP.
Comment 9 Gerald (Jerry) Carter 2005-02-07 08:40:47 UTC
originally reported against 3.0.0beta2.  CLeaning out 
non-production release versions.
Comment 10 Gerald (Jerry) Carter 2005-11-14 09:31:15 UTC
database cleanup