Boost C++ Libraries: Ticket #3495: Boost::Test enters endless loop when running in vserver environment https://svn.boost.org/trac10/ticket/3495 <p> Boost::Test tries to find out if a debugger is attached by iterating through the process tree until ppid 0 is reached. Some vserver kernel emulate the init process in a way that ppid of process 1 is 1. This lets the debugger search function go into an endless loop. </p> <p> Since pid 1 is unlikely to be a debugger, we can safely ignore pid 1 and just quit searching when we reach pid 1 instead of 0. The attached patch implements this. </p> <p> We observed this bug with standard Debian Lenny vserver host (linux-image-2.6.26-2-vserver-amd64, version 2.6.26-19) running Debian Lenny guest and Centos 5 guest. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3495 Trac 1.4.3 Eduard Hein <eduard_hein@…> Tue, 29 Sep 2009 07:12:30 GMT attachment set https://svn.boost.org/trac10/ticket/3495 https://svn.boost.org/trac10/ticket/3495 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-1.35.0-ppid-endless-loop.patch</span> </li> </ul> Ticket Eduard Hein <eduard_hein@…> Tue, 29 Sep 2009 07:14:07 GMT cc set https://svn.boost.org/trac10/ticket/3495#comment:1 https://svn.boost.org/trac10/ticket/3495#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">eduard_hein@…</span> added </li> </ul> Ticket root@… Thu, 01 Oct 2009 14:23:39 GMT <link>https://svn.boost.org/trac10/ticket/3495#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3495#comment:2</guid> <description> <p> Just ignoring 1 won't be enough since on Solaris-Containers pid of init can be any number. See Bug <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3481" title="#3481: Bugs: Boost Testing doesn't work under Sun Solaris Containers (closed: fixed)">#3481</a> You have to check for pid == ppid and then abort. </p> <p> Cheers Ranko Veselinovic </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gennadiy Rozental</dc:creator> <pubDate>Sun, 22 Nov 2009 21:57:06 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3495#comment:3 https://svn.boost.org/trac10/ticket/3495#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57850" title="Handles the case where parent pid == process pid and != 0. Fixes ...">[57850]</a>) Handles the case where parent pid == process pid and != 0. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3495" title="#3495: Bugs: Boost::Test enters endless loop when running in vserver environment (closed: fixed)">#3495</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3481" title="#3481: Bugs: Boost Testing doesn't work under Sun Solaris Containers (closed: fixed)">#3481</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3592" title="#3592: Bugs: under_debugger() goes into infinite loop (closed: fixed)">#3592</a> </p> Ticket Raffi Enficiaud Tue, 07 Jul 2015 08:05:25 GMT milestone changed https://svn.boost.org/trac10/ticket/3495#comment:4 https://svn.boost.org/trac10/ticket/3495#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.41.0</span> → <span class="trac-field-new">Boost 1.59.0</span> </li> </ul> Ticket