xenomai-main
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xenomai-main] Bug in xenomai on top of POSIX


From: Christian GAGNERAUD
Subject: [Xenomai-main] Bug in xenomai on top of POSIX
Date: Thu, 16 Oct 2003 16:13:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Hi all,

I think i found a bug in the posix layer (i know it will never be used since the fusion with RTAI but..).

it concerne xnarch_init_thread(), posix_thread_trampoline(), thread_spawned and posix_spawnmutex etc...

when a thread create and start another thread (that is less prioritary than the creator) and try to delete it, the system block on the next creation/start done by the same creator thread.

by reading and tracing these 2 functions (by xnarch_printf) i found that at the second creation/start the creator block on the first call to pthread_mutex_lock(&posix_spawnmutex) and that the while(!thread_spawned) {pthread_cond_wait(&posix_spawnflag,&posix_spawnmutex);}

is executed only the first time.


all these seem to be solved by adding a
thread_spawned = 0;
before the call to
pthread_create(&tcb->thid,&thattr,posix_thread_trampoline,tcb);
in xnarch_init_thread()

When the thread created by the creator is delete by another thread (not the creator), all seems to work fine.

I use xenomai v1.1.1 on a linux redhat 7.2 (original kernel 2.4.7-10)

Am i right or is my own interface code that cause this bug?


best regards.
Chris.

--
Gagneraud Christian

Atos Origin
Systems Integration
Rue Ampère - BP 475
31315 Labège Cedex
Tel : +33 (0)5.61.39.75.47
Fax : +33 (0)5.61.39.16.65
mailto: address@hidden

==========
Ce message électronique est confidentiel. Il peut contenir des informations protégées par le secret professionnel, le secret de fabrication ou autres règles légales. Si vous recevez ce message par erreur, il vous est interdit de le reproduire ou de le distribuer en tout ou partie, ou de le divulguer de quelque manière que ce soit a quelque personne que ce soit.Nous vous prions de bien vouloir en informer Atos Origin, par téléphone ou par retour d'e-mail puis de détruire le message et toutes copies de votre système informatique... Le contenu de ce message ne reflète pas necessairement ni les opinions d'Atos Origin ni celles des membres de son groupe. Bien que l'émetteur de ce message ait fait tout son possible pour maintenir son système informatique sans virus, il ne peut garantir que cette transmission ne comporte aucun virus et il ne pourra être tenu pour responsable de quelque dommage que ce soit résultant de la transmission d'un virus.
-- ! --
This electronic transmission and any files attached to it are strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error, please notify us by return and delete the same. The views expressed in this electronic transmission do not necessarily reflect those of Atos Origin or any of its subsidiary companies. Although the sender endeavours to maintain a computer virus free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Thank You.
==========





reply via email to

[Prev in Thread] Current Thread [Next in Thread]