Re: [rvm-research] Data collection got destroyed before shutdown hooks finish
Kenan Liu <[email protected]> Thu, 11 Apr 2019 17:38:53 -0700
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <CA+qhk+o6yimQ6JTQPR35iEPJRA0WBb+P69HfY9b=og6Of+CQXw@mail.gmail.com> |
--===============3905855418417570161== Content-Type: multipart/alternative; boundary="00000000000099297505864a874b" --00000000000099297505864a874b Content-Type: text/plain; charset="UTF-8" Hi Erik, Thank you for the response. It is the case you mentioned "Another possibility is that it's not really a NullPointerException but an invalid memory access. Jikes RVM converts all segmentation faults to NullPointerExceptions." The issue has been resolved:) Thanks, Kenan On Sat, Mar 30, 2019 at 2:05 AM Erik Brangs <[email protected]> wrote: > Hi, > > On 28.03.19 09:19, Kenan Liu wrote: > > I asked the similar question before. Our problem was populate all data > we collected in the end of VM execution so that we can make sure those I/O > operations would not affect the Jikesrvm behaviours. > > > > At that time Erik Brangs suggested to use shutdown hooks to print out > the data. It worked (thanks!) until we increased the size of data to more > than 20 thousand entries in an arraylist. > > > > Right now we got around 50 thousand entries of arraylist and write it to > a file using shutdown hook, but I always get an NullPointerError for the > arraylist I created after around 15 thousand entries got printed. > > > > I learned shutdown hooks would only be stopped in some certain cases via > signal like /user requesting a termination (Ctrl+C), a SIGTERM being issued > by O/S (normal kill command, without -9), or when the operating system is > shutting down/ I don't think it belongs to any one of these cases. > > > > If there is any place in JikesRVM would send terminate signal if the > shutdown procedure exceeds certain time limit? Or if there is a forced GC > cycles (or something similar) during VM shutdown time? > > > > I have no clue why it would happen. It would be nice If there is a way > to trace the object gets destroyed. > > If you're using normal Java-level objects (as opposed to unboxed types), > the object should not get collected while it's alive. You can check if any > GCs happen by using the -verbose:gc command line argument. > > Another possibility is that it's not really a NullPointerException but an > invalid memory access. Jikes RVM converts all segmentation faults to > NullPointerExceptions. > > There are also some opt compiler bugs that manifest as > NullPointerExceptions. > > It's hard to say anything more concrete without seeing the code. > > > Kind regards, > > Erik Brangs > > > _______________________________________________ > Jikesrvm-researchers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers > -- Kenan Liu PhD Candidate in Computer Science SUNY Binghamton --00000000000099297505864a874b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div>Hi Erik,</div><div><br></div><div>Th= ank you for the response. It is the case you mentioned "<span style=3D= "font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,= 34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decorati= on:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust= :none;font-stretch:normal;float:none;background-color:rgb(255,255,255)">Ano= ther possibility is that it's not really a NullPointerException but an = invalid memory access. Jikes RVM converts all segmentation faults to NullPo= interExceptions.</span>"</div><div><br></div><div>The issue has been r= esolved:)</div><div><br></div><div>Thanks,</div><div>Kenan</div></div></div= ><br><div class=3D"gmail_quote"><div class=3D"gmail_attr" dir=3D"ltr">On Sa= t, Mar 30, 2019 at 2:05 AM Erik Brangs <<a href=3D"mailto:erik.brangs@gm= x.de">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail= _quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-colo= r:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Hi,<br> <br> On 28.03.19 09:19, Kenan Liu wrote:<br> > I asked the similar question before. Our problem was populate all data= we collected in the end of VM execution so that we can make sure those I/O= operations would not affect the Jikesrvm behaviours.<br> ><br> > At that time Erik Brangs suggested to use shutdown hooks to print out = the data. It worked (thanks!) until we increased the size of data to more t= han 20 thousand entries in an arraylist.<br> ><br> > Right now we got around 50 thousand entries of arraylist and write it = to a file using shutdown hook, but I always get an NullPointerError for the= arraylist I created after around 15 thousand entries got printed.<br> ><br> > I learned shutdown hooks would only be stopped in some certain cases v= ia signal like /user requesting a termination (Ctrl+C), a SIGTERM being iss= ued by O/S (normal kill command, without -9), or when the operating system = is shutting down/ I don't think it belongs to any one of these cases.<b= r> ><br> > If there is any place in JikesRVM would send terminate signal if the s= hutdown procedure exceeds certain time limit? Or if there is a forced GC cy= cles (or something similar) during VM shutdown time?<br> ><br> > I have no clue why it would happen. It would be nice If there is a way= to trace the object gets destroyed.<br> <br> If you're using normal Java-level objects (as opposed to unboxed types)= , the object should not get collected while it's alive. You can check i= f any GCs happen by using the -verbose:gc command line argument.<br> <br> Another possibility is that it's not really a NullPointerException but = an invalid memory access. Jikes RVM converts all segmentation faults to Nul= lPointerExceptions.<br> <br> There are also some opt compiler bugs that manifest as NullPointerException= s.<br> <br> It's hard to say anything more concrete without seeing the code.<br> <br> <br> Kind regards,<br> <br> Erik Brangs<br> <br> <br> _______________________________________________<br> Jikesrvm-researchers mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_bl= ank">[email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/jikesrvm-researcher= s" target=3D"_blank" rel=3D"noreferrer">https://lists.sourceforge.net/lists= /listinfo/jikesrvm-researchers</a><br> </blockquote></div><br clear=3D"all"><br>-- <br><div class=3D"gmail_signatu= re" dir=3D"ltr"><div dir=3D"ltr"><div><div>Kenan Liu<br></div>PhD Candidate= in Computer Science<br></div>SUNY Binghamton<br></div></div> --00000000000099297505864a874b-- --===============3905855418417570161== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============3905855418417570161== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers --===============3905855418417570161==--