Bug 5536 - sometimes inotify doesn't work
Summary: sometimes inotify doesn't work
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.30
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2008-06-11 09:29 UTC by Paolo Minazzi
Modified: 2020-12-27 22:36 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Minazzi 2008-06-11 09:29:26 UTC
I have compiled samba 3.0.28 and 3.0.30 under both ARM and x86.
I have enabled inotify into the kernel.
I see a strange problem about inotify. Sometimes automatic notify works, sometimes not.

Now I will show who reproduce the error I see.
I have installed SAMBA on

I open an explorer window and I insert "\\".
A window with USER and PASSWORD appears.
I insert user and password, and my share called "RootDisk" apperars.
A click on "RootDisk", and I can use my share. It works OK, and also the notification is OK. I can create files and remove then, and I have the automatic update.

Now I close my explorer window.
I open a new explorer windows.
I enter "\\".
I click on "RootDisk".
Now, If I create or remove files, I DON'T HAVE the automatic update.
I have to press F5 key.

Now I close the explorer window.
I open a new explorer window.
I enter "\\\RootDisk".
Now I create and remove files, and the notification works OK.


I underline that I exec PHASE1, then PHASE2, then PHASE3.
PHASE1 and PHASE3 works OK, PHASE2 does not work OK.

I have tried to insert some debug messages in source/smbd/notify_inotify.c but I have not understood the difference when it is OK and it is not OK.
It seems that inotify works OK, there is something strange in the communication client-server.

I insert my smb.conf
	workgroup = SIMPLE
	netbios name = CNC1070052
	create mask = 0777
	force create mode = 0777
	directory mask = 0777
	force directory mode = 0777
	load printers = no
	printing = bsd
	printcap name = /dev/null
	disable spoolss = yes

	path = /
	writeable = yes
	valid users = root

	path = /flash                                                                                     
	writeable = yes                                                                               
	valid users = root Administrator

	path = /flashNAND
	writeable = yes
	valid users = root Administrator

I think my configuration is very simple.
I have tried to add some config option 
-> socket options = TCP_NODELAY
but this does not solve my problem.

Is this a known error ? or do I make some error ? or is my config incomplete ?

Thanks in advance
Paolo Minazzi
Comment 1 Simo Sorce 2008-07-12 22:20:25 UTC
Would you be able to provide a network trace that show the problem ?
Comment 2 Paolo Minazzi 2008-07-14 05:22:08 UTC
(In reply to comment #1)
> Would you be able to provide a network trace that show the problem ?

Yes, I'm able.

I have already exchanged some private emails with Volker.
I have sent to him some network sniffings.
With him I realize that this is not a samba problem but a WinXP problem.
More exactly
* If I use WinXP as both server and client I have the same problem. 
* If I use a Win2000 server and a WinXP as client I don't have the problem. This  make me think there is something bad in the XP sharing code.

A solution could be that samba behaviour were as Win2000.

I could 
* sniffing between Win2000=server and WinXP=client (here all is OK)
* sniffing between WinXP=server and WinXP=client (here I have the problem)
so you can see the differences