libsmbclient thread safe??
kgutwin at yahoo.com
Wed Aug 7 17:59:01 GMT 2002
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?
Otherwise, libsmbclient works great :)
Thanks for your help,
Do You Yahoo!?
Yahoo! Health - Feel better, live better
More information about the samba-technical