2017-01-03 73 views
1

什麼會導致Chronicle Queue出現段錯誤?我假設我錯過了某個地方的配置。我有一個只讀紀事隊列這樣創建的:SIGSEGV in Chronicle Queue 4.5.19

ChronicleQueue readQueue = SingleChronicleQueueBuilder.binary (readBasePath).readOnly (true).build(); 

的JVM segfaulted 2016-12-31T00:00:00,這是當我假定隊列文件被循環。這是環境:

紀事隊列4.5.19 JVM的OpenJDK 1.8.0_112-B16 的Ubuntu 14.04.3 LTS的Linux 3.13.0-74

這裏是堆棧跟蹤:

> V [libjvm.so+0xa08d97] 
J 875 sun.misc.Unsafe.compareAndSwapInt(Ljava/lang/Object;JII)Z (0 bytes) @ 0x00007fde1d328c46 [0x00007fde1d328b80+0xc6] 
j net.openhft.chronicle.core.UnsafeMemory.compareAndSwapInt(JII)Z+8 
j net.openhft.chronicle.bytes.NativeBytesStore.compareAndSwapInt(JII)Z+17 
j net.openhft.chronicle.bytes.AbstractBytes.compareAndSwapInt(JII)Z+16 
j net.openhft.chronicle.wire.AbstractWire.writeEndOfWire(JLjava/util/concurrent/TimeUnit;J)V+32 
j net.openhft.chronicle.queue.impl.single.SingleChronicleQueueStore.writeEOF(Lnet/openhft/chronicle/wire/Wire;J)V+9 
j net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreTailer.checkMoveToNextCycle(ZLnet/openhft/chronicle/bytes/Bytes;)Z+43 
j net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreTailer.inACycle(Z)Z+176 
j net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreTailer.next(Z)Z+12 
j net.openhft.chronicle.queue.impl.single.SingleChronicleQueueExcerpts$StoreTailer.readingDocument(Z)Lnet/openhft/chronicle/wire/DocumentContext;+6 
j net.openhft.chronicle.queue.ExcerptTailer.readingDocument()Lnet/openhft/chronicle/wire/DocumentContext;+2 
j net.openhft.chronicle.wire.MarshallableIn.readDocument(Lnet/openhft/chronicle/wire/ReadMarshallable;)Z+1 

回答

0

這看起來像是一個競賽條件。當內存映射真正釋放時,它不能被訪問,否則會觸發分段錯誤。我懷疑這是因爲它應該從一個循環到下一個循環都是免費的。

我添加了一個問題https://github.com/OpenHFT/Chronicle-Queue/issues/319