Hello,

I got some trouble with the native skin and queues, when creating / deleting
queues, my Kernel sometimes (actually very often...) crashes, leading to a
frozen system, with my Xenomai program continuing until it returns. I
tried
to isolate / reproduce the problem, which lead me to the following
demo-code.


it looks like there is some "misunderstanding" between

(1) rt_queue_delete() -> xnregistry_remove()

and

(2) registry_proc_callback() which crushes in remove_proc_entry().

You may follow the logic in ksrc/nucleus/registry.c.

rt_queue_create() -> xnregistry_enter() -> ... -> registry_proc_callback()

rt_queue_delete() -> xnregistry_remove() -> ... registry_proc_unexport()

I don't have enough time to investigate further right now, but nevertheless,
could you apply the following patch and let us know of the outcome?


--
Best regards,
Dmitry Adamushko
--- ksrc/nucleus/registry-old.c	2006-11-15 14:10:02.877744000 +0100
+++ ksrc/nucleus/registry.c	2006-11-15 14:14:44.335173000 +0100
@@ -404,7 +404,10 @@ static inline void registry_proc_export(
 
 static inline void registry_proc_unexport(xnobject_t *object)
 {
-	if (object->proc != XNOBJECT_PROC_RESERVED1) {
+	if (!object->proc || object->proc == XNOBJECT_PROC_RESERVED2)
+		printk(KERN_INFO "*** object->proc == %x ***\n", object->proc);
+
+	if ((unsigned long)object->proc > (unsigned long)XNOBJECT_PROC_RESERVED2) {
 		removeq(&registry_obj_busyq, &object->link);
 		appendq(&registry_obj_unexportq, &object->link);
 		rthal_apc_schedule(registry_proc_apc);
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to