Bernhard Duebi wrote, On 7.9.2009 22:06:
Hello,
I'm not a programmer, I'm only a system engineer, so please be gentle.
One of our code producers compiled boost in a Solaris Zone/Container using SUN Studio. For testing he used a program called test. I guess it is part of the distribution. It tests if 2+2==4 with different calls to boost. The test program runs on real machines, but not in Containers.
Looking at the output of truss I found a probable cause. The program climbs up the process tree using the proc filesystem until it reaches the root of the tree. In a real machine the init process has PID 1 and this seems the sign for the program to stop climbing. In a Container the zsched process has a random PID and its PPID is the same as the PID. This leads to an endless loop.
In the test.cpp file there is not much code besides the add function and some calls to the boost library. So, I guess the process tree walk is done somewhere in the boost library. My fellow co-worker denies this strictly.
As we both have no clue about boost, I want to ask you to sched some light on this incident. - Is it possible that boost does that process tree walk ? - Is this a known problem ? - Are there any hints how to solve this problem ?
I talked to SUN and they say it's not their problem. There is no official whitepaper that requires that the init process always has PID 1. Having the testcase or at least a list of libraries and the Boost calls it uses would make it a lot easier to diagnose this.
-- VH