Harmony
  1. Harmony
  2. HARMONY-1752

Classlib luni test tests.api.java.net.InetAddressTest crashes test run

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      Windows 2003, Windows XP

      Description

      Two test cases from this test, test_isReachableI() and test_isReachableLjava_net_NetworkInterfaceII() influence in an obscure way the subsequent test packages run. If these tests are commented out, luni module succeeds, otherwise tests.api.java.util.ArraysTest which runs later crashes.

      I cannot give some more details, just observe a cause-effect relation.

      1. Harmony-1752.patch
        0.9 kB
        Ilya Okomin
      2. Harmony-1752-update.patch
        0.5 kB
        Ilya Okomin
      3. MinimalTest.java
        0.5 kB
        Ilya Okomin

        Issue Links

          Activity

          Hide
          Alexei Fedotov added a comment -

          [drlvm][unit] Blocks http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM

          This seems to be java.net issue.

          Show
          Alexei Fedotov added a comment - [drlvm] [unit] Blocks http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM This seems to be java.net issue.
          Hide
          Oleg Khaschansky added a comment -

          This issue is not reproducible with drlvm r454444.

          Show
          Oleg Khaschansky added a comment - This issue is not reproducible with drlvm r454444.
          Hide
          Paulex Yang added a comment -

          Elena, please to verify that if this issue still exists or not, thank you.

          Show
          Paulex Yang added a comment - Elena, please to verify that if this issue still exists or not, thank you.
          Hide
          Paulex Yang added a comment -

          Sorry I forgot to say: Thank you for looking at this, Oleg.

          Show
          Paulex Yang added a comment - Sorry I forgot to say: Thank you for looking at this, Oleg.
          Hide
          Elena Semukhina added a comment -

          I'm still able to reproduce the failure. I run tests on both Widows 2003 server and remote Windows XP. I tried them with the latest drlvm r463560 and with H-1816, 1823 applied. Below is the output; from the bottom lines it follows that crash happened on tests.api.java.util.ArraysTest:

          ....
          [junit] Tests run: 34, Failures: 0, Errors: 0, Time elapsed: 19.578 sec
          [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
          [junit] Tests run: 20, Failures: 0, Errors: 0, Time elapsed: 15.047 sec
          [junit] Tests run: 16, Failures: 3, Errors: 0, Time elapsed: 4.094 sec
          [junit] TEST tests.api.java.net.InetAddressTest FAILED
          [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
          [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0 sec
          [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.015 sec
          [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0.203 sec
          [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0 sec
          [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
          [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0 sec
          [junit] Tests run: 18, Failures: 0, Errors: 0, Time elapsed: 0.015 sec
          [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0 sec
          [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
          [junit] Tests run: 25, Failures: 0, Errors: 0, Time elapsed: 13.656 sec
          [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
          [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0 sec
          [junit] Tests run: 43, Failures: 0, Errors: 0, Time elapsed: 0.156 sec
          [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec
          [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
          [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 3.547 sec
          [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
          [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.015 sec
          [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.015 sec
          [junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed: 0.015 sec
          [junit] Tests run: 23, Failures: 0, Errors: 0, Time elapsed: 0.047 sec

          [junit] An unhandled error (4) has occurred.
          [junit] HyGeneric_Signal_Number=00000004
          [junit] ExceptionCode=c0000005
          [junit] ExceptionAddress=08EE3820
          [junit] ContextFlags=0001003f
          [junit] Handler1=00401010
          [junit] Handler2=11105CE0
          [junit] InaccessibleAddress=00000008
          [junit] EDI=0013E7E8
          [junit] ESI=00000000
          [junit] EAX=08EF17B0
          [junit] EBX=00000000
          [junit] ECX=08B552CC
          [junit] EDX=00000002
          [junit] EIP=08EE3820
          [junit] ESP=0013E500
          [junit] EBP=0013E5F4
          [junit] Module=
          [junit] Module_base_address=08E20000
          [junit] Offset_in_DLL=000c3820

          [junit] This application has requested the Runtime to terminate it in an unu
          sual way.
          [junit] Please contact the application's support team for more information.
          [junit] SEH handler: shutdown errorSEH handler: too many shutdown errorsSEH
          handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handle
          r: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too
          many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many
          shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdo
          wn errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown err
          orsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH
          handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handl
          er: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: to
          o many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many
          shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutd
          own errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown er
          rorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSE
          H handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH hand
          ler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: t
          oo many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too man
          y shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shut
          down errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown e
          rrorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsS
          EH handler: too many shutdown errors
          [junit] Tests FAILED

          touch-failures-file:

          touch-errors-file:

          test:

          gen-report:
          [junitreport] [Fatal Error] :-1:-1: Premature end of file.
          [junitreport] The file C:\users\esemukhi\svn\classlib\trunk\build\test_report\TE
          ST-tests.api.java.util.ArraysTest.xml is not a valid XML document. It is possibl
          y corrupted.
          [junitreport] Transform time: 6078ms
          [echo] The test report is in C:\users\esemukhi\svn\classlib\trunk\build\tes
          t_report\html\index.html

          check-test-result:

          BUILD FAILED

          Show
          Elena Semukhina added a comment - I'm still able to reproduce the failure. I run tests on both Widows 2003 server and remote Windows XP. I tried them with the latest drlvm r463560 and with H-1816, 1823 applied. Below is the output; from the bottom lines it follows that crash happened on tests.api.java.util.ArraysTest: .... [junit] Tests run: 34, Failures: 0, Errors: 0, Time elapsed: 19.578 sec [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Tests run: 20, Failures: 0, Errors: 0, Time elapsed: 15.047 sec [junit] Tests run: 16, Failures: 3, Errors: 0, Time elapsed: 4.094 sec [junit] TEST tests.api.java.net.InetAddressTest FAILED [junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0 sec [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.015 sec [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 0.203 sec [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0 sec [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0 sec [junit] Tests run: 18, Failures: 0, Errors: 0, Time elapsed: 0.015 sec [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0 sec [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Tests run: 25, Failures: 0, Errors: 0, Time elapsed: 13.656 sec [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0 sec [junit] Tests run: 43, Failures: 0, Errors: 0, Time elapsed: 0.156 sec [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 3.547 sec [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.016 sec [junit] Tests run: 6, Failures: 0, Errors: 0, Time elapsed: 0.015 sec [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.015 sec [junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed: 0.015 sec [junit] Tests run: 23, Failures: 0, Errors: 0, Time elapsed: 0.047 sec [junit] An unhandled error (4) has occurred. [junit] HyGeneric_Signal_Number=00000004 [junit] ExceptionCode=c0000005 [junit] ExceptionAddress=08EE3820 [junit] ContextFlags=0001003f [junit] Handler1=00401010 [junit] Handler2=11105CE0 [junit] InaccessibleAddress=00000008 [junit] EDI=0013E7E8 [junit] ESI=00000000 [junit] EAX=08EF17B0 [junit] EBX=00000000 [junit] ECX=08B552CC [junit] EDX=00000002 [junit] EIP=08EE3820 [junit] ESP=0013E500 [junit] EBP=0013E5F4 [junit] Module= [junit] Module_base_address=08E20000 [junit] Offset_in_DLL=000c3820 [junit] This application has requested the Runtime to terminate it in an unu sual way. [junit] Please contact the application's support team for more information. [junit] SEH handler: shutdown errorSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handle r: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdo wn errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown err orsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handl er: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: to o many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shutd own errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown er rorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsSE H handler: too many shutdown errorsSEH handler: too many shutdown errorsSEH hand ler: too many shutdown errorsSEH handler: too many shutdown errorsSEH handler: t oo many shutdown errorsSEH handler: too many shutdown errorsSEH handler: too man y shutdown errorsSEH handler: too many shutdown errorsSEH handler: too many shut down errorsSEH handler: too many shutdown errorsSEH handler: too many shutdown e rrorsSEH handler: too many shutdown errorsSEH handler: too many shutdown errorsS EH handler: too many shutdown errors [junit] Tests FAILED touch-failures-file: touch-errors-file: test: gen-report: [junitreport] [Fatal Error] :-1:-1: Premature end of file. [junitreport] The file C:\users\esemukhi\svn\classlib\trunk\build\test_report\TE ST-tests.api.java.util.ArraysTest.xml is not a valid XML document. It is possibl y corrupted. [junitreport] Transform time: 6078ms [echo] The test report is in C:\users\esemukhi\svn\classlib\trunk\build\tes t_report\html\index.html check-test-result: BUILD FAILED
          Hide
          Ilya Okomin added a comment -

          Elena, I couldn't reproduce VM crash on WinXP also.
          With and without commented test_isReachableI() and test_isReachableLjava_net_NetworkInterfaceII() the same number of tests failed to me on drlvm. I used drlvm r463170 without any other applied patches.

          Note: To run set of luni tests I had to exclude next tests:

          org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java
          org/apache/harmony/luni/tests/java/lang/ThreadTest.java

          Regards,
          Ilya.

          Show
          Ilya Okomin added a comment - Elena, I couldn't reproduce VM crash on WinXP also. With and without commented test_isReachableI() and test_isReachableLjava_net_NetworkInterfaceII() the same number of tests failed to me on drlvm. I used drlvm r463170 without any other applied patches. Note: To run set of luni tests I had to exclude next tests: org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java org/apache/harmony/luni/tests/java/lang/ThreadTest.java Regards, Ilya.
          Hide
          Ilya Okomin added a comment -

          I could reproduce this on Microsoft Windows Server 2003 with reduced user's rights.
          I prepared patch for this issue. This patch concerns hyluni.dll.
          After the hyluni.dll is re-built - mentioned tests passed for me without drlvm crash.

          Show
          Ilya Okomin added a comment - I could reproduce this on Microsoft Windows Server 2003 with reduced user's rights. I prepared patch for this issue. This patch concerns hyluni.dll. After the hyluni.dll is re-built - mentioned tests passed for me without drlvm crash.
          Hide
          Elena Semukhina added a comment -

          I tried the patch. You should rebuild both classlib and drlvm to see that it works.
          luni tests don't crash provided that the following is added to luni/build.xml:

          <exclude name="tests/api/java/io/PipedInputStreamTest.java" />
          (HARMONY-1699 )
          <exclude name="org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java" />
          (HARMONY-1675)

          Show
          Elena Semukhina added a comment - I tried the patch. You should rebuild both classlib and drlvm to see that it works. luni tests don't crash provided that the following is added to luni/build.xml: <exclude name="tests/api/java/io/PipedInputStreamTest.java" /> ( HARMONY-1699 ) <exclude name="org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java" /> ( HARMONY-1675 )
          Show
          Alexei Fedotov added a comment - Patch is good. Here is a review: http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3c8E389A5F2FEABA4CB1DEC35A25CB39CE5E43CD@mssmsx411%3e
          Hide
          Ilya Okomin added a comment -

          More elegant solution, that I like better.
          The aim is the same to avoid freeing of the non-null pointer.

          Tests passes for me without crash on DRLVM with this patch.

          Show
          Ilya Okomin added a comment - More elegant solution, that I like better. The aim is the same to avoid freeing of the non-null pointer. Tests passes for me without crash on DRLVM with this patch.
          Hide
          Paulex Yang added a comment -

          Still reproducible.

          Show
          Paulex Yang added a comment - Still reproducible.
          Hide
          Paulex Yang added a comment -

          Ilya, would you tell me how did run the tests on DRLVM? I still got vm crash on XP with the patch.

          This is my procedure:
          1. ant rebuild on classlib/trunk
          2. remove drlvm/trunk/build/win_ia32_msvc_debug
          3. run build.bat to build drlvm
          4. update build.xml in classlib/trunk/modules/luni to include tests/api/java/net/InetAddressTest only
          5. in classlib/trunk, run ant -Dbuild.module=luni -Dtest.jre.home=<DRLVM home> test
          and I got error message like below:

          "SEH handler: shutdown errorSEH handler: too many shutdown error...."

          The test report xml for InetAddressTest is empty.

          Anything I missed?

          Show
          Paulex Yang added a comment - Ilya, would you tell me how did run the tests on DRLVM? I still got vm crash on XP with the patch . This is my procedure: 1. ant rebuild on classlib/trunk 2. remove drlvm/trunk/build/win_ia32_msvc_debug 3. run build.bat to build drlvm 4. update build.xml in classlib/trunk/modules/luni to include tests/api/java/net/InetAddressTest only 5. in classlib/trunk, run ant -Dbuild.module=luni -Dtest.jre.home=<DRLVM home> test and I got error message like below: "SEH handler: shutdown errorSEH handler: too many shutdown error...." The test report xml for InetAddressTest is empty. Anything I missed?
          Hide
          Ilya Okomin added a comment -

          Paulex, it sounds strange, test with fix also passed for Elena.
          I'll check it again and write down steps to produce.

          Note: I hadn't troubles on my local WinXP, only on Win Server2003.

          Show
          Ilya Okomin added a comment - Paulex, it sounds strange, test with fix also passed for Elena. I'll check it again and write down steps to produce. Note: I hadn't troubles on my local WinXP, only on Win Server2003.
          Hide
          Ilya Okomin added a comment -

          Paulex, I've done all steps you've described...even more, I made it from scratch (getting classlib and drlvm to the new place).
          What was done else : exlcuded test "org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java"

          Results:
          On Win Server 2003 [luni] tests crashed DRLVM without my patch and they passed after I applied patch and followed your steps.

          On my WinXP machine tests passed even without patch (as it was before).

          Please try minimal test case from attach that crashed VM for me on win 2003 server.
          It should work without error messages if the problem is fixed. (For me it works only with applied patch).
          What else, could you please send your WinXP configuration? May be it will help.

          Show
          Ilya Okomin added a comment - Paulex, I've done all steps you've described...even more, I made it from scratch (getting classlib and drlvm to the new place). What was done else : exlcuded test "org/apache/harmony/luni/tests/java/lang/ThreadGroupTest.java" Results: On Win Server 2003 [luni] tests crashed DRLVM without my patch and they passed after I applied patch and followed your steps. On my WinXP machine tests passed even without patch (as it was before). Please try minimal test case from attach that crashed VM for me on win 2003 server. It should work without error messages if the problem is fixed. (For me it works only with applied patch). What else, could you please send your WinXP configuration? May be it will help.
          Hide
          Paulex Yang added a comment -

          Ilya, the problem disappears when I checkout DRLVM codes and rebuild again, perhaps there is something wrong in my formal working copy. Sorry for the delay. The patch is applied at revision r471803, thank you for this enhancement.

          Elena, please verify the problem is fully resolved. Thank you.

          Show
          Paulex Yang added a comment - Ilya, the problem disappears when I checkout DRLVM codes and rebuild again, perhaps there is something wrong in my formal working copy. Sorry for the delay. The patch is applied at revision r471803, thank you for this enhancement. Elena, please verify the problem is fully resolved. Thank you.
          Hide
          Elena Semukhina added a comment -

          Yes, the problem is fully resolved. The luni module does not crash anymore. Thank everyone!

          Show
          Elena Semukhina added a comment - Yes, the problem is fully resolved. The luni module does not crash anymore. Thank everyone!
          Hide
          Ilya Okomin added a comment -

          Paulex, glad to see that everything works for you now.
          Patch applied as expected, thanks.

          Show
          Ilya Okomin added a comment - Paulex, glad to see that everything works for you now. Patch applied as expected, thanks.
          Hide
          Mark Hindess added a comment -

          Closing as this has been fixed and verified.

          Show
          Mark Hindess added a comment - Closing as this has been fixed and verified.

            People

            • Assignee:
              Paulex Yang
              Reporter:
              Elena Semukhina
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development