Re: SMB module and do_get_file_info



Nate Nielsen said:
> Philippe Normand wrote:
>> I'm now playing with the Python gnomevfs package. But having issues
>> with gnomevfs.exists, see the attached code. When looking up for a SMB
>> uri pointing to a dead machine, the whole python process is locked and
>> i don't understand why.
>>
>> So I came up to wonder why the do_get_file_info() function takes so
>> much time to resolve SMB uris which don't exist.
>>
>> Tracing my code, it seems to block on the LOCK_SMB() in
>> do_get_file_info() function, but i really can't figure out why it
>> locks my everything. In the gnome-python binding, the GIL seems to be
>> well used.
>
> libsmbclient is not thread safe, and only allows one request to be
> active at a time. So each request has to be serialized, and that's what
> LOCK_SMB() does. What's likely is that another previous request is in
> running in libsmbclient at that point in time.
>

on my test code i rely on SMB gnomevfs module only once, for that
problematic call to gnomevfs.exists()

> That said, it may also be a bug. I'd suggest editing
> modules/smb-method.c and remove the '#if 0' around the DEBUG_SMB_ENABLE
> and DEBUG_SMB_LOCKS defines, and recompile. You should then get copious
> output that'll help one trace the various requests through the module.
>

I enabled debug output, recompiled and re-installed, re-launched GNOME
desktop, checked that my libsmb.so was used by gnome-vfs (using lsof), but
i can't see any debug infos printed out either on my terminal or on the
tty console from which i started X.

This is very weird :'-(

Philippe





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]