lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.11k stars 252 forks source link

Crash with IBM Java 7 #42

Closed pluradj closed 10 years ago

pluradj commented 10 years ago

I ran into this problem when trying to use Apache Cassandra 2.0.7 with IBM Java 7. Cassandra crashes during start up and generates a core file. It is pretty easy to recreate with a Java program that calls on LZ4Factory.nativeInstance().

Stack trace

1XMCURTHDINFO  Current thread
3XMTHREADINFO      "pool-1-thread-4" J9VMThread:0x0000000050B7C200, j9thread_t:0x00007F80B0E96660, java/lang/Thread:0x000000004E8D6410, state:R, prio=5
3XMJAVALTHREAD            (java/lang/Thread getId:0x17, isDaemon:false)
3XMTHREADINFO1            (native thread ID:0x4FE0, native priority:0x5, native policy:UNKNOWN)
3XMTHREADINFO2            (native stack address range from:0x00007F80A5A98000, to:0x00007F80A5AD9000, size:0x41000)
3XMCPUTIME               CPU usage total: 0.484368829 secs
3XMHEAPALLOC             Heap bytes allocated since last GC cycle=12930384 (0xC54D50)
3XMTHREADINFO3           Java callstack:
4XESTACKTRACE                at net/jpountz/lz4/LZ4JNI.LZ4_compress_limitedOutput(Native Method)
4XESTACKTRACE                at net/jpountz/lz4/LZ4JNICompressor.compress(LZ4JNICompressor.java:31)
4XESTACKTRACE                at net/jpountz/lz4/LZ4Factory.<init>(LZ4Factory.java:163)
4XESTACKTRACE                at net/jpountz/lz4/LZ4Factory.instance(LZ4Factory.java:46)
4XESTACKTRACE                at net/jpountz/lz4/LZ4Factory.nativeInstance(LZ4Factory.java:76)

Assertion failure

1XECTHTYPE     Current thread history (J9VMThread:0x0000000001080500)
3XEHSTTYPE     13:57:09:734842157 GMT j9mm.107 - * ** ASSERTION FAILED ** at StandardAccessBarrier.cpp:322: ((false && (elems == getArrayObjectDataAddress((J9VMToken*)vmThread, arrayObject)))) 
pluradj commented 10 years ago

I confirmed that this pull request does fix the issue - https://github.com/jpountz/lz4-java/pull/46

sftwr-ngnr commented 10 years ago

FYI: There's at least one other known issue with IBM Java. See #31 for more details.

jpountz commented 10 years ago

@pluradj Thanks for confirming, I'll close this issue then.