The Samba-Bugzilla – Bug 2115
Directory change notification work only for 1 min
Last modified: 2008-05-07 05:13:52 UTC
When I open folder on Samba server in Windows Explorer, it subscribes to
receive notifications if something changes in that folder. But this
notification thing is working only for 1 min or so. After that to see changes
in folder one needs to refresh folder manualy. On samba 2.2.x the same thing
worked without any problems.
What server platform are you running Samba on ? On Linux and IRIX this uses
kernel based notification, on all other platforms it's polling. I'll try and
I am running Linux kernel 2.4.22-37mdk and also 220.127.116.11-20mdk (Mandrake
patched kernels). Both the same result.
We recently upgraded our server to Fedora Core 4 from Redhat Linux 7.3 and we are also seeing this problem. Notifications work only for a short time after a directory watch has started.
New machine is running kernel 2.6.14-1.1656_FC4 and samba 3.0.14a-2.
Old machine was running kernel-2.4.20-43.7, with samba-2.2.12-0.73.7.
Created attachment 1699 [details]
notify patch for testing
Can you please try to apply this patch and see if this helps?
Philip, Valdas: have you been able to test that patch?
Problem remains with patch applied.
(In reply to comment #5)
> Philip, Valdas: have you been able to test that patch?
What version of Windows are you using to test this, or does it happen with all versions ?
Hi all, sorry for not getting back to this earlier.
I had applied the patch and it didn't seem to have made much difference, although I didn't get a chance to test it much as hardware problems forced us to change the server. We are now running CentOS 4.2 x86_64 and samba-samba-3.0.10-1.4E.2 which also shows this problem.
I've done some tests to see what I could find out about this behaviour.
A small script running on the server that creates and deletes a file every 5 seconds in one of the shares works fine right up until a new file is created in the same directory, then the notifications stop. The size of the new file seems to have an effect, the larger it is the more likely it is to stop notifications; I can create files <1k usually without breaking anything.
I ran dnotify on the server on the directory and it is detecting all changes. I tried mounting the samba share on the server and ran dnotify on that, but this doesn't detect anything. Does smbfs support dnotify?
try setting "keep alive = 0" and test once more, let's see... :-)
> try setting "keep alive = 0" and test once more, let's see... :-)
This does not help.
As of Windows versions, when problem was reported I tried with Windows NT, now I am testing with Windows XP. Also I have sniffed network traffic - nothing is being sent to Windows client after that magic period of 1 min or so.
(In reply to comment #10)
I also have this problem. File Change Notification worked when we were running Samba 2.2.0 on Solaris. We just moved to Samba 3.0.10-1.4E.9 on RedHat Linux and File Change Notification to various Windows versions and the Win32 API FindFirstChangeNotification now stops working after 1 minute.
If I use Touch about every 30 seconds to create a new file in the Samba mapped share then Change Notification to Windows will continue working for many minutes (as long as I have patience to continue). As soon as I go more than about 50-55 seconds without creating a file then Change Notification stops.
I can get File Change Notification to start working again by refreshing the Windows File Explorer display - moving to a different directory tree and then back to the Samba share. File Change Notification will then behave as before - continuing to work as long as I don't go more than about 50-55 seconds without creating a file.
Problem still present with latest samba-3.0.23c (FC6 on an x86_64 server).
Same thing with my home machine (FC4, i686, samba-3.0.23a).
Experiencing something similiar here with Windows clients and Netapp Filers. A user has raised a helpdesk call stating that accessing a share via UNC and modifying files in deeply nested folders raises the problem. It does seem sporadic though. I can recreate this using other Filers at other sites. Accessing the same resource via a mapped drive does not show the problem. Clients are largely Windows XPSP2; we have applied MS KB823291 to the clients which seems to alleviate symptoms slightly. Servers are all Netapp Filers running Data OnTap 6.5.5.
is this still an issue for you with samba 3.0.28a or 3.2?
(In reply to comment #14)
> is this still an issue for you with samba 3.0.28a or 3.2?
As long as I remember directory change notifications started working again in 3.0.25. Cannot say anything on 3.2 branch.
We're not going to fix old versions, and if I got you right then it does work with .28a. Closing.