Bug 546491

Summary: inotify events not processed correctly with kernel 2.6.31-10
Product: [openSUSE] openSUSE 11.2 Reporter: Marcus Schaefer <ms>
Component: BasesystemAssignee: Andreas Gruenbacher <agruen>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: sebastien.rohaut
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: maint:released:11.2:29469
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: notify test code

Description Marcus Schaefer 2009-10-13 13:34:53 UTC
I tested kernel notify events with the attached test program and found
that the removal of files is not reported anymore. I'm not 100% sure
if I did something wrong but the attached C code worked for me since
inotify was introduced

How to reproduce:

- compile notify.c

  all: notify
    cc $(CFLAGS) -o $^ notify.c

- create test directory 
 
  mkdir /tmp/test

- run 

  notify /tmp/test

- call 

  touch /tmp/test/lala

  ==> works

  rm /tmp/test/lala

  ==> no event
Comment 1 Marcus Schaefer 2009-10-13 13:35:52 UTC
Created attachment 322255 [details]
notify test code
Comment 2 Sebastien ROHAUT 2009-11-15 14:58:22 UTC
Same problem here. it seems the behavior in 2.6.31 has been modified (due to fsnotify). I have strange results with file refresh notification too in desktop apps...
Comment 3 Andreas Gruenbacher 2009-11-16 18:35:01 UTC
I have pushed two fixes into the 11.2 git tree; they should show up in the KOTD in a while. Could you please see if they make a change? Changelog entry:

    - patches.fixes/dnotify-ignore-FS_EVENT_ON_CHILD.diff: dnotify:
      ignore FS_EVENT_ON_CHILD.
    - patches.fixes/inotify-fix-coalesce-duplicate-events-into-a-single.diff:
      inotify: fix coalesce duplicate events into a single event in
      special case.

Thanks!
Comment 4 Marcus Schaefer 2009-11-17 15:19:50 UTC
yes this fixes the problem. Just tested the 64bit version of the
kernel. Thanks
Comment 5 Andreas Gruenbacher 2009-11-17 15:37:13 UTC
Hoho!  ;-)

Thanks, the fix will be in the next kernel update.
Comment 6 Swamp Workflow Management 2010-01-04 10:52:37 UTC
Update released for: kernel-debug, kernel-debug-base, kernel-debug-base-debuginfo, kernel-debug-debuginfo, kernel-debug-debugsource, kernel-debug-devel, kernel-debug-devel-debuginfo, kernel-default, kernel-default-base, kernel-default-base-debuginfo, kernel-default-debuginfo, kernel-default-debugsource, kernel-default-devel, kernel-default-devel-debuginfo, kernel-desktop, kernel-desktop-base, kernel-desktop-base-debuginfo, kernel-desktop-debuginfo, kernel-desktop-debugsource, kernel-desktop-devel, kernel-desktop-devel-debuginfo, kernel-pae, kernel-pae-base, kernel-pae-base-debuginfo, kernel-pae-debuginfo, kernel-pae-debugsource, kernel-pae-devel, kernel-pae-devel-debuginfo, kernel-source, kernel-source-vanilla, kernel-syms, kernel-trace, kernel-trace-base, kernel-trace-base-debuginfo, kernel-trace-debuginfo, kernel-trace-debugsource, kernel-trace-devel, kernel-trace-devel-debuginfo, kernel-vanilla, kernel-vanilla-base, kernel-vanilla-base-debuginfo, kernel-vanilla-debuginfo, kernel-vanilla-debugsource, kernel-vanilla-devel, kernel-vanilla-devel-debuginfo, kernel-xen, kernel-xen-base, kernel-xen-base-debuginfo, kernel-xen-debuginfo, kernel-xen-debugsource, kernel-xen-devel, kernel-xen-devel-debuginfo, preload-kmp-default, preload-kmp-desktop
Products:
openSUSE 11.2 (debug, i586, x86_64)