Subject: [Boost-bugs] [Boost C++ Libraries] #3592: under_debugger() goes into infinite loop
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-05 14:49:00
#3592: under_debugger() goes into infinite loop
----------------------------------------+-----------------------------------
Reporter: a.sanders@⦠| Owner: rogeeff
Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: test
Version: Boost 1.40.0 | Severity: Problem
Keywords: |
----------------------------------------+-----------------------------------
In the under_debugger() function in debug.ipp there is the following loop:
-------------------------------------------
pid_t pid = ::getpid();
while( pid != 0 ) {
process_info pi( pid );
// !! ?? should we use tokenizer here instead?
if( dbg_list.find( pi.binary_name() ) != const_string::npos )
return true;
pid = pi.parent_pid();
}
---------------------------------------
The loop assumes it will eventually find a process who's parent
process id is zero. On our Solaris 10 systems (which is under Cluster
control) it eventually ends up at the zsched process who's parent pid is
the same as it's own pid. And so the loop never terminates.
$ ps -ef | grep zsched
root 2487 2487 0 Oct 13 ? 0:00 zsched
Output from running the Test executable under truss shows how it keeps
looping round on pid 2487.
If I run the Test executable from within gdb, then it runs okay and
under_debugger() doesn't go into an infinite loop.
Output from truss is attached.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3592> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC