libsmbclient thread safe??
rsharpe at ns.aus.com
Wed Aug 7 18:16:02 GMT 2002
On Wed, 7 Aug 2002, Karl Gutwin wrote:
> Is libsmbclient thread safe?
> I'm developing an mp3 player application that automatically indexes and
> downloads from smb shares. I'm currently running libsmbclient from the 2.2.4
> release of samba, and experiencing intermittent segfaults especially in
> connection with simultaneous indexing in one thread (opendir, readdir, stat,
> open, read, close) and downloading (open, read, close) in another thread. I've
> traced one segfault and it seems to have crashed somewhere in talloc.c...
> #0 chunk_alloc (ar_ptr=0x4023e8a0, nb=17) at malloc.c:2883
> #1 0x4019c0ca in __libc_malloc (bytes=12) at malloc.c:2704
> #2 0x400b9b59 in talloc () from /usr/local/lib/libsmbclient.so.0
> #3 0x400d847c in lp_string () from /usr/local/lib/libsmbclient.so.0
> #4 0x400d88ba in lp_workgroup () from /usr/local/lib/libsmbclient.so.0
> #5 0x4009edbb in smbc_open () from /usr/local/lib/libsmbclient.so.0
> #6 0x804dfc1 in dl_smb_main (arg=0x80ba5e0) at dlm-smb.c:73
> #7 0x40029848 in pthread_start_thread (arg=0xbebffc00) at manager.c:274
> This specifically crashed upon starting downloading (#5, smbc_open.) I can
> spend more time debugging but I was wondering whether it was worth it at all -
> how thread-safe is this library? Do you think this is an isolated bug or is it
> only evidence of a more widespread problem?
It was never designed to be thread safe, but that would be a useful goal,
as other people have asked that same question.
It would be good if you could put some effort into debugging the problem.
I won't be able to look at this problem for some time, as I am going to
Toronto next week, and then CIFS2002 the week after ...
> Otherwise, libsmbclient works great :)
> Thanks for your help,
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org,
sharpe at ethereal.com
More information about the samba-technical