The GitHub Actions job "Build and Run Tests by Maven" on 
rocketmq.git/fix/consume-queue-hold-mapped-file has failed.
Run started by GitHub user wang-jiahua (triggered by wang-jiahua).

Head commit for run:
192b215298518551f950c9d04fc104001ee3e6ae / wangjiahua.wjh 
<[email protected]>
[ISSUE #10288] Hold MappedFile reference in ConsumeQueue write path to prevent 
SIGSEGV

ConsumeQueue.putMessagePositionInfo() accesses MappedFile without
holding a reference count. A concurrent cleanExpiredConsumeQueue
can destroy() the MappedFile (unmapping its buffer) while the
writer is still using it, causing SIGSEGV in JIT-compiled
Unsafe.copyMemory.

Fix: Call mappedFile.hold() before accessing the buffer and
release() in a finally block, following the same pattern used
in DefaultMappedFile.getData(). Also protect the fillPreBlank
call in initializeWithOffset.

Reported crash signatures:
- Case 1 (v4.9.4): SEGV_MAPERR in ReputMessageService thread
  at ConsumeQueue.putMessagePositionInfo
- Case 2 (v5.3.3): SEGV in AdminBrokerThread at
  ConsumeQueueStore.cleanExpired

Report URL: https://github.com/apache/rocketmq/actions/runs/29319592962

With regards,
GitHub Actions via GitBox

Reply via email to