Hi Roger, looks good now.
Thanks, Volker On Thu, Sep 10, 2015 at 7:03 PM, Roger Riggs <roger.ri...@oracle.com> wrote: > Hi Volker, > > Thanks for the review, I added the code you provided to use the correct > length. > > Updated the webrev: > http://cr.openjdk.java.net/~rriggs/webrev-info-8133552/ > > Roger > > > > On 9/10/2015 11:52 AM, Volker Simonis wrote: > > On Wed, Sep 9, 2015 at 11:49 PM, Roger Riggs <roger.ri...@oracle.com> wrote: > > Hi, > > Please review this update to extract the uid on from the owner of the > /proc/<pid> file. > It should be more reliable than using the owner of the /proc/<pid>/cmdline > file. > > Webrev: > http://cr.openjdk.java.net/~rriggs/webrev-info-8133552/ > > Hi Roger, > > the change looks good. I've only found one little problem: > > In: > > strncat(fn, "/cmdline", sizeof fn); > > 'fn' is not empty any more, so I think it should read: > > strncat(fn, "/cmdline", sizeof fn - strnlen(fn, sizeof fn) - 1); > > Also, increasing the timeout to 30 sec is reasonable. > > Thank you and best regards, > Volker > > Thanks, Roger > > > > On 9/9/2015 12:56 PM, Roger Riggs wrote: > > Hi Volker, > > Thanks for the review and diagnosis. > > Can opening /proc/pid be used as a fallback if the st_uid is zero or > is it worth the overhead of stat'ing /proc/pid always? > > Thanks, Roger > > > On 9/9/2015 11:46 AM, Volker Simonis wrote: > > 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 > field). > > 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. > > Regards, > Volker > > > On Tue, Sep 8, 2015 at 11:35 PM, Roger Riggs <roger.ri...@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 > >