[Samba] File Locking, Access - Inconsistencies
Ravi Channavajhala
ravi.channavajhala at dciera.com
Wed Aug 12 12:12:09 MDT 2009
On Wed, Aug 12, 2009 at 11:01 AM, Ravi
Channavajhala<ravi.channavajhala at dciera.com> wrote:
> On Wed, Aug 12, 2009 at 9:53 AM, Jeremy Allison<jra at samba.org> wrote:
>> On Wed, Aug 12, 2009 at 08:51:51AM +0530, ravi channavajhala wrote:
>>> Hi Jeremy,
>>>
>>> Why would the file name be an issue here? It is not just one file, several
>>> files are getting affected. I followed your earlier discussion on the issue
>>> way back in 2002, can you suggest something to try. Really, I will take
>>> whatever I can get.
>>
>> Firstly, let's keep the list CC:ed so we keep
>> everyone up to date. I'm asking what file name
>> the fcntl is blocked in, as I want to know if
>> this is a Samba tdb, or a file the server is
>> trying to access. The Samba server should never
>> make a blocking fcntl lock call on a user data
>> file, but will make such calls on tdb files.
>>
>> So please let me know what file the fcntl syscall
>> is blocked in. Thanks,
>>
>> Jeremy.
>
> Sorry I must have not used reply to all. Anyway, here is how I
> trussed. I had the user open a file, and then capture the system
> calls made with truss. The fcntl appears blocking on a user file,
> but I might be incorrect because I didnt really see which file the
> file descriptor belonged to (the very first two lines of truss show
> fcntl, no other information). Either way, if this is blocking on tbd
> file what possible recourse I can apply? Thanks for your help.
FWIW, this is what I see on Solaris 10 (Sun's stock Samba bundled with OS)
# pstack 1968
1968: /usr/sfw/sbin/smbd -D
ff049c64 fcntl (a, 23, ffbff750)
ff0398c0 fcntl (a, 23, ffbff750, a, fee02a00, ff0c72b4) + 18
00272ec0 tdb_brlock (448180, 22dc, 2, 23, 0, 1) + 90
002731dc tdb_lock (448180, 88d, 2, 20, 18ec34, 401c98) + 17c
001ff048 ???????? (fffa7038, 43d960, 1d3d8, 453660, 9ea5, 453670)
001f8538 is_locked (43d960, feff, 0, 1000, 0, 0) + 1e8
000926a4 reply_read_and_X (495ca8, 4751f0, 3f, 43d960, 20000, 0) + 2ec
000d4c64 ???????? (495ca8, 454da0, 4751f0, 3f, 20000, 0)
000d4db8 ???????? (9400, 4751f0, 3f, 20000, 9400, 32cf4c)
000d5060 ???????? (454da0, 4751f0, 0, 1, 401c98, 6c00)
000d634c smbd_process (fff58830, 6c7c, 401c98, 93a80, 20441, 17d) + 1e4
0032f028 main (0, 392800, 1, 40aacc, 40ca28, 0) + afc
0004dda8 _start (0, 0, 0, 0, 0, 0) + 108
# truss -v all -aef -p 1968
1968: *** SUID: ruid/euid/suid = 0 / 2110 / 2110 ***
1968: *** SGID: rgid/egid/sgid = 0 / 2110 / 2110 ***
1968: psargs: /usr/sfw/sbin/smbd -D
1968: fcntl(10, F_SETLKW64, 0xFFBFF750) (sleeping...)
1968: typ=F_WRLCK whence=SEEK_SET start=8924 len=1 sys=3 pid=0
Now on Solaris 9 (Compiled with gcc)
#truss -aef -v all -p 3623
3623: *** SUID: ruid/euid/suid = 0 / 1598 / 1598 ***
3623: *** SGID: rgid/egid/sgid = 0 / 1598 / 1598 ***
3623: psargs: /usr/local/samba/sbin/smbd -D -d 3 -s
/usr/local/samba/etc/smb.conf
3623: fcntl(25, F_GETLK64, 0xFFBFF100) (sleeping...)
3623: typ=F_RDLCK whence=SEEK_SET start=0 len=512 sys=0 pid=0
#pstack 3623
3623: /usr/local/samba/sbin/smbd -D -d 3 -s /usr/local/samba/etc/smb.conf
00000000 fcntl (19, 21, ffbff100)
#pflags 3623
3623: /usr/local/samba/sbin/smbd -D -d 3 -s /usr/local/samba/etc/smb.conf
data model = _ILP32 flags = PR_ORPHAN
/1: flags = PR_PCINVAL|PR_ASLEEP [ fcntl(0x19,0x21,0xffbff100) ]
sigmask = 0x00011080,0x00000000
--
Ravi Channavajhala
http://www.dciera.com
More information about the samba
mailing list