Re: [Samba] File locking in NFS on Solaris

2004-09-16 Thread Jeremy Allison
On Thu, Sep 16, 2004 at 03:12:55PM +0200, Andreas Haupt wrote:
 
 [2004/09/16 10:04:15, 1] smbd/service.c:make_connection_snum(705)
   diapp2 (134.30.6.13) connect to service dbi initially as user dbi 
 (uid=1250, gid=11211) (pid 29469)
 [2004/09/16 10:04:47, 0] smbd/oplock.c:request_oplock_break(1023)
   request_oplock_break: no response received to oplock break request to 
 pid 294 65 on port 39192 for dev = 3f42873, inode = 1171213, file_id = 
 218
 [2004/09/16 10:04:47, 0] smbd/open.c:open_mode_check(681)
   open_mode_check: exlusive oplock left by process 29465 after break ! For 
 file wwwhome/aktuell/aktuell_test.html, dev = 3f42873, inode = 1171213. 
 Deleting it to continue...

Your clients are not responding to oplock break requests. Check
the network switches/hubs between the server and the clients.

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] File locking in NFS on Solaris

2004-09-16 Thread William Jojo


H. I've been following an smbpasswd locking problem over NFS (on AIX
5.2 ML04 - Samba 3.0.7) that appears to be F_SETLKW64 related as well when
I'm trying to join a machine to a domain or when a workstations tries to
actively change it's trust after 7 days. It's intermittent and doesn't
appear related to load...the smbpasswd file attemps a lock and fails after
caught alarm (5 seconds) just like the pdb_smbpasswd.c code shows.

for example:

What I did notice is that's the only call in my truss that had that value
during pw_file_lock() all my other kfcntl calls were using F_SETLKW.

I've thought about recompiling the whole distro using -q64 on the compiler
to see if it makes a difference.

I've also seen:

kfcntl(0, F_DUPFD, 0x)  (sleeping...)

now one thing i've noticed is that I get a *LOT* of left over IPC$
connections from workstations that aren't doing anything except sitting at
the login screen of XP (and probably trying to change their password :-)

(sample smbstatus -S)

IPC$ 371196   h253466   Thu Sep 16 12:51:03 2004
IPC$ 371196   h253466   Thu Sep 16 12:51:06 2004
IPC$ 414426   h253466   Thu Sep 16 12:52:33 2004
IPC$ 414426   h253466   Thu Sep 16 12:52:37 2004
IPC$ 375182   h253466   Thu Sep 16 13:06:03 2004
IPC$ 375182   h253466   Thu Sep 16 13:06:05 2004
IPC$ 345158   h253466   Thu Sep 16 13:07:50 2004
IPC$ 345158   h253466   Thu Sep 16 13:07:53 2004
IPC$ 431008   h253466   Thu Sep 16 13:21:03 2004
IPC$ 431008   h253466   Thu Sep 16 13:21:05 2004
IPC$ 358448   h253466   Thu Sep 16 13:22:35 2004
IPC$ 358448   h253466   Thu Sep 16 13:22:38 2004
IPC$ 357180   h253466   Thu Sep 16 13:36:03 2004
IPC$ 357180   h253466   Thu Sep 16 13:36:06 2004
IPC$ 355198   h253466   Thu Sep 16 13:37:21 2004
IPC$ 355198   h253466   Thu Sep 16 13:37:23 2004
IPC$ 400586   h253466   Thu Sep 16 13:51:02 2004
IPC$ 400586   h253466   Thu Sep 16 13:51:05 2004
IPC$ 420788   h253466   Thu Sep 16 13:52:40 2004
IPC$ 420788   h253466   Thu Sep 16 13:52:44 2004
IPC$ 379934   h253486   Thu Sep 16 13:01:58 2004
IPC$ 379934   h253486   Thu Sep 16 13:02:01 2004
IPC$ 382558   h253486   Thu Sep 16 13:03:54 2004
IPC$ 382558   h253486   Thu Sep 16 13:03:57 2004
IPC$ 234724   h253607   Thu Sep 16 12:49:48 2004
IPC$ 234724   h253607   Thu Sep 16 12:49:56 2004
IPC$ 346164   h253607   Thu Sep 16 13:03:53 2004
IPC$ 346164   h253607   Thu Sep 16 13:03:56 2004
IPC$ 395482   h253607   Thu Sep 16 13:06:00 2004
IPC$ 395482   h253607   Thu Sep 16 13:06:03 2004
IPC$ 366154   h253607   Thu Sep 16 13:18:53 2004
IPC$ 366154   h253607   Thu Sep 16 13:18:56 2004
IPC$ 384448   h253607   Thu Sep 16 13:20:46 2004

which I did a kill -1 on and the (*BELOW*) snippet from log.smbd and truss
is what occuredcan't figure out why there's a F_DUPFD before trying to
lock smbpasswdvery strange...

regardless, excluding the intermittent F_DUPFD, I get the strange locking
error mucho frequently. always centered around the F_SETLKW64

what's really interesting to take notice of is the fact that the alarm
didn't go off until I interrupted the process




[2004/09/15 12:58:36, 0] lib/util_file.c:do_file_lock(67)
  do_file_lock: failed to lock file.
[2004/09/15 12:58:36, 0] passdb/pdb_smbpasswd.c:mod_smbfilepwd_entry(712)
  mod_smbfilepwd_entry: unable to lock file /samba/3.0.7/private/smbpasswd
[2004/09/15 12:58:36, 0]
passdb/pdb_smbpasswd.c:smbpasswd_update_sam_account(143
6)
[2004/09/15 12:58:36, 0] lib/util_file.c:do_file_lock(67)
  smbpasswd_update_sam_account: mod_smbfilepwd_entry failed!
  do_file_lock: failed to lock file.
[2004/09/15 12:58:36, 0] passdb/pdb_smbpasswd.c:mod_smbfilepwd_entry(712)
  mod_smbfilepwd_entry: unable to lock file /samba/3.0.7/private/smbpasswd
[2004/09/15 12:58:36, 0]
passdb/pdb_smbpasswd.c:smbpasswd_update_sam_account(143
6)
  smbpasswd_update_sam_account: mod_smbfilepwd_entry failed!
[2004/09/15 12:58:36, 0] lib/util_file.c:do_file_lock(67)
  do_file_lock: failed to lock file.
[2004/09/15 12:58:36, 0] passdb/pdb_smbpasswd.c:mod_smbfilepwd_entry(712)
  mod_smbfilepwd_entry: unable to lock file /samba/3.0.7/private/smbpasswd
[2004/09/15 12:58:36, 0]
passdb/pdb_smbpasswd.c:smbpasswd_update_sam_account(143
6)
  smbpasswd_update_sam_account: mod_smbfilepwd_entry failed!




kfcntl(0, F_DUPFD, 0x)  (sleeping...)
kfcntl(0, F_DUPFD, 0x)  Err#82 ERESTART
Received signal #1, SIGHUP [caught]
Received signal #14, SIGALRM [caught]
Received signal #19, SIGCONT [default]
ksetcontext_sigreturn(0x2FF1FF40, 0x, 0x2FF1FF40, 0x2FF3B000,
0x10025210, 0xD0B2, 0xA0277000, 0x2FF39F28)

Re: [Samba] File locking in NFS on Solaris

2004-09-16 Thread Jeremy Allison
On Thu, Sep 16, 2004 at 02:15:38PM -0400, William Jojo wrote:
 
 
 H. I've been following an smbpasswd locking problem over NFS (on AIX
 5.2 ML04 - Samba 3.0.7) that appears to be F_SETLKW64 related as well when
 I'm trying to join a machine to a domain or when a workstations tries to
 actively change it's trust after 7 days. It's intermittent and doesn't
 appear related to load...the smbpasswd file attemps a lock and fails after
 caught alarm (5 seconds) just like the pdb_smbpasswd.c code shows.

Try this patch (already in the SVN code).

Jeremy.

Index: passdb/pdb_smbpasswd.c
===
--- passdb/pdb_smbpasswd.c  (revision 2310)
+++ passdb/pdb_smbpasswd.c  (working copy)
@@ -898,6 +898,8 @@
 } else {
DEBUG(0,(mod_smbfilepwd_entry:  Using old smbpasswd format.  This is no 
longer supported.!\n));
DEBUG(0,(mod_smbfilepwd_entry:  No changes made, failing.!\n));
+pw_file_unlock(lockfd, (smbpasswd_state-pw_file_lock_depth));
+fclose(fp);
return False;
 }
 

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba