<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in Makefile</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>df4ad362 - [lldb/linux] Fix a race in handling of simultaneous thread exits</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/lldb/test/API/functionalities/thread/concurrent_events/exit/Makefile#df4ad362</link>
        <description>[lldb/linux] Fix a race in handling of simultaneous thread exitsD116372, while fixing one kind of a race, ended up creating a new one.The new issue could occur when one inferior thread exits while anotherthread initiates termination of the entire process (exit_group(2)).With some bad luck, we could start processing the exit notification(PTRACE_EVENT_EXIT) only to have the become unresponsive (ESRCH) in themiddle of the MonitorCallback function. This function would then deletethe thread from our list even though it wasn&apos;t completely dead (it stayszombified until we read the WIFEXITED event). The linux kernel will notdeliver the exited event for the entire process until we processindividual thread exits.In a pre-D116372 world, this wouldn&apos;t be a problem because we would readthis event (even though we would not know what to do with it) withwaitpid(-1). Now, when we issue invididual waitpids, this event willnever be picked up, and we end up hanging.The fix for this is actually quite simple -- don&apos;t delete the thread inthis situation. The thread will be deleted when the WIFEXITED eventcomes.This situation was kind of already tested byTestCreateDuringInstructionStep (which is how I found this problem), butit was mostly accidental, so I am also creating a dedicated test whichreproduces this situation.

            List of files:
            /llvm-project-15.0.7/lldb/test/API/functionalities/thread/concurrent_events/exit/Makefile</description>
        <pubDate>Wed, 05 Jan 2022 12:04:20 +0000</pubDate>
        <dc:creator>Pavel Labath &lt;pavel@labath.sk&gt;</dc:creator>
    </item>
</channel>
</rss>
