Deadlock with libsmbclient functions and Multiple forked
abartlet at samba.org
Fri Jun 13 00:14:12 GMT 2003
On Fri, 2003-06-13 at 06:08, Akshay V Rao wrote:
> I am currently developing a program that forks N Processes. Each child
> forked process, executes a while loop in which the following function calls
> are issued in the following order: smbc_open(), smbc_read(), smbc_close().
> It appears that these functions are responsible for creating deadlocks when
> there exist more than one child forked process (N > 1). If I comment out
> the function calls and run the program with multiple processes, the
> deadlock is gone and the program runs normally. If I then uncomment the
> function calls and run the program with only one process, the deadlock is
> gone as well. I am running Samba version 2.2.7a on RedHat 7.3 kernel
> version 2.4.7-10smp, 512 Mb RAM, Dual PIII. If anyone has any ideas, they
> would definitly be greatly appreciated.
If you are doing this on one connection to the remote server, I'm not
surprised. The libsmbclient code will still share the connection after
initialization, and you are reading/writing from a common socket!
Don't do that. We are not thread-safe either.
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20030613/b0559cee/attachment.bin
More information about the samba-technical