Bug Report
Summary
On a TCP-only host, MC_STORE_MEMCPY auto-enables and creates a MemcpyWorkerPool. Under concurrent put/get from a multi-threaded Python client, a worker thread segfaults inside glibc __memcpy_avx512_unaligned_erms. Setting MC_STORE_MEMCPY=0 reliably avoids the crash.
Regression PR: #1936
Reproduction
- Run a multi-process workload where one Mooncake client
puts host buffers and another gets them concurrently over TCP.
- After a few seconds (first batches arriving), a memcpy worker thread crashes.
I've used https://github.com/torchspec-project/TorchSpec's Qwen 8B training pipeline.
Crash signature
gdb on a core dump shows the crashing thread:
#0 __memcpy_avx512_unaligned_erms ()
at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:265
#1 mooncake::MemcpyWorkerPool::workerThread ()
from .../site-packages/mooncake/store.so
#2 std::execute_native_thread_routine
#3 start_thread
#4 clone3
Workaround
This bypasses MemcpyWorkerPool and the crash disappears completely. Switching transport to RDMA also avoids it (RDMA path doesn't use the pool).
Environment
mooncake-transfer-engine 0.3.10.post2 (pip)
- Python 3.12.13 (miniconda)
- Ubuntu, kernel
6.8.0-1043-aiext, glibc default, system libstdc++.so.6
- Transport: TCP only (RDMA hardware available but not selected)
- Workload: speculative-decoding training pipeline (TorchSpec). Inference workers call
put_from, trainer workers call get_into host buffers concurrently.
- Host buffer pool size: 8 × 1 GB; segment size 16 GB; local buffer 4 GB
MC_STORE_MEMCPY not set → log shows: auto-detected: TCP-only environment, memcpy enabled
Before submitting...
Bug Report
Summary
On a TCP-only host,
MC_STORE_MEMCPYauto-enables and creates aMemcpyWorkerPool. Under concurrentput/getfrom a multi-threaded Python client, a worker thread segfaults inside glibc__memcpy_avx512_unaligned_erms. SettingMC_STORE_MEMCPY=0reliably avoids the crash.Regression PR: #1936
Reproduction
puts host buffers and anothergets them concurrently over TCP.I've used https://github.com/torchspec-project/TorchSpec's Qwen 8B training pipeline.
Crash signature
gdbon a core dump shows the crashing thread:Workaround
export MC_STORE_MEMCPY=0This bypasses
MemcpyWorkerPooland the crash disappears completely. Switching transport to RDMA also avoids it (RDMA path doesn't use the pool).Environment
mooncake-transfer-engine0.3.10.post2 (pip)6.8.0-1043-aiext, glibc default, systemlibstdc++.so.6put_from, trainer workers callget_intohost buffers concurrently.MC_STORE_MEMCPYnot set → log shows:auto-detected: TCP-only environment, memcpy enabledBefore submitting...