Bug 2115 - Directory change notification work only for 1 min
Summary: Directory change notification work only for 1 min
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.9
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-02 02:53 UTC by Valdas Andrulis
Modified: 2008-05-07 05:13 UTC (History)
4 users (show)

See Also:


Attachments
notify patch for testing (582 bytes, patch)
2006-01-18 06:17 UTC, Björn Jacke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valdas Andrulis 2004-12-02 02:53:45 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.
Comment 1 Jeremy Allison 2004-12-02 11:57:45 UTC
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
reproduce this.

Jeremy.
Comment 2 Valdas Andrulis 2004-12-02 13:22:30 UTC
I am running Linux kernel 2.4.22-37mdk and also 2.6.8.1-20mdk (Mandrake 
patched kernels). Both the same result. 
Comment 3 Philip Heron 2006-01-18 05:09:17 UTC
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.
Comment 4 Björn Jacke 2006-01-18 06:17:41 UTC
Created attachment 1699 [details]
notify patch for testing

Can you please try to apply this patch and see if this helps?
Comment 5 Björn Jacke 2006-02-15 02:37:18 UTC
Philip, Valdas: have you been able to test that patch?
Comment 6 Valdas Andrulis 2006-02-15 09:12:01 UTC
Problem remains with patch applied.

(In reply to comment #5)
> Philip, Valdas: have you been able to test that patch?
> 

Comment 7 Jeremy Allison 2006-02-15 10:31:18 UTC
What version of Windows are you using to test this, or does it happen with all versions ?
Jeremy.
Comment 8 Philip Heron 2006-02-15 11:13:41 UTC
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?
Comment 9 Björn Jacke 2006-02-15 11:34:20 UTC
try setting "keep alive = 0" and test once more, let's see... :-)
Comment 10 Valdas Andrulis 2006-02-15 14:51:08 UTC
> 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.

Comment 11 David Campen 2006-10-23 12:45:32 UTC
(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.
Comment 12 cmarco 2006-11-12 17:31:49 UTC
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).
Comment 13 Barry Clarke 2007-02-15 04:38:27 UTC
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. 
Comment 14 Björn Jacke 2008-04-28 08:56:59 UTC
is this still an issue for you with samba 3.0.28a or 3.2?
Comment 15 Valdas Andrulis 2008-05-07 04:42:59 UTC
(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.
Comment 16 Volker Lendecke 2008-05-07 05:13:52 UTC
We're not going to fix old versions, and if I got you right then it does work with .28a. Closing.

Thanks,

Volker