Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - threads disappear in QNX 6.3.2: (8 Items)
   
threads disappear in QNX 6.3.2  
Hi,

I have a process that runs many threads. One of the threads is created by a library it (dynamically) links to.
The process start running OK (pidin shows all threads) and it seems to run OK until some point of time where suddenly 
some threads are not there. There are many threads that disappear (pidin does not show it) and, if it gives more 
information to anyone, the thread created by the library it links to is gone too.

There are parts of the code that pthread_cancel() that threads, but I've added prints (write + fsync) and is not being 
executed. So I *really* don't understand what could be happening to make the threads disappear.

Also, always the remaining threads are in "REPLY" state

Does this rings any bell to any of you guys ? What can make a thread *disappear* ?
Is there something (I don't really know) to configure that makes a null de-reference instead of SEGFAULT all the process
 only a thread or something like that ?
Or some suggestion how to debug further this problem ?




Thanks a lot,
Rodrigo
Re: threads disappear in QNX 6.3.2  
Can you debug it? Put breakpoints on pthread_cancel, pthread_exit.


Rodrigo Campos wrote:
> Hi,
>
> I have a process that runs many threads. One of the threads is created by a library it (dynamically) links to.
> The process start running OK (pidin shows all threads) and it seems to run OK until some point of time where suddenly 
some threads are not there. There are many threads that disappear (pidin does not show it) and, if it gives more 
information to anyone, the thread created by the library it links to is gone too.
>
> There are parts of the code that pthread_cancel() that threads, but I've added prints (write + fsync) and is not being
 executed. So I *really* don't understand what could be happening to make the threads disappear.
>
> Also, always the remaining threads are in "REPLY" state
>
> Does this rings any bell to any of you guys ? What can make a thread *disappear* ?
> Is there something (I don't really know) to configure that makes a null de-reference instead of SEGFAULT all the 
process only a thread or something like that ?
> Or some suggestion how to debug further this problem ?
>
>
>
>
> Thanks a lot,
> Rodrigo
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post56760
>
>   
Re: threads disappear in QNX 6.3.2  
I don't have access to the machine right now.
But I'm quite sure pthread_cancel is not being called, since I've added prints (write + fsync) and when the problem 
happens the prints are not shown.

Any other ideas ?

> Can you debug it? Put breakpoints on pthread_cancel, pthread_exit.
> 
> 
> Rodrigo Campos wrote:
> > Hi,
> >
> > I have a process that runs many threads. One of the threads is created by a 
> library it (dynamically) links to.
> > The process start running OK (pidin shows all threads) and it seems to run 
> OK until some point of time where suddenly some threads are not there. There 
> are many threads that disappear (pidin does not show it) and, if it gives more
>  information to anyone, the thread created by the library it links to is gone 
> too.
> >
> > There are parts of the code that pthread_cancel() that threads, but I've 
> added prints (write + fsync) and is not being executed. So I *really* don't 
> understand what could be happening to make the threads disappear.
> >
> > Also, always the remaining threads are in "REPLY" state
> >
> > Does this rings any bell to any of you guys ? What can make a thread *
> disappear* ?
> > Is there something (I don't really know) to configure that makes a null de-
> reference instead of SEGFAULT all the process only a thread or something like 
> that ?
> > Or some suggestion how to debug further this problem ?
> >
> >
> >
> >
> > Thanks a lot,
> > Rodrigo
> >
> >
> >
> > _______________________________________________
> >
> > QNX Momentics Community Support
> > http://community.qnx.com/sf/go/post56760
> >
> >   


Re: threads disappear in QNX 6.3.2  
You can run kernel tracing. But you need "access" for this. And you 
ignored my comment about pthread_exit

Rodrigo Campos wrote:
> I don't have access to the machine right now.
> But I'm quite sure pthread_cancel is not being called, since I've added prints (write + fsync) and when the problem 
happens the prints are not shown.
>
> Any other ideas ?
>
>   
>> Can you debug it? Put breakpoints on pthread_cancel, pthread_exit.
>>
>>
>> Rodrigo Campos wrote:
>>     
>>> Hi,
>>>
>>> I have a process that runs many threads. One of the threads is created by a 
>>>       
>> library it (dynamically) links to.
>>     
>>> The process start running OK (pidin shows all threads) and it seems to run 
>>>       
>> OK until some point of time where suddenly some threads are not there. There 
>> are many threads that disappear (pidin does not show it) and, if it gives more
>>  information to anyone, the thread created by the library it links to is gone 
>> too.
>>     
>>> There are parts of the code that pthread_cancel() that threads, but I've 
>>>       
>> added prints (write + fsync) and is not being executed. So I *really* don't 
>> understand what could be happening to make the threads disappear.
>>     
>>> Also, always the remaining threads are in "REPLY" state
>>>
>>> Does this rings any bell to any of you guys ? What can make a thread *
>>>       
>> disappear* ?
>>     
>>> Is there something (I don't really know) to configure that makes a null de-
>>>       
>> reference instead of SEGFAULT all the process only a thread or something like 
>> that ?
>>     
>>> Or some suggestion how to debug further this problem ?
>>>
>>>
>>>
>>>
>>> Thanks a lot,
>>> Rodrigo
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> QNX Momentics Community Support
>>> http://community.qnx.com/sf/go/post56760
>>>
>>>   
>>>       
>
>
>
>
>
>
> _______________________________________________
>
> QNX Momentics Community Support
> http://community.qnx.com/sf/go/post56762
>
>   
Re: threads disappear in QNX 6.3.2  
I will try to have access and try kernel tracing. By any chance do you have some "hello world" example I can try ? :)

Sorry, I'm not sure if I  understand what you mean with pthread_exit. I was not clear, but I'm not using pthread_exit in
 any place of the code, so it shouldn't be pthread_exit either.




Thanks a lot, really

Rodrigo

> You can run kernel tracing. But you need "access" for this. And you 
> ignored my comment about pthread_exit
> 
> Rodrigo Campos wrote:
> > I don't have access to the machine right now.
> > But I'm quite sure pthread_cancel is not being called, since I've added 
> prints (write + fsync) and when the problem happens the prints are not shown.
> >
> > Any other ideas ?
> >
> >   
> >> Can you debug it? Put breakpoints on pthread_cancel, pthread_exit.
> >>
> >>
> >> Rodrigo Campos wrote:
> >>     
> >>> Hi,
> >>>
> >>> I have a process that runs many threads. One of the threads is created by 
> a 
> >>>       
> >> library it (dynamically) links to.
> >>     
> >>> The process start running OK (pidin shows all threads) and it seems to run
>  
> >>>       
> >> OK until some point of time where suddenly some threads are not there. 
> There 
> >> are many threads that disappear (pidin does not show it) and, if it gives 
> more
> >>  information to anyone, the thread created by the library it links to is 
> gone 
> >> too.
> >>     
> >>> There are parts of the code that pthread_cancel() that threads, but I've 
> >>>       
> >> added prints (write + fsync) and is not being executed. So I *really* don't
>  
> >> understand what could be happening to make the threads disappear.
> >>     
> >>> Also, always the remaining threads are in "REPLY" state
> >>>
> >>> Does this rings any bell to any of you guys ? What can make a thread *
> >>>       
> >> disappear* ?
> >>     
> >>> Is there something (I don't really know) to configure that makes a null de
> -
> >>>       
> >> reference instead of SEGFAULT all the process only a thread or something 
> like 
> >> that ?
> >>     
> >>> Or some suggestion how to debug further this problem ?
> >>>
> >>>
> >>>
> >>>
> >>> Thanks a lot,
> >>> Rodrigo
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>> QNX Momentics Community Support
> >>> http://community.qnx.com/sf/go/post56760
> >>>
> >>>   
> >>>       
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> >
> > QNX Momentics Community Support
> > http://community.qnx.com/sf/go/post56762
> >
> >   


Re: threads disappear in QNX 6.3.2  
I only know how to do it from IDE. You have to read user manual it is 
better written there than I can do here.

Rodrigo Campos wrote:
> I will try to have access and try kernel tracing. By any chance do you have some "hello world" example I can try ? :)
>
> Sorry, I'm not sure if I  understand what you mean with pthread_exit. I was not clear, but I'm not using pthread_exit 
in any place of the code, so it shouldn't be pthread_exit either.
>
>
>
>
> Thanks a lot, really
>
> Rodrigo
>
>   
>> You can run kernel tracing. But you need "access" for this. And you 
>> ignored my comment about pthread_exit
>>
>> Rodrigo Campos wrote:
>>     
>>> I don't have access to the machine right now.
>>> But I'm quite sure pthread_cancel is not being called, since I've added 
>>>       
>> prints (write + fsync) and when the problem happens the prints are not shown.
>>     
>>> Any other ideas ?
>>>
>>>   
>>>       
>>>> Can you debug it? Put breakpoints on pthread_cancel, pthread_exit.
>>>>
>>>>
>>>> Rodrigo Campos wrote:
>>>>     
>>>>         
>>>>> Hi,
>>>>>
>>>>> I have a process that runs many threads. One of the threads is created by 
>>>>>           
>> a 
>>     
>>>>>       
>>>>>           
>>>> library it (dynamically) links to.
>>>>     
>>>>         
>>>>> The process start running OK (pidin shows all threads) and it seems to run
>>>>>           
>>  
>>     
>>>>>       
>>>>>           
>>>> OK until some point of time where suddenly some threads are not there. 
>>>>         
>> There 
>>     
>>>> are many threads that disappear (pidin does not show it) and, if it gives 
>>>>         
>> more
>>     
>>>>  information to anyone, the thread created by the library it links to is 
>>>>         
>> gone 
>>     
>>>> too.
>>>>     
>>>>         
>>>>> There are parts of the code that pthread_cancel() that threads, but I've 
>>>>>       
>>>>>           
>>>> added prints (write + fsync) and is not being executed. So I *really* don't
>>>>         
>>  
>>     
>>>> understand what could be happening to make the threads disappear.
>>>>     
>>>>         
>>>>> Also, always the remaining threads are in "REPLY" state
>>>>>
>>>>> Does this rings any bell to any of you guys ? What can make a thread *
>>>>>       
>>>>>           
>>>> disappear* ?
>>>>     
>>>>         
>>>>> Is there something (I don't really know) to configure that makes a null de
>>>>>           
>> -
>>     
>>>>>       
>>>>>           
>>>> reference instead of SEGFAULT all the process only a thread or something 
>>>>         
>> like 
>>     
>>>> that ?
>>>>     
>>>>         
>>>>> Or some suggestion how to debug further this problem ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks a lot,
>>>>> Rodrigo
>>>>>
>>>>>
>>>>>
>>>>>...
Re: threads disappear in QNX 6.3.2  
Ahh, thanks a lot anyway!

> I only know how to do it from IDE. You have to read user manual it is 
> better written there than I can do here.
> 
> Rodrigo Campos wrote:
> > I will try to have access and try kernel tracing. By any chance do you have 
> some "hello world" example I can try ? :)
> >
> > Sorry, I'm not sure if I  understand what you mean with pthread_exit. I was 
> not clear, but I'm not using pthread_exit in any place of the code, so it 
> shouldn't be pthread_exit either.
> >
> >
> >
> >
> > Thanks a lot, really
> >
> > Rodrigo
> >
> >   
> >> You can run kernel tracing. But you need "access" for this. And you 
> >> ignored my comment about pthread_exit
> >>
> >> Rodrigo Campos wrote:
> >>     
> >>> I don't have access to the machine right now.
> >>> But I'm quite sure pthread_cancel is not being called, since I've added 
> >>>       
> >> prints (write + fsync) and when the problem happens the prints are not 
> shown.
> >>     
> >>> Any other ideas ?
> >>>
> >>>   
> >>>       
> >>>> Can you debug it? Put breakpoints on pthread_cancel, pthread_exit.
> >>>>
> >>>>
> >>>> Rodrigo Campos wrote:
> >>>>     
> >>>>         
> >>>>> Hi,
> >>>>>
> >>>>> I have a process that runs many threads. One of the threads is created 
> by 
> >>>>>           
> >> a 
> >>     
> >>>>>       
> >>>>>           
> >>>> library it (dynamically) links to.
> >>>>     
> >>>>         
> >>>>> The process start running OK (pidin shows all threads) and it seems to 
> run
> >>>>>           
> >>  
> >>     
> >>>>>       
> >>>>>           
> >>>> OK until some point of time where suddenly some threads are not there. 
> >>>>         
> >> There 
> >>     
> >>>> are many threads that disappear (pidin does not show it) and, if it gives
>  
> >>>>         
> >> more
> >>     
> >>>>  information to anyone, the thread created by the library it links to is 
> 
> >>>>         
> >> gone 
> >>     
> >>>> too.
> >>>>     
> >>>>         
> >>>>> There are parts of the code that pthread_cancel() that threads, but I've
>  
> >>>>>       
> >>>>>           
> >>>> added prints (write + fsync) and is not being executed. So I *really* 
> don't
> >>>>         
> >>  
> >>     
> >>>> understand what could be happening to make the threads disappear.
> >>>>     
> >>>>         
> >>>>> Also, always the remaining threads are in "REPLY" state
> >>>>>
> >>>>> Does this rings any bell to any of you guys ? What can make a thread *
> >>>>>       
> >>>>>           
> >>>> disappear* ?
> >>>>     
> >>>>         
> >>>>> Is there something (I don't really know) to configure that makes a null 
> de
> >>>>>           
> >> -
> >>     
> >>>>>       
> >>>>>           
> >>>> reference...
Re: threads disappear in QNX 6.3.2  
> Hi,
> 
> I have a process that runs many threads. One of the threads is created by a 
> library it (dynamically) links to.
> The process start running OK (pidin shows all threads) and it seems to run OK 
> until some point of time where suddenly some threads are not there. There are 
> many threads that disappear (pidin does not show it) and, if it gives more 
> information to anyone, the thread created by the library it links to is gone 
> too.
> 
> There are parts of the code that pthread_cancel() that threads, but I've added
>  prints (write + fsync) and is not being executed. So I *really* don't 
> understand what could be happening to make the threads disappear.
> 
> Also, always the remaining threads are in "REPLY" state
> 
> Does this rings any bell to any of you guys ? What can make a thread *
> disappear* ?
> Is there something (I don't really know) to configure that makes a null de-
> reference instead of SEGFAULT all the process only a thread or something like 
> that ?
> Or some suggestion how to debug further this problem ?


Could be something QNX-specific that cause threads on "reply" state to be still there after a segfault too ?

I'll try to make a test-case, but some confirmation would be really nice =)




Thanks a lot,
Rodrigo