Skip to content

fix: disable uvloop by default (libuv abort under backend connection churn)#134

Merged
ServerSideHannes merged 1 commit into
mainfrom
fix/uvloop-libuv-abort
Jul 17, 2026
Merged

fix: disable uvloop by default (libuv abort under backend connection churn)#134
ServerSideHannes merged 1 commit into
mainfrom
fix/uvloop-libuv-abort

Conversation

@ServerSideHannes

@ServerSideHannes ServerSideHannes commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Problem

s3proxy pods crash with exit 139 and no Python traceback under backup load. Faulthandler traces from today's three crashes (2026-07-16) all show the same thing: when the backend drops connections under load, an fd gets closed while uvloop is still polling it — libuv hits an assertion in uv__io_poll and calls abort(), killing every in-flight upload on the pod.

OSError: [Errno 9] Bad file descriptor
  uvloop/handles/tcp.pyx", line 50, in uvloop.loop.__tcp_get_socket
Fatal Python error: Aborted
  uvloop/loop.cpython-314-x86_64-linux-gnu.so: uv__io_poll+0x30d

uvloop 0.22.1, Python 3.14.6.

Change

Skip uvloop.install() unless S3PROXY_UVLOOP=1. Stock asyncio is slightly slower but has no native abort path.

@ServerSideHannes
ServerSideHannes merged commit 8e7d7e2 into main Jul 17, 2026
11 checks passed
@ServerSideHannes
ServerSideHannes deleted the fix/uvloop-libuv-abort branch July 17, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant