I have suddenly started seeing this, since maybe a couple of weeks ago (after
the last set of windows updates? not sure)

PSPad 4.5.8 (2457), Windows 7 x64, NTP time, accessing samba shares on a server
(which I control) that is also NTP'd to the same server and with the same
timezone settings. smb.conf file hasn't changed since 2011.

Running in XP compatibility mode doesn't help. Changing to previous versions of
PSPad doesn't help. 

As noted previously, changing "Format" to UTF-8 (or indeed either of the
UTF-16's, although I'm not doing that!) does resolve this problem; I can imagine
that might give a hint as to what's going wrong? Changing to any of the other
settings doesn't help :(

stat says that the file update time is changing some 10-15 seconds after the
initial save:

$ stat /tmp/wibble
  File: `/tmp/wibble'
  Size: 22686           Blocks: 48         IO Block: 4096   regular file
Device: 842h/2114d      Inode: 19          Links: 1
Access: (0744/-rwxr--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2013-10-03 14:17:21.000000000 +0100
Modify: 2013-10-03 14:57:02.000000000 +0100
Change: 2013-10-03 14:57:02.000000000 +0100

$ stat /tmp/wibble
  File: `/tmp/wibble'
  Size: 22686           Blocks: 48         IO Block: 4096   regular file
Device: 842h/2114d      Inode: 19          Links: 1
Access: (0744/-rwxr--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2013-10-03 14:17:21.000000000 +0100
Modify: 2013-10-03 14:57:14.000000000 +0100
Change: 2013-10-03 14:57:13.000000000 +0100

Turning up debug logging in samba suggests that something is opening the file
multiple times when saving in ANSI mode, with one of the filehandles being kept
open for the duration:

When saving in UTF8 mode:
[2013/10/03 15:35:41.487168,  2] smbd/open.c:634(open_file)
  root opened file tmp/wibble read=No write=Yes (numopen=1)
[2013/10/03 15:35:41.501812,  2] smbd/close.c:656(close_normal_file)
  root closed file tmp/wibble (numopen=0) NT_STATUS_OK

  
When saving in ANSI mode:
[2013/10/03 15:42:55.127573,  2] smbd/open.c:634(open_file)
  root opened file tmp/wibble read=Yes write=No (numopen=1)
[2013/10/03 15:42:55.150337,  2] smbd/open.c:634(open_file)
  root opened file tmp/wibble read=No write=No (numopen=2)
[2013/10/03 15:42:55.160314,  2] smbd/close.c:656(close_normal_file)
  root closed file tmp/wibble (numopen=1) NT_STATUS_OK
[2013/10/03 15:42:55.162229,  2] smbd/close.c:656(close_normal_file)
  root closed file tmp/wibble (numopen=0) NT_STATUS_OK
[2013/10/03 15:42:55.163473,  2] smbd/open.c:634(open_file)
  root opened file tmp/wibble read=No write=Yes (numopen=1)
[2013/10/03 15:42:55.170458,  2] smbd/open.c:634(open_file)
  root opened file tmp/wibble read=No write=No (numopen=2)
[2013/10/03 15:42:55.171926,  2] smbd/close.c:656(close_normal_file)
  root closed file tmp/wibble (numopen=1) NT_STATUS_OK

[2013/10/03 15:43:07.507428,  2] smbd/close.c:656(close_normal_file)
  root closed file tmp/wibble (numopen=0) NT_STATUS_OK

Note the 8 second gap between the first and second close() calls.

Turning off opportunistic locking in samba ("oplocks=no" in /etc/samba/smb.conf)
does seem to stop the problem, although that's not ideal.

This is about as far as my knowledge goes. We did change to Symantec AV
recently, although I have a feeling the errors started before that; however it
might be worth noting if others with the same problem are also using Symantec? 

Note that notepad++ doesn't exhibit the same behaviour even when saving as ANSI,
so even if symantec is doing something odd it's not affecting everything.

-- 
<http://forum.pspad.com/read.php?2,53148,61262>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem