framlog opened a new issue #12329: URL: https://github.com/apache/arrow/issues/12329
As the title mentioned, I suspect that an unhandled race condition exists here: https://github.com/apache/arrow/blob/f48cabee64fe0719e5e6f28d89ca86277373ca2b/cpp/src/arrow/util/thread_pool.cc#L238-L257 Assume that we have two threads, one executes `SpawnReal` to push the task into the `pending_tasks`, the other is running at the `ProtectAgainstFork`, which may reset the whole `state` which the former one is using, which makes the loss of tasks. In my scenario, when I fork multiple processes to read data after reading something in the parent process, it has chances to stall at `Future::Wait`. A quick fix could be change the type of `pid_` to `std::atomic<pid_t>` and move `pid_ = current_pid` to L252. -- 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]
