[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: guarantee(PageArmed == 0) failed: invaliant
From:       Yasumasa Suenaga <yasuenag () gmail ! com>
Date:       2014-11-25 8:48:33
Message-ID: CAGFVN2AnNi-xreqoKXAAMm6jFg9OjjJ1zpXqnOD9XYCkGwjfRg () mail ! gmail ! com
[Download RAW message or body]

Hi David,
Thank you for details.

I can understand purpose for this guarantee.

I read hs_err again, I found thread which state is _thread_new .
I guess it is reason of this issue, but I cannot evaluate because core
image was not available.

If this crash will be reproduced, I will try check details.

Thanks,

Yasumasa
 2014/11/25 16:04 "David Holmes" <david.holmes@oracle.com>:

> Hi Yasumasa,
>
> On 25/11/2014 1:34 PM, Yasumasa Suenaga wrote:
> > Hi all,
> >
> > My customer encountered crash with below messages:
> > --------
> > Internal Error (safepoint.cpp:309)
> > guarantee(PageArmed == 0) failed: invaliant
> > --------
> >   - JDK: JDK6u37 x64
> >   -  OS: RHEL 5.4 x86_64
> >
> > I found similar issues in JBS:
> >   - JDK-7116986
> >   - JDK-7156454
> >   - JDK-8033717
> >
> > I read safepoint.cpp in jdk9, I guess this error is caused in below:
> > --------
> >       if (int(iterations) == DeferPollingPageLoopCount) {
> >          guarantee (PageArmed == 0, "invariant") ;
> >          PageArmed = 1 ;
> >          os::make_polling_page_unreadable();
> >       }
> > --------
> >
> > "iterations" is defined as "unsigned int", and increments in each loop.
> > On the other hand, DeferPollingPageLoopCount is defined intx and default
> > value is "-1" .
> >
> > "PageArmed" sets to 1.
> > --------
> >    if (DeferPollingPageLoopCount < 0) {
> >      // Make polling safepoint aware
> >      guarantee (PageArmed == 0, "invariant") ;
> >      PageArmed = 1 ;
> >      os::make_polling_page_unreadable();
> >    }
> > --------
> >
> >
> > If "iterations" is overflowed, do we encounter this guarantee ?
> > I think this "if" statement should rewrite as below:
>
> No we want this overflow to trigger the guarantee failure - it indicates
> a problem elsewhere in the VM because a thread is not reaching the
> safepoint that has been requested, in a timely manner.
>
> When crashes like this occur you need to examine all the running threads
> to find out which are not safepoint-safe and then determine what they
> are doing and why they have not performed a safepoint check.
>
> David
> ------
>
> > --------
> > diff -r 7e08ae41ddbe src/share/vm/runtime/safepoint.cpp
> > --- a/src/share/vm/runtime/safepoint.cpp      Mon Nov 24 09:57:02 2014
> +0100
> > +++ b/src/share/vm/runtime/safepoint.cpp      Tue Nov 25 12:19:58 2014
> +0900
> > @@ -288,7 +288,8 @@
> >         // 9. On windows consider using the return value from
> SwitchThreadTo()
> >         //    to drive subsequent spin/SwitchThreadTo()/Sleep(N)
> decisions.
> >
> > -      if (int(iterations) == DeferPollingPageLoopCount) {
> > +      if ((DeferPollingPageLoopCount >= 0) &&
> > +                  (int(iterations) == DeferPollingPageLoopCount)) {
> >            guarantee (PageArmed == 0, "invariant") ;
> >            PageArmed = 1 ;
> >            os::make_polling_page_unreadable();
> > --------
> >
> >
> > If it is correct, I will file it to JBS and upload webrev.
> > Could you help me to resolve this issue?
> >
> >
> > Thanks,
> >
> > Yasumasa
> >
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic