[Samba] Re: Different behaviour of samba share in XP and Windows
kiran.vm at gmail.com
Sat Mar 26 05:36:13 GMT 2005
On Thu, 24 Mar 2005 11:01:02 -0800, Jeremy Allison <jra at samba.org> wrote:
> On Thu, Mar 24, 2005 at 11:11:44PM +0530, Kiran VM wrote:
> > Hello Jerry,
> > No CloseHandle() call is made in both the case. CFile (or for that
> > reason CStdioFile) Close() method will close the OS file handle.
> > (closehandle() in the sample code is commented given can be ignored)
> > Just to make it a bit more clearer, the executable (for testing i just
> > put the sample code above inside a for loop of 1000) is run from a
> > win2k3 server and xp machine. XP shows no handle increase leak (handle
> > count of 85), but in Win2k3 the handle count was around 1085 ( for
> > 1000 iterations). This information i got from the windows task
> > manager. Upon this, i tried the procexp tool from sysinternals. This
> > clearly showed that the Handle being leaked is a file handle,
> > \\TestServer\TestShare in our case. (This is not the file as such but
> > the directory).
> > BTW, my samba server is on Solaris 9.
> > Please let me know if you erquire any further information...
> Can you send me the binary (.exe) of this program. Also, the
> information on how to report any handle leaks on the Windows
> side. Given that info I can try to track this one on my own.
Hello Jeremy, Hello Jerry,
I have attached a test exe (tester.exe) which will reproduce the
problem. ( rename the tester.exe1 to tester.exe inside the zip file tester.zip1)
Just run tester with the remote file name (from the samba share) as
the parameter. (eg. Tester.exe \\TestServer\TestShare\tempfile.txt).
The program will open the given file 1000 times in a loop. The source
code for this is also attached if you want to make any change. If you
run this on a Win2K3 server, the handle count increases to >1000 and
on an XP client it is around 10.
You can see the handle count in the taskmanager itself. In the process
tab of task manager, select the option view->select columns. here
check the Handle count check box. Now just monitor the tester.exe
process (when it is runnning) in the task manager, you can see the
Task manager does not show what kind of handles are open. For this we
use a free ware from systinternals (called procexp). This can be
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml.(i can send
it if you want.) Just run this tool and select
tester.exe when it is running. This will show all the open handles on
the bottom pane. On Win2K3 server, we can see that there are many file
handles are open to the directory in our samba share.
If you still could not reproduce this problem, please let me know.
Also, if you require more info from me, please let me know.
Thanks and best regards,
PS: Just a brief desc about by samba config.
Im running a 64 bit Samba 3.0.10( tried 3.0.13 also) on Solaris 9
with the smb conf something like this.
workgroup = NMUSOL
netbios name = TestServer
interfaces = 22.214.171.124
bind interfaces only = Yes
security = DOMAIN
password server = 126.96.36.199
log level = 2
ldap ssl = no
kernel oplocks = no
path = /export/home1/TestShare
read only = No
oplocks = no
strict locking = yes
level2 oplocks = no
More information about the samba