libsmbclient multiple processes ... very confused.

Akshay V Rao avrao at us.ibm.com
Tue Jun 17 20:12:37 GMT 2003


Well, I tried something else and found some interesting information. 
Instead of running on instance of the program set to fork 2 processes, I 
ran 2 instances of the program each set to fork 1 process each.  In this 
new case, everything ran perfectly fine.  I am still a bit confused but I 
think that this shows that the problem lies either in my program, or some 
how in libsmbclient.

Below is the tcpdump.cap.  I issued the command `tcpdump -i eth2 -s 1500 
-w tcpdump.cap host 10.10.10.107 -l -n -nn` that should work.

_________________________________
Akshay Rao
IBM zSeries Linux Scalability Center Coop






Richard Sharpe <rsharpe at richardsharpe.com>
06/17/2003 02:54 PM

 
        To:     Akshay V Rao/Poughkeepsie/IBM at IBMUS
        cc:     <samba-technical at lists.samba.org>
        Subject:        Re: libsmbclient multiple processes ... very confused.



On Tue, 17 Jun 2003, Akshay V Rao wrote:

> Description of what is to happen:
> My program forks into N child forked processes.  Each child forked 
process 
> calls smbc_init and smbc_opendir and then proceeds to a while loop in 
> which it issues the following calls in order: smbc_readdir, smbc_open, 
> smbc_read, smbc_close.  After the while loop, it then issues a call to 
> smbc_closedir.  The N processes are all executing simultaneously, and 
> reading data from a common share.  It is at this point where the locking 

> occurs. If I only set it to fork one process (N = 1), there is no 
locking 
> problem.  Otherwise, the locking problem exists.  Below is a tcpdump of 
2 
> processes attacking a share.

Hmmm, seems like I didn't tell you that I want a binary capture.

You can do this with 

  tcpdump -i <someint> -s 1500 -w somefile.cap

where <someint> is replaced by the interface you captured from before.

Can you try it again.

You might also view the capture in Ethereal and then you might be able to 
see what the problem is for yourself.

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com



-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcpdump.log
Type: application/octet-stream
Size: 11526 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030617/69c591ac/tcpdump.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcpdump.cap.zip
Type: application/zip
Size: 79635 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030617/69c591ac/tcpdump.cap.zip


More information about the samba-technical mailing list