calling xnpod_delete_thread after self-termination
Hi all,
as the subject already says: I face some warning of the nucleus (with XENO_OPT_DEBUG on - useful switch) when I call xnpod_delete_thread for a thread which has already terminated itself by leaving the thread function. Is this double-deletion illegal? Or is it a cleanup-bug of the nucleus?
To reproduce: this happens with RTnet over all Xenomai versions (i.e. through the RTDM layer). I insert and remove the rtcfg module, and this one cleans up some kernel tasks - and the nucleus complains.
Jan
PS: One open crash remaining on my list - likely RTnet-internal and uncritical. ;)
Quoted 7 lines · Jan Kiszka
Hi all,
as the subject already says: I face some warning of the nucleus (with
XENO_OPT_DEBUGon - useful switch) when I callxnpod_delete_threadfor a thread which has already terminated itself by leaving the thread function. Is this double-deletion illegal? Or is it a cleanup-bug of the nucleus?
Double-deletion is actually illegal.
Quoted 18 lines
To reproduce: this happens with RTnet over all Xenomai versions (i.e. through the RTDM layer). I insert and remove the rtcfg module, and this one cleans up some kernel tasks - and the nucleus complains.
Jan
PS: One open crash remaining on my list - likely RTnet-internal and uncritical. ;)
------------------------------------------------------------------------
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 7 lines · Jan Kiszka
Hi all,
as the subject already says: I face some warning of the nucleus (with
XENO_OPT_DEBUGon - useful switch) when I callxnpod_delete_threadfor a thread which has already terminated itself by leaving the thread function. Is this double-deletion illegal? Or is it a cleanup-bug of the nucleus?
We could test the XNZOMBIE bit in xnpod_delete_thread() to prevent this, I guess.
Quoted 18 lines
To reproduce: this happens with RTnet over all Xenomai versions (i.e. through the RTDM layer). I insert and remove the rtcfg module, and this one cleans up some kernel tasks - and the nucleus complains.
Jan
PS: One open crash remaining on my list - likely RTnet-internal and uncritical. ;)
------------------------------------------------------------------------
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 11 lines · Philippe Gerum
Quoted 7 lines · Jan Kiszka
Hi all,
as the subject already says: I face some warning of the nucleus (with
XENO_OPT_DEBUGon - useful switch) when I callxnpod_delete_threadfor a thread which has already terminated itself by leaving the thread function. Is this double-deletion illegal? Or is it a cleanup-bug of the nucleus?
Quoted 3 lines
We could test the XNZOMBIE bit in
xnpod_delete_thread()to prevent this, I guess.
Would be better, I think. Otherwise, at least xnpod_delete_thread and also rtdm_task_destroy would require a clear warning sign.
I was not aware of this restriction, so I did not worked around it in RTnet - which is easy at RTDM level BTW: task wakeup for self-termination + rtdm_task_join_nrt. This is cleaner anyway, so I will patch RTnet now.
Jan
Quoted 14 lines · Jan Kiszka
Quoted 12 lines · Philippe Gerum
Quoted 7 lines · Jan Kiszka
Hi all,
as the subject already says: I face some warning of the nucleus (with
XENO_OPT_DEBUGon - useful switch) when I callxnpod_delete_threadfor a thread which has already terminated itself by leaving the thread function. Is this double-deletion illegal? Or is it a cleanup-bug of the nucleus?
Quoted 6 lines
Quoted 3 lines
We could test the XNZOMBIE bit in
xnpod_delete_thread()to prevent this, I guess.Would be better, I think.
Ok, fixed.
Otherwise, at least xnpod_delete_thread and
Quoted 8 lines
also
rtdm_task_destroywould require a clear warning sign.I was not aware of this restriction, so I did not worked around it in RTnet - which is easy at RTDM level BTW: task wakeup for self-termination +
rtdm_task_join_nrt. This is cleaner anyway, so I will patch RTnet now.Jan
Signature · 1 line
Philippe.