nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-nuttx] patacongo edited a comment on issue #3868: Assertion failed at file:tls/tls_getset.c line: 59
Date Tue, 08 Jun 2021 16:31:52 GMT

patacongo edited a comment on issue #3868:

   it does look like the main thread has exited or that the tg_pid is not valid for some reason.
 The tg_pid is set when the task group is create and is never changed until the task group
is de-allocated.  So until there is a wild write, I would expect the tg_pid to be valid. 
The more likely thing is that the main thread has exited.
   That is really very likely under circumstances.  pthreads are not really canceled on exit()
in deferred cancellation mode:  They may only be marked as deleted and will continue to run
until the thread calls a cancellation point.  That could be some time later.  Meanwhile, the
main thread could exit couldn't it.
   Or if a pthread is waiting on a semaphore and cancelled, but the OS logic ignores the ECANCELED
error, then the pthread will never exit will never exit.
   In either case, in these states tg_pid will be valid, but nxsched_get_tcb() will fail.
 Perhaps there is some kind of protection that I do not see, but I think this could happen
in normal operation, couldn't it?  If so, then one solution would be to remove the assertion.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message