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

Re: stress-ng process termination issue



Michael Kelly, le jeu. 07 août 2025 12:09:46 +0100, a ecrit:
> Anyway, the assertion in question occurs within
> glibc-2.41/sysdeps/mach/hurd/mig-reply.c:__mig_dealloc_reply_port(). Adding
> some debug to this code has shown that the existing thread local storage had
> a different port to that expected by the message header but that both are
> non-zero. I would think that it is more likely that the thread local storage
> is invalid rather than the message header but that remains to be seen.
> 
> I am posting this message really to see if anyone is aware of issues in the
> thread local storage code and whether anything similar has arisen before or
> indeed any other immediate thoughts as to where the root of the problem
> might be. Having looked at the 'tls' code I can see that any attempts to
> trace/debug this might be very difficult.

TLS code is really difficult to debug indeed. But I'd doubt that's the
issue, as it is largely used for many other cases, and the code is
actually very trivial: just reading/writing %gs:0x38.

And it's probably very easy for calls to __mig_get_reply_port() /
__mig_dealloc_reply_port () to get wrong with mismatched cleanup code,
e.g.

port = __mig_get_reply_port()
__mig_dealloc_reply_port(port);
port2 = __mig_get_reply_port()
__mig_dealloc_reply_port(port);

Samuel


Reply to: