Harmony
  1. Harmony
  2. HARMONY-2070

[drlvm][thread] Unhandled exception in java.exe while java.util.jar module tests execution

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      WIN XP, msvc, debug

      Description

      While execution tests for archive module:

      ant -Dtest.jre.home=<PATH TO win_ia32_msvc_release/deploy/jre> -Dbuild.module=archive

      runtime sporadically terminates (1 time out of ~4) with one of errors:

      1. java.exe - Application error

      When debugging the message and stack are available:

      Unhandled exception at 0x7c964ed1 in java.exe: 0xC0000008: An invalid HANDLE was specified.

      address :7c964ed1 < it points to leave>

      7C964EA8 nop
      7C964EA9 nop
      7C964EAA nop
      7C964EAB mov edi,edi
      7C964EAD push ebp
      7C964EAE mov ebp,esp
      7C964EB0 sub esp,50h
      7C964EB3 mov eax,dword ptr [ebp+8]
      7C964EB6 and dword ptr [ebp-48h],0
      7C964EBA and dword ptr [ebp-40h],0
      7C964EBE mov dword ptr [ebp-50h],eax
      7C964EC1 lea eax,[ebp-50h]
      7C964EC4 push eax
      7C964EC5 mov dword ptr [ebp-4Ch],1
      7C964ECC call 7C90EBAC
      7C964ED1 leave
      7C964ED2 ret 4
      7C964ED5 nop
      7C964ED6 nop
      7C964ED7 nop
      7C964ED8 nop
      7C964ED9 nop
      7C964EDA mov edi,edi
      7C964EDC push ebp
      7C964EDD mov ebp,esp
      7C964EDF push ebx
      7C964EE0 push esi
      7C964EE1 mov esi,dword ptr [ebp+8]
      7C964EE4 mov eax,dword ptr [esi]
      7C964EE6 imul eax,eax,7FFFFFEDh
      7C964EEC push edi
      7C964EED mov ecx,7FFFFFC3h
      7C964EF2 add eax,ecx
      7C964EF4 mov edi,7FFFFFFFh
      7C964EF9 xor edx,edx
      7C964EFB mov ebx,edi
      7C964EFD div eax,ebx
      7C964EFF mov ebx,edx
      7C964F01 mov eax,edx
      7C964F03 imul eax,eax,7FFFFFEDh
      7C964F09 add eax,ecx
      7C964F0B xor edx,edx
      7C964F0D div eax,edi
      7C964F0F pop edi

      2. sometimes it fails with

      [junit] FinalizerThread: FinalizerThread terminated by java.lang.InternalErr
      or: Thread Manager internal error 720006
      [junit] Uncaught exception in FinalizerThread:
      [junit] java.lang.RuntimeException: FinalizerThread interrupted
      [junit] at java.lang.FinalizerThread.run(Unknown Source)
      [junit] Caused by: java.lang.InternalError: Thread Manager internal error 72
      0006
      [junit] at java.lang.Object.notify(Unknown Source)
      [junit] ... 1 more

      see also http://issues.apache.org/jira/browse/HARMONY-1845

      3. or just hangs

      Unfortunally I was not managed to reproduce the situation with short reproducer.
      I've run only java.util.jar tests, other - excluded:
      <exclude name="org/apache/harmony/archive/tests/internal/pack200/*.java" />
      <exclude name="org/apache/harmony/archive/tests/java/util/zip/*.java" />

        Activity

        Hide
        Gregory Shimansky added a comment -

        Closed. Looks like the problem has died of the old age.

        Show
        Gregory Shimansky added a comment - Closed. Looks like the problem has died of the old age.
        Hide
        tatyana doubtsova added a comment -

        The failure is not reproducible for me on svn=r479950

        Show
        tatyana doubtsova added a comment - The failure is not reproducible for me on svn=r479950
        Hide
        Gregory Shimansky added a comment -

        Ok I'll close it if I don't hear any arguments for a day.

        Show
        Gregory Shimansky added a comment - Ok I'll close it if I don't hear any arguments for a day.
        Hide
        Alexei Fedotov added a comment -

        Let me summarize: the issue should be closed - it cannot be reproduced by three independent engineers.

        Show
        Alexei Fedotov added a comment - Let me summarize: the issue should be closed - it cannot be reproduced by three independent engineers.
        Hide
        Alexei Fedotov added a comment -

        The failure I mentioned in the previous comment was a duplicate of HARMONY-2285. Currently, no failures were resproduced in the module during >50 test runs.

        Show
        Alexei Fedotov added a comment - The failure I mentioned in the previous comment was a duplicate of HARMONY-2285 . Currently, no failures were resproduced in the module during >50 test runs.
        Hide
        Alexei Fedotov added a comment -

        I can reproduce failures on Windows 2003 server. Hope will have permissions to debug soon.

        Show
        Alexei Fedotov added a comment - I can reproduce failures on Windows 2003 server. Hope will have permissions to debug soon.
        Hide
        Salikh Zakirov added a comment -

        The possible reason for "Thread Manager internal error 720006" is attempt to send event, that was already destroyed.
        As far as I was able to track it, the only place that causes conditional variables/events destroyed is hythread_destroy_lib(),
        which is currently completely commented out, as the launcher expects the hythread to be fully functional even after
        it destroys the VM. (portlib shutdown sequence involves grabbing locks).

        The above leads me to believe that the idea of combining a low-level threadling library together with a high-level java library
        is somewhat moot.

        Show
        Salikh Zakirov added a comment - The possible reason for "Thread Manager internal error 720006" is attempt to send event, that was already destroyed. As far as I was able to track it, the only place that causes conditional variables/events destroyed is hythread_destroy_lib(), which is currently completely commented out, as the launcher expects the hythread to be fully functional even after it destroys the VM. (portlib shutdown sequence involves grabbing locks). The above leads me to believe that the idea of combining a low-level threadling library together with a high-level java library is somewhat moot.
        Hide
        Salikh Zakirov added a comment -

        I wasn't able to reproduce the issue. I suspect that it could have been fixed by HARMONY-2006 commit, because the shutdown sequence has been changed,
        and finalization at exit is no longer called as one of the shutdown hooks. Instead, finalization on exit is handled after all other shutdown hooks.

        I would suggest to close this issue as "not reproducible" and report a new issue (with a new reproducer) if the new reproducer will be found.

        Show
        Salikh Zakirov added a comment - I wasn't able to reproduce the issue. I suspect that it could have been fixed by HARMONY-2006 commit, because the shutdown sequence has been changed, and finalization at exit is no longer called as one of the shutdown hooks. Instead, finalization on exit is handled after all other shutdown hooks. I would suggest to close this issue as "not reproducible" and report a new issue (with a new reproducer) if the new reproducer will be found.
        Hide
        Alexei Fedotov added a comment -

        Tatiana,
        I cannot reproduce failures in archieve module: please, check http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM#reliability
        Can this bug be closed as not reproducible anymore?

        See also http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM

        Show
        Alexei Fedotov added a comment - Tatiana, I cannot reproduce failures in archieve module: please, check http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM#reliability Can this bug be closed as not reproducible anymore? See also http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM
        Hide
        Rana Dasgupta added a comment -

        Sadly, I cannot repro it even without 2018 patch ( either in kernel test or running archive module test as described here ) on XP Professional SP2. So I cannot conclude that it is fixed by 2018. Reading 2018 patch, it seemed to me that the issue was related. Let's keep 2070 open since > 1 person sees this happening.

        Show
        Rana Dasgupta added a comment - Sadly, I cannot repro it even without 2018 patch ( either in kernel test or running archive module test as described here ) on XP Professional SP2. So I cannot conclude that it is fixed by 2018. Reading 2018 patch, it seemed to me that the issue was related. Let's keep 2070 open since > 1 person sees this happening.
        Hide
        Gregory Shimansky added a comment -

        I've successfully reproduced the same bug with patch from HARMONY-2018 on windows XP:

        [echo] RUNNING : java.lang.RuntimeTest2
        [junit] Uncaught exception in Thread-shutdown:
        [junit] java.lang.InternalError: Thread Manager internal error 720006
        [junit] at java.lang.Object.notifyAll(Unknown Source)
        [junit] at java.lang.FinalizerThread.wakeupFinalization(Unknown Source)
        [junit] at java.lang.FinalizerThread.startFinalization(Unknown Source)
        [junit] at java.lang.FinalizerThread.doFinalizationOnExit(Unknown Source)
        [junit] at java.lang.FinalizerThread.shutdown(Unknown Source)
        [junit] at java.lang.VMStart$DefaultShutDownHook.run(Unknown Source)

        Show
        Gregory Shimansky added a comment - I've successfully reproduced the same bug with patch from HARMONY-2018 on windows XP: [echo] RUNNING : java.lang.RuntimeTest2 [junit] Uncaught exception in Thread-shutdown: [junit] java.lang.InternalError: Thread Manager internal error 720006 [junit] at java.lang.Object.notifyAll(Unknown Source) [junit] at java.lang.FinalizerThread.wakeupFinalization(Unknown Source) [junit] at java.lang.FinalizerThread.startFinalization(Unknown Source) [junit] at java.lang.FinalizerThread.doFinalizationOnExit(Unknown Source) [junit] at java.lang.FinalizerThread.shutdown(Unknown Source) [junit] at java.lang.VMStart$DefaultShutDownHook.run(Unknown Source)
        Hide
        Gregory Shimansky added a comment -

        I regularly see this exception on Windows XP (not on windows 2003 server) when running kernel tests. It doesn't happen 100% of time, but it is quite reproducible.

        Are you sure the problem is the same as in HARMONY-2018? I'll check on WinXP right now. If it helps, I'll close this issue as a dup. Unfortunately HARMONY-2018 doesn't work perfectly on Linux, so I cannot apply the patch in it right now.

        Show
        Gregory Shimansky added a comment - I regularly see this exception on Windows XP (not on windows 2003 server) when running kernel tests. It doesn't happen 100% of time, but it is quite reproducible. Are you sure the problem is the same as in HARMONY-2018 ? I'll check on WinXP right now. If it helps, I'll close this issue as a dup. Unfortunately HARMONY-2018 doesn't work perfectly on Linux, so I cannot apply the patch in it right now.
        Hide
        Rana Dasgupta added a comment -

        The needed test is in issue # 2018. We can make this issue a dup of 2018

        Show
        Rana Dasgupta added a comment - The needed test is in issue # 2018. We can make this issue a dup of 2018
        Hide
        Rana Dasgupta added a comment -

        I tried running the archive module tests with today's build 20 times in a row, but could not reproduce these failures. We should watch for a week and if the bug does not repro, close this. This does not mean that the VM crash never happens, just that we need a better test that repros more often.

        Show
        Rana Dasgupta added a comment - I tried running the archive module tests with today's build 20 times in a row, but could not reproduce these failures. We should watch for a week and if the bug does not repro, close this. This does not mean that the VM crash never happens, just that we need a better test that repros more often.
        Hide
        Pavel Pervov added a comment -

        I had the same issue (1) when running java.lang.RuntimeTest2 two days ago. But the next day this failure disappeared.
        I spend all that day trying to identify the source of this issue, but failed.

        Show
        Pavel Pervov added a comment - I had the same issue (1) when running java.lang.RuntimeTest2 two days ago. But the next day this failure disappeared. I spend all that day trying to identify the source of this issue, but failed.
        Hide
        tatyana doubtsova added a comment -

        All of 3 mentioned above types of error are reproducible in default, Xem:jet, Xem:opt modes

        Show
        tatyana doubtsova added a comment - All of 3 mentioned above types of error are reproducible in default, Xem:jet, Xem:opt modes

          People

          • Assignee:
            Gregory Shimansky
            Reporter:
            tatyana doubtsova
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development