RFR 9: 8133552 : java/lang/ProcessHandle/InfoTest.java fails intermittently - incorrect user

Volker Simonis volker.simonis at gmail.com
Wed Sep 9 15:46:35 UTC 2015

Hi Roger,

I think your change looks good and it surely improves the test
stability but I don't think it solves the problem in all cases.

I think this problem is caused by a <defunct> (i.e. "zombie") process
(the spawned process lived too short and was already a zombie when the
info object was created). If you look at the proc-file system entry of
a <defunct> process you can see that its 'cmdline' file has zero size
and the file is owned by root. This is exactly what is reported by the
corresponding info object in the bug report (user=root and no cmd

We may need to improve the way how we get the uid of a pid on Linux.
The current way of querying the owner of /proc/<pid>/cmdline seems to
be unreliable. We may instead take the owner of /proc/<pid> which
seems to be still the initial user of the process.


On Tue, Sep 8, 2015 at 11:35 PM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> With link to webrev corrected:
> On 9/8/2015 5:08 PM, Roger Riggs wrote:
>> Please review an intermittent test bug fix.
>> The test setup time is very short and the user may be returned as 0 which
>> is reported as root.
>> The correction lengthens the time allowed for the process to start.
>> The test is removed from the ProblemList.
>> Webrev:
>>    http://cr.openjdk.java.net/~rriggs//webrev-info-8133552
>> Bug:
>>   https://bugs.openjdk.java.net/browse/JDK-8133552
>> Thanks, Roger

More information about the core-libs-dev mailing list