[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: ClhsdbCDSCore jtreg test fails on OSX
From: Leonid Mesnik <leonid.mesnik () oracle ! com>
Date: 2019-11-04 20:45:48
Message-ID: 641CC3AA-2038-4719-B072-23402EEC1370 () oracle ! com
[Download RAW message or body]
Good idea, filed RFE https://bugs.openjdk.java.net/browse/JDK-8233533 \
<https://bugs.openjdk.java.net/browse/JDK-8233533>
Leonid
> On Nov 4, 2019, at 11:06 AM, Ioi Lam <ioi.lam@oracle.com> wrote:
>
> Jaikiran,
>
> My /core dir is writable by root and admin users. I am running Mojave. Is your user \
> mac ID in the admin group?
> Also, do you have any issues with \
> test/hotspot/jtreg/serviceability/sa/TestJmapCore.java that also tests the use of \
> core files?
> Leonid,
>
> TestJmapCore.java and ClhsdbCDSCore.java seem to have duplicated code in finding \
> core files. Also, there's some partial logic for looking up core files under \
> test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java. Maybe these should be \
> consolidated into the test library?
> Thanks
> - Ioi
>
> On 11/4/19 9:46 AM, Leonid Mesnik wrote:
> > Hi
> >
> > The location of core files depends on system configuration. So test tries to find \
> > core files using test output and searching core files in current directory. See \
> > details here: http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l206 \
> > <http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l206>
> >
> > And only if test fails to find core file then it additionally tries to generate \
> > error/skip test checking system configuration.
> > The /cores directory usually available for all uses to dump cores like:
> > lmesnik@mymac:~/ws/ks-apps/open/test/lib$ ls -all /cores/
> > total 61448520
> > drwxrwxr-t 11 root admin 352 Sep 5 00:24 .
> > drwxr-xr-x 34 root wheel 1088 Oct 4 22:27 ..
> > -r-------- 1 lmesnik admin 2670608384 Aug 25 01:09 core.32410
> > ...
> >
> > If /cores doesn't have write permissions that it is one of possible reasons why \
> > test can't find core file and fails. It fails even without this check but just \
> > with different exception in \
> > http://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l135 \
> > <http://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l135>
> >
> > So I suggest you to check where core file is dumped actually, if it dumped and \
> > why test can't find it.
> > Leonid
> >
> > > On Nov 4, 2019, at 8:40 AM, Daniel D. Daugherty <daniel.daugherty@oracle.com \
> > > <mailto:daniel.daugherty@oracle.com>> wrote:
> > > Moving this thread over to serviceability-dev@... since this question is
> > > about Serviceability Agent tests... Bcc'ing hotspot-dev@... so folks know
> > > that the thread moved...
> > >
> > >
> > > On 11/4/19 9:49 AM, Jaikiran Pai wrote:
> > > > On 04/11/19 8:11 PM, Jaikiran Pai wrote:
> > > > > ...
> > > > > Looking at the testcase itself, I see this
> > > > > http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l112 \
> > > > > <http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l112>
> > > > >
> > > > > if (Platform.isOSX()) {
> > > > >
> > > > > File coresDir = new File("/cores");
> > > > >
> > > > > if (!coresDir.isDirectory() || !coresDir.canWrite()) {
> > > > >
> > > > > throw new Error("cores is not a directory or does not have write
> > > > > permissions");
> > > > >
> > > > >
> > > > > I'm on OSX. So this test expects a directory called "cores" at the root
> > > > > of the filesystem? That looks odd. I don't have any such directory.
> > > > Correction - I do have that directory (my "ls" command that I previously
> > > > used to check had a typo), but that /cores directory is owned by "root"
> > > > and the test is running as a regular user.
> > > >
> > > > -Jaikiran
> > >
> > > $ ls -ld /cores
> > > drwxrwxr-t 2 root admin 64 Nov 4 09:22 /cores/
> > >
> > > so the directory on my macOSX machine is writable by group 'admin'
> > > and my login happens to belong to group 'admin'.
> > >
> > > Dan
> >
>
[Attachment #3 (unknown)]
<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; line-break: after-white-space;" class="">Good idea, filed RFE <a \
href="https://bugs.openjdk.java.net/browse/JDK-8233533" \
class="">https://bugs.openjdk.java.net/browse/JDK-8233533</a><div class=""><br \
class=""></div><div class="">Leonid<br class=""><div><br class=""><blockquote \
type="cite" class=""><div class="">On Nov 4, 2019, at 11:06 AM, Ioi Lam <<a \
href="mailto:ioi.lam@oracle.com" class="">ioi.lam@oracle.com</a>> wrote:</div><br \
class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
Jaikiran,<br class="">
<br class="">
My /core dir is writable by root and admin users. I am running
Mojave. Is your user mac ID in the admin group?<br class="">
<br class="">
Also, do you have any issues with
test/hotspot/jtreg/serviceability/sa/TestJmapCore.java that also
tests the use of core files?<br class="">
<br class="">
Leonid,<br class="">
<br class="">
TestJmapCore.java and ClhsdbCDSCore.java seem to have duplicated
code in finding core files. Also, there's some partial logic for
looking up core files under
test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java. Maybe these
should be consolidated into the test library?<br class="">
<br class="">
Thanks<br class="">
- Ioi<br class="">
<br class="">
<div class="moz-cite-prefix">On 11/4/19 9:46 AM, Leonid Mesnik
wrote:<br class="">
</div>
<blockquote type="cite" \
cite="mid:EA442074-D578-4A42-A5BE-27861C87BE83@oracle.com" class=""> <meta \
http-equiv="Content-Type" content="text/html; charset=windows-1252" class="">
<div class="">Hi</div>
<div class=""><br class="">
</div>
<div class="">The location of core files depends on system
configuration. So test tries to find core files using test
output and searching core files in current directory. See
details here:</div>
<div class=""><a \
href="http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l206" \
class="" moz-do-not-send="true">http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l206</a><br \
class=""> <div class=""><br class="">
</div>
<div class="">And only if test fails to find core file then it
additionally tries to generate error/skip test checking system
configuration. </div>
<div class=""><br class="">
</div>
<div class="">The /cores directory usually available for all uses to dump
cores like:</div>
<div class="">
<div class="">lmesnik@mymac:~/ws/ks-apps/open/test/lib$ ls -all \
/cores/</div> <div class="">total 61448520</div>
<div class="">drwxrwxr-t 11 root admin \
352 Sep 5 00:24 .</div>
<div class="">drwxr-xr-x 34 root wheel \
1088 Oct 4 22:27 ..</div>
<div class="">-r-------- 1 lmesnik admin 2670608384 Aug \
25 01:09 core.32410</div>
</div>
<div class="">...</div>
<div class=""><br class="">
</div>
<div class="">If /cores doesn't have write permissions that it is one of
possible reasons why test can't find core file and fails. It
fails even without this check but just with different
exception in</div>
<div class=""><a \
href="http://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l135" \
class="" moz-do-not-send="true">http://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l135</a></div>
<div class=""><br class="">
</div>
<div class="">So I suggest you to check where core file is dumped
actually, if it dumped and why test can't find it. </div>
<div class=""><br class="">
</div>
<div class="">Leonid</div>
<div class=""><br class="">
</div>
<div class="">
<blockquote type="cite" class="">
<div class="">On Nov 4, 2019, at 8:40 AM, Daniel D.
Daugherty <<a href="mailto:daniel.daugherty@oracle.com" class="" \
moz-do-not-send="true">daniel.daugherty@oracle.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Moving this thread over to
serviceability-dev@... since this question is<br class="">
about Serviceability Agent tests... Bcc'ing
hotspot-dev@... so folks know<br class="">
that the thread moved...<br class="">
<br class="">
<br class="">
On 11/4/19 9:49 AM, Jaikiran Pai wrote:<br class="">
<blockquote type="cite" class="">On 04/11/19 8:11 PM,
Jaikiran Pai wrote:<br class="">
<blockquote type="cite" class="">...<br class="">
Looking at the testcase itself, I see this<br class="">
<a \
href="http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l112" \
class="" moz-do-not-send="true">http://hg.openjdk.java.net/jdk/jdk/file/6f98d0173a72/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java#l112</a><br \
class=""> <br class="">
if (Platform.isOSX()) {<br class="">
<br class="">
File coresDir = new File("/cores");<br \
class=""> <br class="">
if (!coresDir.isDirectory() ||
!coresDir.canWrite()) {<br class="">
<br class="">
throw new Error("cores \
is not a directory or does not have write<br class="">
permissions");<br class="">
<br class="">
<br class="">
I'm on OSX. So this test expects a directory called
"cores" at the root<br class="">
of the filesystem? That looks odd. I don't have any
such directory.<br class="">
</blockquote>
Correction - I do have that directory (my "ls" command
that I previously<br class="">
used to check had a typo), but that /cores directory
is owned by "root"<br class="">
and the test is running as a regular user.<br class="">
<br class="">
-Jaikiran<br class="">
</blockquote>
<br class="">
$ ls -ld /cores<br class="">
drwxrwxr-t 2 root admin 64 Nov 4 09:22 \
/cores/<br class=""> <br class="">
so the directory on my macOSX machine is writable by
group 'admin'<br class="">
and my login happens to belong to group 'admin'.<br class="">
<br class="">
Dan<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br class="">
</div>
</div></blockquote></div><br class=""></div></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic