* [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination
@ 2005-11-30 20:13 Jan Kiszka
2005-11-30 21:45 ` Philippe Gerum
2005-11-30 21:46 ` Philippe Gerum
0 siblings, 2 replies; 5+ messages in thread
From: Jan Kiszka @ 2005-11-30 20:13 UTC (permalink / raw)
To: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
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. ;)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination
2005-11-30 20:13 [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination Jan Kiszka
@ 2005-11-30 21:45 ` Philippe Gerum
2005-11-30 21:46 ` Philippe Gerum
1 sibling, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2005-11-30 21:45 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
Jan Kiszka wrote:
> 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?
Double-deletion is actually illegal.
>
> 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
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination
2005-11-30 20:13 [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination Jan Kiszka
2005-11-30 21:45 ` Philippe Gerum
@ 2005-11-30 21:46 ` Philippe Gerum
2005-11-30 21:55 ` Jan Kiszka
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2005-11-30 21:46 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
Jan Kiszka wrote:
> 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?
We could test the XNZOMBIE bit in xnpod_delete_thread() to prevent this,
I guess.
>
> 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
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination
2005-11-30 21:46 ` Philippe Gerum
@ 2005-11-30 21:55 ` Jan Kiszka
2005-11-30 22:11 ` Philippe Gerum
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2005-11-30 21:55 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]
Philippe Gerum wrote:
> Jan Kiszka wrote:
>
>> 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?
>
>
> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination
2005-11-30 21:55 ` Jan Kiszka
@ 2005-11-30 22:11 ` Philippe Gerum
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2005-11-30 22:11 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
Jan Kiszka wrote:
> Philippe Gerum wrote:
>
>>Jan Kiszka wrote:
>>
>>
>>>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?
>>
>>
>>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
> 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
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-11-30 22:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-30 20:13 [Xenomai-core] [bug?] calling xnpod_delete_thread after self-termination Jan Kiszka
2005-11-30 21:45 ` Philippe Gerum
2005-11-30 21:46 ` Philippe Gerum
2005-11-30 21:55 ` Jan Kiszka
2005-11-30 22:11 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.