#3592 closed Bugs (fixed)
under_debugger() goes into infinite loop
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | Boost 1.59.0 | Component: | test |
Version: | Boost 1.40.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Attachments (1)
Change History (3)
by , 13 years ago
Attachment: | test-truss.txt added |
---|
comment:1 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Milestone: | Boost 1.41.0 → Boost 1.59.0 |
---|
output from running Test executable under truss