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

Head commit for run:
8a094a1eb43ddda99f6a9d53d31c2ba21b3f2d9f / 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/28492482543

With regards,
GitHub Actions via GitBox

Reply via email to