Log errno and thread ID on CreateIOUring failure (#14520)#14520
Log errno and thread ID on CreateIOUring failure (#14520)#14520archang19 wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@archang19 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98526792. |
✅ clang-tidy: No findings on changed linesCompleted in 66.1s. |
Summary: CreateIOUring() silently returns nullptr on failure, discarding the errno from io_uring_queue_init. This makes it impossible to diagnose why io_uring initialization fails on specific threads (e.g. ENOMEM from memlock limits, EINVAL from unsupported flags, EMFILE from fd exhaustion). Add a fprintf(stderr, ...) that logs strerror, errno, and pthread thread ID when io_uring_queue_init fails, so failures are diagnosable from logs without needing to reproduce. Differential Revision: D98526792
b467131 to
92738f3
Compare
✅ Claude Code ReviewAuto-triggered after CI passed — reviewing commit b2ccf9e Code Review: PR #14520 — Log errno and thread ID on CreateIOUring failurePR: 2 files changed, 8 insertions, 1 deletion SummaryThis PR improves diagnostic logging when FindingsF1: Startup probe will print error to stderr on systems where io_uring fails at runtimeSeverity: Medium The This can happen in Docker containers with restricted syscalls, systems with low Impact: Users may interpret this as an error when it's actually expected behavior (graceful fallback to pread). One-time per process, so log volume is minimal. Suggestion: Consider wording that indicates fallback is normal, e.g., F2:
|
Summary: CreateIOUring() silently returns nullptr on failure, discarding the errno from io_uring_queue_init. This makes it impossible to diagnose why io_uring initialization fails on specific threads (e.g. ENOMEM from memlock limits, EINVAL from unsupported flags, EMFILE from fd exhaustion). Add a fprintf(stderr, ...) that logs strerror, errno, and pthread thread ID when io_uring_queue_init fails, so failures are diagnosable from logs without needing to reproduce. Reviewed By: xingbowang Differential Revision: D98526792
92738f3 to
b2ccf9e
Compare
|
This pull request has been merged in 2af3820. |
Summary:
CreateIOUring() silently returns nullptr on failure, discarding the errno
from io_uring_queue_init. This makes it impossible to diagnose why
io_uring initialization fails on specific threads (e.g. ENOMEM from
memlock limits, EINVAL from unsupported flags, EMFILE from fd exhaustion).
Add a fprintf(stderr, ...) that logs strerror, errno, and pthread thread
ID when io_uring_queue_init fails, so failures are diagnosable from logs
without needing to reproduce.
Reviewed By: xingbowang
Differential Revision: D98526792