Re: [Samba] File Locking, Access - Inconsistencies
On Wed, Aug 12, 2009 at 11:01 AM, Ravi Channavajhalaravi.channavajh...@dciera.com wrote: On Wed, Aug 12, 2009 at 9:53 AM, Jeremy Allisonj...@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, 2, 0) + 2ec 000d4c64 (495ca8, 454da0, 4751f0, 3f, 2, 0) 000d4db8 (9400, 4751f0, 3f, 2, 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 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,0x -- Ravi Channavajhala http://www.dciera.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] File Locking, Access - Inconsistencies
Lately I'm seeing bizarre problems with the SAMBA server I'm using in production. For no rhyme or reason the connections get dropped, the same set of users who previously were able to access the shares, now get permission denied. Users (not all but some) are having trouble opening the folders, files and so on. This was not the case few days ago, it started happening lately with amazing inconsistency. Inconsistent in it works some times, it simply doesn't sometimes. I have two samba servers in the setup one on Solaris-10 and the other on Solaris-9. On Solaris 10 I'm using stock SUN Samba packages. It would be real easy, if I could isolate the problem by limiting it to one, but it occurs on both the servers. The samba versions are different on both servers. Before any can suggest, I did shutdown one server and pointed all the users to remaining one. No luck. Shut down the other server, re-pointed the users, no luck. I'm going nuts trying to isolate the problem, if only it wasn't happening with such astonishing inconsistency. Trussing the smbd shows the user access is stuck in fcntl system calls like this, and these users do have all the proper permissions for messing with these files Fcntl(10, F_SETLKW64, 0xFFBFF750) . (sleeping) Fcntl (27,F_GETLKW64,0xFFBFF840)..(sleeping) They never get out of this. Tried the usual options of oplocks = no kernel oplocks = no and even faking oplocks in the smb.conf, I can't get out of this. Anyone can suggest something I can muck with? I know earlier Solaris versions had a kernel bug with fcntl and it was patched. So, what else could be the issue here? Thanks. Ravi K. Channavajhala http://www.dciera.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] File Locking, Access - Inconsistencies
On Tue, Aug 11, 2009 at 11:49:09PM +0530, ravi channavajhala wrote: Lately I'm seeing bizarre problems with the SAMBA server I'm using in production. For no rhyme or reason the connections get dropped, the same set of users who previously were able to access the shares, now get permission denied. Users (not all but some) are having trouble opening the folders, files and so on. This was not the case few days ago, it started happening lately with amazing inconsistency. Inconsistent in it works some times, it simply doesn't sometimes. I have two samba servers in the setup one on Solaris-10 and the other on Solaris-9. On Solaris 10 I'm using stock SUN Samba packages. It would be real easy, if I could isolate the problem by limiting it to one, but it occurs on both the servers. The samba versions are different on both servers. Before any can suggest, I did shutdown one server and pointed all the users to remaining one. No luck. Shut down the other server, re-pointed the users, no luck. I'm going nuts trying to isolate the problem, if only it wasn't happening with such astonishing inconsistency. Trussing the smbd shows the user access is stuck in fcntl system calls like this, and these users do have all the proper permissions for messing with these files Fcntl(10, F_SETLKW64, 0xFFBFF750) . (sleeping) Fcntl (27,F_GETLKW64,0xFFBFF840)..(sleeping) They never get out of this. Tried the usual options of oplocks = no kernel oplocks = no and even faking oplocks in the smb.conf, I can't get out of this. Anyone can suggest something I can muck with? I know earlier Solaris versions had a kernel bug with fcntl and it was patched. So, what else could be the issue here? Thanks. What filename is the smbd stuck on the lock in ? Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] File Locking, Access - Inconsistencies
On Wed, Aug 12, 2009 at 9:53 AM, Jeremy Allisonj...@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. -- Ravi Channavajhala -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba