libsmbclient multiple processes ... very confused.

Richard Sharpe rsharpe at richardsharpe.com
Tue Jun 17 18:54:15 GMT 2003


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: 
Url : http://lists.samba.org/archive/samba-technical/attachments/20030617/b4d0e42e/tcpdump.obj


More information about the samba-technical mailing list