On 2/10/20 6:22 PM, Glauber Costa wrote: > Hello my dear io_uring friends > > Today I tried to run my tests on a different, more powerful hardware > (70+ Hyperthreads) and it crashed on creating the ring. > > I don't recall anything fancy in my code for creating the ring - > except maybe that I size the cq ring differently than the sq ring. > > The backtrace attached leads me to believe that we just accessed a > null struct somewhere Yeah, but it's in the alloc code, it's not in io-wq/io_uring. Here's where it is crashing: struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data) { [...] for_each_node(node) { struct io_wqe *wqe; wqe = kzalloc_node(sizeof(struct io_wqe), GFP_KERNEL, node); I guess the node isn't online, and that's why it's crashing. Try the below for starters, it should get it going. diff --git a/fs/io-wq.c b/fs/io-wq.c index 182aa17dc2ca..3898165baccb 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -1115,8 +1116,11 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data) for_each_node(node) { struct io_wqe *wqe; + int alloc_node = node; - wqe = kzalloc_node(sizeof(struct io_wqe), GFP_KERNEL, node); + if (!node_online(alloc_node)) + alloc_node = NUMA_NO_NODE; + wqe = kzalloc_node(sizeof(struct io_wqe), GFP_KERNEL, alloc_node); if (!wqe) goto err; wq->wqes[node] = wqe; -- Jens Axboe