Thread (3 messages) 3 messages, 2 authors, 2011-06-14

Re: fanotify coredump issue

From: Vasily Novikov <hidden>
Date: 2011-06-10 13:44:58

Lino,

On 01/04/2011 01:28 PM, Lino Sanfilippo wrote:
quoted
I tested fanotify in 2.6.37-rc7 and faced the following issue: when a
fanotify server process (started with open_perm set) segfaults the
kernel tries to open core dump file and here it is forced to wait a
permission result because fanotify server receives notifications on
file operations initiated by itself. Since fanotify server has crashed
the permission will never be granted. So the whole system hangs.
Hmm I could not reproduce this with the latest state (ef9bf3b7144bee6ce) of
branch 'origin/for-next' from git.infradead.org/users/eparis/notify.git

What i did was:
- register with fanotify
- set mark for OPEN_PERM event
- read an event
- cause a segfault before response is returned to fanotify

The process terminates and the core file is created as expected.
Could you provide some code to trigger this?
The issue is still reproduced on ubuntu 11.04:

$ uname -a
Linux user-virtual-machine 2.6.38.2 #16 SMP Wed Jun 8 14:40:03 MSD 2011 
i686 i686 i386 GNU/Linux
$ g++ fanotify.c -o fanotify -lpthread
$ sudo su
$ ulimit -c unlimited
$ ./fanotify -o open_perm -C -m /

In other console:
$ ls

Then machine is dead.

-- 
Best regards,

Vasily Novikov | Software developer | Kaspersky Lab

Direct: +7 495 123 45 67 x2344 | Mobile: +7 964 786 44 82 | 
vasily.novikov@kaspersky.com
10/1, 1st Volokolamsky Proezd, Moscow, 123060, Russia | 
www.kaspersky.com,  www.securelist.com

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help