Skip to contentSkip to conversation

remove_proc_entry problem semi-tracked down

Xenomai-help Steven Seeger 2 participants 8 messages Oct 12, 2005 – Oct 15, 2005

lore
Share & tools
lore
#0 lore raw

The kernel panic in remove_proc_entry happens when a userspace fusion app calls a xenomai function that deletes something from the register in atexit. For example, I have a set of c++ classes that wrap mutexes, queues, etc. If I have a global instance, it sometimes causes a kernel panic in the destructor where the rt_mutex_delete, rt_queue_delete, etc, is called. This seems to always happen with rt_queue_delete, but not always with rt_mutex_delete. (A couple of starts/stops seem to create the problem.)

This is when exiting with a call to exit(0), not with a control-c.

Steven

#1 lore raw
Quoted 10 lines · Steven Seeger

The kernel panic in remove_proc_entry happens when a userspace fusion app calls a xenomai function that deletes something from the register in atexit. For example, I have a set of c++ classes that wrap mutexes, queues, etc. If I have a global instance, it sometimes causes a kernel panic in the destructor where the rt_mutex_delete, rt_queue_delete, etc, is called. This seems to always happen with rt_queue_delete, but not always with rt_mutex_delete. (A couple of starts/stops seem to create the problem.)

This is when exiting with a call to exit(0), not with a control-c.

Please (re)send the panic stack dump you get.

Signature · 1 line
Philippe.
#2 lore raw

EIP is at remove_proc_entry+0x20/0x120

__registry_proc_callback
__registry_proc_callback
__registry_proc_callback
worker_thread
default_wake_function
worker_thread
kthread
kthread
kernel_thread_helper

Quoted 13 lines · Philippe Gerum
Quoted 10 lines · Steven Seeger

The kernel panic in remove_proc_entry happens when a userspace fusion app calls a xenomai function that deletes something from the register in atexit. For example, I have a set of c++ classes that wrap mutexes, queues, etc. If I have a global instance, it sometimes causes a kernel panic in the destructor where the rt_mutex_delete, rt_queue_delete, etc, is called. This seems to always happen with rt_queue_delete, but not always with rt_mutex_delete. (A couple of starts/stops seem to create the problem.)

This is when exiting with a call to exit(0), not with a control-c.

Please (re)send the panic stack dump you get.

#4 lore raw
Quoted 3 lines · Steven Seeger

I only seem to get this problem if I start and stop my app a few times without unloading the xenomai modules and reloading them, btw.

Ok, this might be a useful hint. Please try crafting a simple test case creating a hundred mutexes then destroying them in a row, restarting this app a few times without unloading the xeno_native module. It would help to know if it breaks too.

Signature · 1 line
Philippe.
#5 lore raw

It doesn't break when all my app does is this. This issue requires more investigation. Still, nothing I do in userspace should make it kernel panic. :)

Steven

Quoted 11 lines · Philippe Gerum
Quoted 3 lines · Steven Seeger

I only seem to get this problem if I start and stop my app a few times without unloading the xenomai modules and reloading them, btw.

Ok, this might be a useful hint. Please try crafting a simple test case creating
a hundred mutexes then destroying them in a row, restarting this app a few times
without unloading the xeno_native module. It would help to know if it breaks too.

#6 lore raw
Quoted 2 lines · Steven Seeger

It doesn't break when all my app does is this. This issue requires more investigation. Still, nothing I do in userspace should make it kernel panic.

Sure, this exactely why we are trying to find this bug.

Quoted 20 lines

:)

Steven

Quoted 10 lines · Philippe Gerum
Quoted 3 lines · Steven Seeger

I only seem to get this problem if I start and stop my app a few times without unloading the xenomai modules and reloading them, btw.

Ok, this might be a useful hint. Please try crafting a simple test case creating a hundred mutexes then destroying them in a row, restarting this app a few times without unloading the xeno_native module. It would help to know if it breaks too.

Signature · 1 line
Philippe.
#7 lore raw
In reply to Steven Seeger
Quoted 3 lines · Steven Seeger

It doesn't break when all my app does is this. This issue requires more investigation. Still, nothing I do in userspace should make it kernel panic. :)

Dmitry found a serious flaw in the recent I-pipe patches that I've just fixed. You might want to try this one out:
http://download.gna.org/adeos/patches/v2.6/adeos/i386/adeos-ipipe-2.6.13-i386-1.0-07.patch

Quoted 19 lines

Steven

Quoted 10 lines · Philippe Gerum
Quoted 3 lines · Steven Seeger

I only seem to get this problem if I start and stop my app a few times without unloading the xenomai modules and reloading them, btw.

Ok, this might be a useful hint. Please try crafting a simple test case creating a hundred mutexes then destroying them in a row, restarting this app a few times without unloading the xeno_native module. It would help to know if it breaks too.

Signature · 1 line
Philippe.