Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#135 Crashing bug

Version 2.1.4
closed-fixed
nobody
JaCoCo (32)
7
2012-08-17
2012-08-01
Derek
No

With the last 2 releases (so starting in 0.5.8) we've been hitting a crashing bug in which garbage collection operations seem to cause a crash of the JVM. This only seems to occur with coverage enabled (so not when running under the debugger or normally). This also does not reproduce with versions of JaCoCo prior to the last 2. Sorry I don't have more information - I'm trying to narrow down some repro steps but this bug only reproduces for one of our larger tests suites so that would be a lot of code to get running. I've tried playing around with the memory settings and even with a lot of perm-gen and heap memory the issue still reproduces. I've also tried Java 6 and 7 and both reproduce the issue as well.

Discussion

  • Derek
    Derek
    2012-08-01

    the crash log

     
    Attachments
  • Derek
    Derek
    2012-08-01

    • milestone: --> Version 2.1.4
    • priority: 5 --> 7
     
  • Jonas
    Jonas
    2012-08-10

    We're having the same issue here. Our coverage report consistently crash producing the same kind of hs_err_pid file that you already attached. Tested this with 1.6.0_33-b03 32-bit (both client and server vm). Jacoco version is 0.5.9.201207300726.
    Everything worked fine up to (and including) version 0.5.7.201204190339.

     
  • Jonas
    Jonas
    2012-08-10

    It seems all it takes to reproduce this is a really big test suite with lots of classes filling the perm gen space. I also tried tweaking perm-gen and xmx settings, but that only lets the process crash a little later. The Problem remains the same. When setting a huge perm gen space, the problem seems to shift into the tenured generation, but the result stays the same (jvm crash with similar hs_err_pid*.log file)

     
  • Jonas
    Jonas
    2012-08-14

    Here's how to reproduce the problem with a publicly avaliable test suite:
    - use hibernate-core test sute (available in hibernate-release-4.1.6.Final.zip, the release bundle of hibernate (see: http://www.hibernate.org/downloads\)
    - execute all junit tests inside hibernate-release-4.1.6.Final\project\hibernate-core\src\test\java using eclemma 2.1.4 (jacoco 0.5.9)
    - the tests run fine as long as the 'h2' database is used
    - if hsqldb (2.2.8) is used (configure that in hibernate.properties in hibernate-release-4.1.6.Final\project\hibernate-core\src\test\resources), you get the same kind of jvm crash we've already reported here

    Note that the combination of jacoco 0.5.7 / hsqldb 2.2.8 worked just fine, any newer verion of jacoco causes the jvm crashes.

    I also tried running our internal test suite with a different database, the jvm crashes only seem to occur when using jacoco 0.5.8 or newer / hsqldb 2.2.8. Using any other jdbc driver than hsqldb (such as mssql) works just fine, even with jacoco 0.5.8 or newer.

    I used the following JREs to test this:
    # JRE version: 6.0_33-b03
    # Java VM: Java HotSpot(TM) Client VM (20.8-b03 mixed mode, sharing windows-x86 )

    and

    # JRE version: 7.0_05-b05
    # Java VM: Java HotSpot(TM) Client VM (23.1-b03 mixed mode, sharing windows-x86 )

    I hope this will help you tackle this issue.
    Let me know if you need further info on reproducing the issue.

     
  • Thank you for providing the reproducer! Can you please attache the hs_err file you get for the hibernate test?

     
  • Jonas
    Jonas
    2012-08-14

    I can't attach a file to this track, probably because I'm not the original submitter. I sent the file by e-mail to your sourceforge account. Let me know if it didn't reach you.

     
  • crash log provided by barney2k7

     
    Attachments
  • I did some JaCoCo integration testing with hsqldb.jar and identified an serious bug in JaCoCo. Basically for local variables after

    arr = new long[n]

    wrong stackmap frames are created. I'm not sure whether is causing the JVM crash, but I just fixed it on trunk. Can you please download the latest trunk build jacoco-0.5.10.201208161908.zip from

    https://sourceforge.net/projects/eclemma/files/07_JaCoCo/trunk/

    and retest the scenario?

     
  • Derek
    Derek
    2012-08-16

    Awesome - it looks like this solves the issue.

     
  • Jonas
    Jonas
    2012-08-17

    I can confirm the JVM crashes are no longer occuring using the trunk version of jacoco you posted. This applies for both the hibernate test suite that I used to reproduce this problem, as well as for our internal test suite, were we had the same problem.
    Thank you for taking care of this problem so quickly!

     
  • Fixed on trunk, will be part of JaCoCo 0.5.10.

     
    • status: open --> closed-fixed