justin-laserdata opened a new issue, #4242:
URL: https://github.com/apache/iggy/issues/4242

   ### Bug description
   
   The server exits at startup on a host with a single NUMA node. Every shard 
fails to bind its memory to that node and the process dies. The documented 
Docker quickstart command does not start the server on Docker Desktop for Mac 
for this reason.
   
   The default config uses cpu_allocation = "numa:auto" with pin_cores = true. 
compute_numa_assignments in core/server/src/shard_allocator.rs sets numa_node: 
Some(node_id) for every node, including when there is only one. Docker 
Desktop's Linux VM reports one node but rejects the bind.
   
   With a single node the bind gains nothing, because all memory is already on 
that node. Setting numa_node: None when the topology has one node would avoid 
it. The other allocation modes, all, a count and a range, already set None and 
are unaffected.
   
   ### Affected area / component
   
   Iggy server
   
   ### Deployment
   
   Docker (DockerHub image)
   
   ### Versions
   
   apache/iggy:0.9.0, linux/arm64
   
   ### Hardware / environment
   
   macOS 15.7.7, Apple M3, 8 cores, 16 GB. Docker Desktop 29.8.0
   
   ### Sample code
   
   _No response_
   
   ### Logs
   
   INFO main server::shard_allocator: Using 8 shards with 1 NUMA node, 8 cores 
per node, and avoid hyperthread true
   ERROR main server::boot::threads: shard thread returned error shard_id=0 
error=failed to bind shard 0 memory to its NUMA node
   (repeated for shards 1 to 7)
   Error: ShardJoinFailures { failures: [ShardJoinFailure { shard_id: 0, kind: 
Error(MemoryAffinityFailed { shard_id: 0, source: BindingFailed }) }, ... ] }
   
   ### Iggy server config
   
   Image defaults, unmodified. Relevant lines: cpu_allocation = "numa:auto" and 
pin_cores = true.
   
   ### Reproduction
   
   Taken unchanged from Getting started and Quickstart:
   
   ```
   docker run --rm \
     --cap-add=SYS_NICE --security-opt seccomp=unconfined --ulimit 
memlock=-1:-1 \
     -p 8090:8090 \
     -e IGGY_TCP_ADDRESS=0.0.0.0:8090 \
     -e IGGY_NODE_ADVERTISED_ADDRESS=localhost \
     -e IGGY_ROOT_USERNAME=iggy -e IGGY_ROOT_PASSWORD=iggy \
     apache/iggy:0.9.0
   ```
   
   Adding -e IGGY_SHARDING_PIN_CORES=false starts it cleanly, with 8 shards, 
unpinned.
   
   Reproduced on one machine only, arm64. I have not tested Linux with a single 
NUMA node, though the code path looks the same.
   
   ### Contribution
   
   - [x] I'm willing to submit a pull request to fix this bug
   
   ### Good first issue
   
   - [ ] I think this could be a good first issue for a new contributor


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to