Skip to content

[Python][C++] Deadlock in ensure_s3_finalized atexit handler when pyarrow.fs.S3FileSystem reference outlives interpreter shutdown (pyarrow 24.x regression) #50188

Open

Description

@jpatra72

Describe the bug, including details regarding any error messages, version, and platform.

In pyarrow==24.0.0, a process that creates a pyarrow.fs.S3FileSystem and keeps a reference to it until interpreter shutdown will deadlock during Py_FinalizeEx. The hang is in the ensure_s3_finalized atexit handler registered by pyarrow/fs.py, inside Aws::Crt::Io::ClientBootstrap::~ClientBootstrap(). The same code exits cleanly on pyarrow==23.0.0.

This is the AWS-CRT "blocking-shutdown" deadlock that aws-sdk-cpp documents in aws/aws-sdk-cpp#2769 — but it is reachable from pure-Python pyarrow without any explicit S3 I/O, just from holding a S3FileSystem Python reference past interpreter shutdown. Arrow's atexit-driven finalize ordering plus the AWS C/C++ stack version bumps in 24.0.0 turn this from a quiet teardown into an indefinite hang.

Reproducer

# bug.py
import pyarrow.fs
s3 = pyarrow.fs.S3FileSystem()
print("S3FileSystem created, exiting...")
$ python bug.py
S3FileSystem created, exiting...
# process never exits; SIGTERM required

No S3 request is issued — just constructing S3FileSystem() and holding the reference is enough.

Diagnostic: del s3 fixes it; pyarrow.fs.finalize_s3() does not

# fixed.py — clean exit
import pyarrow.fs
s3 = pyarrow.fs.S3FileSystem()
print("S3FileSystem created, exiting...")
del s3
# still_hangs.py — same deadlock, just earlier in the script
import pyarrow.fs
s3 = pyarrow.fs.S3FileSystem()
pyarrow.fs.finalize_s3()   # hangs here instead of at atexit

That asymmetry pins the cause to "live S3Client reference at the moment Aws::ShutdownAPI runs," not to a missed wakeup or a broken finalizer.

gdb backtrace — main thread (the deadlock victim)

Thread 1 (Thread 0x7ff7151f5740 (LWP 3685) "python"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ff70fe02671 in std::__atomic_futex_unsigned_base::_M_futex_wait_until (...)
                                                  from /lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007ff7114d8f01 in Aws::Crt::Io::ClientBootstrap::~ClientBootstrap()
                                                  from pyarrow/libarrow.so.2400
#3  0x00007ff711475b91 in Aws::SetDefaultClientBootstrap(...)
                                                  from pyarrow/libarrow.so.2400
#4  0x00007ff711475bc9 in Aws::CleanupCrt()       from pyarrow/libarrow.so.2400
#5  0x00007ff7114735a5 in Aws::ShutdownAPI(...)   from pyarrow/libarrow.so.2400
#6  0x00007ff710a04a28 in arrow::fs::EnsureS3Finalized()
                                                  from pyarrow/libarrow.so.2400
#7  0x00007ff6fe6693c0 in __pyx_pw_7pyarrow_5_s3fs_7ensure_s3_finalized(...)
                                                  from pyarrow/_s3fs.cpython-312-x86_64-linux-gnu.so
#8  0x000055bdcca34c2c in atexit_callfuncs    at Modules/atexitmodule.c:137
#9  0x000055bdcca22213 in _PyAtExit_Call       at Modules/atexitmodule.c:157
#10 Py_FinalizeEx ()                           at Python/pylifecycle.c:1927
#11 0x000055bdcca30920 in Py_RunMain ()        at Modules/main.c:716
#12 0x000055bdcc9ea477 in Py_BytesMain (...)   at Modules/main.c:768

gdb backtrace — the AWS CRT event-loop thread

Thread 66 (Thread 0x7ff661ff0640 (LWP 3751) "AwsEventLoop1"):
#0  0x00007ff71531feae in epoll_wait (epfd=4, ..., timeout=100000)
                                                  at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1  0x00007ff71153cf1a in aws_event_loop_thread () from pyarrow/libarrow.so.2400
#2  0x00007ff7115fe639 in thread_fn ()             from pyarrow/libarrow.so.2400
#3  0x00007ff71528eac3 in start_thread (...)       at pthread_create.c:442
#4  0x00007ff71531fa84 in clone ()                 at clone.S:100

The epoll_wait(timeout=100000) is the standard idle poll interval of aws-c-io's Linux epoll event loop (DEFAULT_TIMEOUT = 100 * 1000). It is not the bug signal on its own. The real bug signal is that nothing wrote to the loop's wake pipe/eventfd to ask it to stop — because the underlying aws_client_bootstrap's C-side refcount never reached zero.

Root cause analysis

~ClientBootstrap() in aws-crt-cpp is:

aws_client_bootstrap_release(m_bootstrap);
if (m_enableBlockingShutdown) {
    // If your program is stuck here, stop using EnableBlockingShutdown()
    m_shutdownFuture.wait();
}

(aws-crt-cpp v0.38.0 source/io/Bootstrap.cpp)

Aws::InitAPI() (called by Arrow's InitializeS3) unconditionally calls clientBootstrap->EnableBlockingShutdown() (aws-sdk-cpp 1.11.594 Aws.cpp:90), so the destructor always takes the blocking path.

The libstdc++ frame in our stack is std::future::wait() on m_shutdownFuture — a promise fulfilled by the C-layer's on_shutdown_complete callback, which only fires once the C aws_client_bootstrap reaches refcount zero.

The Python reference s3 keeps pyarrow._s3fs.S3FileSystem alive → keeps the C++ shared_ptr<S3Client> alive → keeps the underlying aws_s3_client alive → which holds a strong reference on aws_client_bootstrap. So when Aws::CleanupCrt() drops Arrow's default shared_ptr<ClientBootstrap> (the only thing the C++ wrapper destructor releases is its own one C-side ref), the C bootstrap still has refcount > 0, on_shutdown_complete never fires, and the main thread futex-waits indefinitely. Meanwhile the event-loop thread sits at the top of its 100 s idle poll, never told to stop.

Why 23.0.0 worked and 24.0.0 doesn't

Arrow's s3fs.cc finalize code is essentially identical between 23.0.0 and 24.0.0; the change is in the bundled AWS C/C++ stack (cpp/thirdparty/versions.txt):

component 23.0.0 24.0.0
aws-crt-cpp 0.32.8 0.38.0
aws-c-io 0.19.1 0.26.3
aws-c-s3 0.8.1 0.12.0

The EnableBlockingShutdown + m_shutdownFuture.wait() pattern itself has not changed across these versions, but the ref-graph / teardown-task scheduling in aws-c-io between 0.19 and 0.26 changed enough that a previously-fast-but-still-incorrect shutdown now reliably deadlocks when any S3Client reference is alive.

Suggested fix directions

  1. Arrow side (preferred): at the top of arrow::fs::FinalizeS3 (before Aws::ShutdownAPI), drop Arrow's internal S3Client cache (S3ClientFinalizer) and ensure no S3FileSystem-owned shared_ptr<S3Client> survives. Today the finalizer does call into S3ClientFinalizer::Finalize(), but any S3FileSystem instance still reachable from Python keeps S3ClientHolder alive past that point. Either:
    • hold S3Client via weak_ptr inside S3FileSystem and re-resolve through the finalizer, or
    • have the atexit handler eagerly walk known S3FileSystem instances (via a weak_ptr registry) and reset their clients before calling ShutdownAPI.
  2. Bypass the blocking destructor: consider whether Arrow needs Aws::InitAPI defaults at all — building SDKOptions with a custom ClientBootstrap that doesn't call EnableBlockingShutdown() would convert this from a hang into a benign leak (matching the warning in aws-crt-cpp's own source).
  3. At minimum, document the footgun. Today there is no docstring warning that holding a pyarrow.fs.S3FileSystem past interpreter shutdown will hang the process on pyarrow>=24.

Related

Component(s)

Python, C++


Note: I captured the gdb dump and verified the reproducer (including the del s3 vs finalize_s3() asymmetry) on a real environment; the write-up and cross-references to aws-sdk-cpp / aws-crt-cpp source were drafted with help from Claude. Happy to provide the full gdb log, or additional traces on request.

Activity

  1. pitrou commented on Jun 16, 2026

    @pitrou
    Member

    The call to EnableBlockingShutdown was added in #34134, do you remember why you did that @westonpace ?

  2. pitrou commented on Jun 16, 2026

    @pitrou
    Member

    @jpatra72 Which Python version are you using and how did you install PyArrow?

  3. pitrou commented on Jun 16, 2026

    @pitrou
    Member

    (I cannot reproduce locally, I tried with a wheel on Python 3.12 and with a local conda-based build on Python 3.10)

  4. jpatra72 commented on Jun 16, 2026

    @jpatra72
    Author

    @pitrou, this was on py312.

    The repro part is a bit tricky in this case. I'm not able to repro this on my local setup as well. The error trace is from one of our Anyscale users who runs ray on a k8s environment (and there are certain parts of their k8s setup that I don't have visibility into). The best info I have here to offer are the trace logs I shared above.

  5. pitrou commented on Jun 16, 2026

    @pitrou
    Member

    But did the user install PyArrow from a wheel? Something else?

  6. jpatra72 commented on Jun 16, 2026

    @jpatra72
    Author

    it was installed from a wheel - pyarrow-24.0.0-cp312-cp312-manylinux_2_28_x86_64.whl

  7. pitrou commented on Jun 17, 2026

    @pitrou
    Member

    it was installed from a wheel - pyarrow-24.0.0-cp312-cp312-manylinux_2_28_x86_64.whl

    Thanks, can you ask them to try the development wheel at https://github.com/ursacomputing/crossbow/actions/runs/27629054110/artifacts/7672240236 ?

  8. jpatra72 commented on Jun 17, 2026

    @jpatra72
    Author

    Let me try. Btw, may I know what changes are made here in this develoipment wheel, thanks

  9. pitrou commented on Jun 17, 2026

    @pitrou
    Member

    It's from this PR: #50193
    It removes the EnableBlockingShutdown call mentioned in your description above, but also contains all unreleased changes in the current git main.

  10. tcsavage commented on Jun 18, 2026

    @tcsavage

    RE: reproducing the issue @pitrou

    I have experienced this issue and in attempting to diagnose the problem myself, have only been able to reproduce it when using AWS STS web identity credentials (in my case running in an EKS cluster (IRSA provides the AWS_WEB_IDENTITY_TOKEN_FILE env var).

    I was NOT able to reproduce using bare access key and secret key, or SSO credentials.

    This was all I needed to demonstrate the problem (running in a container with web identity creds provided):

    import pyarrow.fs as pafs
    fs = pafs.S3FileSystem()
  11. pitrou commented on Jun 18, 2026

    @pitrou
    Member

    Thanks @tcsavage , would you be able to test with a development wheel of PyArrow? Which Python version are you using?

  12. tcsavage commented on Jun 18, 2026

    @tcsavage

    @pitrou I was using Python 3.13.14 with PyArrow 24.0.0. I can absolutely test with a development wheel. I'm only set-up for Linux on amd64 or arm64 though.

  13. pitrou commented on Jun 18, 2026

    @pitrou
    Member

    @pitrou I was using Python 3.13.14 with PyArrow 24.0.0. I can absolutely test with a development wheel. I'm only set-up for Linux on amd64 or arm64 though.

    Ok, you'll be able to download a wheel from the build artifacts from the appropriate CI job once it has finished in #50193 (comment)

  14. tcsavage commented on Jun 19, 2026

    @tcsavage

    I've tested one of the new wheels (specifically this one) in my harness and it still exhibits the problem (won't let Python exit).

    Here's some more information. Hopefully somebody else can replicate this.

    Harness

    My harness consists of a Docker image I can run inside a pre-existing EKS cluster.

    Dockerfile:

    FROM python:3.13.14-trixie
    
    RUN pip install https://github.com/ursacomputing/crossbow/releases/download/actions-c6b0d8e743-github-wheel-manylinux-2-28-cp313-cp313-amd64/pyarrow-25.0.0.dev150-cp313-cp313-manylinux_2_28_x86_64.whl
    

    This image was built and pushed to an internal registry.

    I can launch a pod in the EKS cluster like so:

    kubectl run pyarrow-s3-test --rm -it --restart=Never \
      --image=XXXXXXX \
      --overrides='{"spec":{"serviceAccountName":"YYYYYYY","nodeSelector":{"kubernetes.io/arch":"amd64"}}}' \
      --command -- python -c 'import pyarrow as pa; import pyarrow.fs as pafs; pa.show_versions(); print("", flush=True); fs = pafs.S3FileSystem(); print("Exiting...", flush=True)'

    (The node selector is just to force scheduling on an AMD64 instance because that's what the wheel was built for.)

    This pod will print the following, then hang forever until killed:

    pyarrow version info
    --------------------
    Package kind              : python-wheel-manylinux228
    Arrow C++ library version : 25.0.0-SNAPSHOT
    Arrow C++ compiler        : GNU 14.2.1
    Arrow C++ compiler flags  :  -Wno-noexcept-type -Wno-self-move -Wno-subobject-linkage  -fdiagnostics-color=always  -Wall -fno-semantic-interposition -msse4.2
    Arrow C++ git revision    :
    Arrow C++ git description :
    Arrow C++ build type      : release
    PyArrow build type        : release
    
    Exiting...
    

    Traces

    Running pstree inside the stuck container shows me this:

    # pstree -pUta
    python,1 -c import pyarrow as pa; import pyarrow.fs as pafs; pa.show_versions(); fs = pafs.S3FileSystem(); print("Exiting...", flush=True)
      ├─(dpkg-preconfigu,51)
      ├─(dpkg-preconfigu,216)
      ├─{AwsEventLoop1},8
      └─{jemalloc_bg_thd},7
    

    And a GDB trace:

    # gdb -p 1 -batch \
        -ex "set pagination off" \
        -ex "thread apply all bt" \
        -ex "detach" -ex "quit"
    [New LWP 8]
    [New LWP 7]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
    
    warning: 56     ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S: No such file or directory
    Python Exception <class 'ModuleNotFoundError'>: No module named 'math'
    
    Thread 3 (Thread 0x7fc53a1ff6c0 (LWP 7) "jemalloc_bg_thd"):
    #0  __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
    #1  0x00007fc540371668 in __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=0, a6=a6@entry=4294967295, nr=202) at ./nptl/cancellation.c:49
    #2  0x00007fc540371c8c in __futex_abstimed_wait_common64 (private=0, futex_word=0x7fc53a816628, expected=<optimized out>, op=<optimized out>, abstime=0x0, cancel=true) at ./nptl/futex-internal.c:57
    #3  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fc53a816628, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
    #4  0x00007fc540371ceb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fc53a816628, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
    #5  0x00007fc540374158 in __pthread_cond_wait_common (cond=0x7fc53a816608, mutex=0x7fc53a816678, clockid=0, abstime=0x0) at ./nptl/pthread_cond_wait.c:426
    #6  ___pthread_cond_wait (cond=0x7fc53a816608, mutex=0x7fc53a816678) at ./nptl/pthread_cond_wait.c:458
    #7  0x00007fc53c440982 in background_thread_entry () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #8  0x00007fc540374b7b in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:448
    #9  0x00007fc5403f27f8 in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
    
    Thread 2 (Thread 0x7fc533fff6c0 (LWP 8) "AwsEventLoop1"):
    #0  __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
    #1  0x00007fc540371668 in __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=0, a6=a6@entry=0, nr=232) at ./nptl/cancellation.c:49
    #2  0x00007fc5403716ad in __syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=0, a6=a6@entry=0, nr=232) at ./nptl/cancellation.c:75
    #3  0x00007fc5403f2aad in epoll_wait (epfd=<optimized out>, events=<optimized out>, maxevents=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
    #4  0x00007fc53c35132a in aws_event_loop_thread () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #5  0x00007fc53c4198b9 in thread_fn () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #6  0x00007fc540374b7b in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:448
    #7  0x00007fc5403f27f8 in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
    
    Thread 1 (Thread 0x7fc5401f1380 (LWP 1) "python"):
    #0  __syscall_cancel_arch () at ../sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S:56
    #1  0x00007fc540371668 in __internal_syscall_cancel (a1=<optimized out>, a2=<optimized out>, a3=<optimized out>, a4=<optimized out>, a5=a5@entry=0, a6=a6@entry=4294967295, nr=202) at ./nptl/cancellation.c:49
    #2  0x00007fc540371c8c in __futex_abstimed_wait_common64 (private=0, futex_word=0x7fc53d75f740 <s_managed_thread_signal+32>, expected=<optimized out>, op=<optimized out>, abstime=0x0, cancel=true) at ./nptl/futex-internal.c:57
    #3  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fc53d75f740 <s_managed_thread_signal+32>, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at ./nptl/futex-internal.c:87
    #4  0x00007fc540371ceb in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fc53d75f740 <s_managed_thread_signal+32>, expected=<optimized out>, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
    #5  0x00007fc540374158 in __pthread_cond_wait_common (cond=0x7fc53d75f720 <s_managed_thread_signal>, mutex=0x7fc53d75f760 <s_managed_thread_lock>, clockid=0, abstime=0x0) at ./nptl/pthread_cond_wait.c:426
    #6  ___pthread_cond_wait (cond=0x7fc53d75f720 <s_managed_thread_signal>, mutex=0x7fc53d75f760 <s_managed_thread_lock>) at ./nptl/pthread_cond_wait.c:458
    #7  0x00007fc53c4171a9 in aws_condition_variable_wait () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #8  0x00007fc53c40eaa4 in aws_condition_variable_wait_pred () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #9  0x00007fc53c41bbdc in aws_thread_join_all_managed () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #10 0x00007fc53c2ddf05 in Aws::Crt::ApiHandle::~ApiHandle() () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #11 0x00007fc53c280dc3 in Aws::CleanupCrt() () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #12 0x00007fc53c27e6f5 in Aws::ShutdownAPI(Aws::SDKOptions const&) () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #13 0x00007fc53b86de88 in arrow::fs::EnsureS3Finalized() () from /usr/local/lib/python3.13/site-packages/pyarrow/libarrow.so.2500
    #14 0x00007fc538987980 in __pyx_pw_7pyarrow_5_s3fs_7ensure_s3_finalized(_object*, _object*) () from /usr/local/lib/python3.13/site-packages/pyarrow/_s3fs.cpython-313-x86_64-linux-gnu.so
    #15 0x00007fc540744db7 in atexit_callfuncs (state=state@entry=0x7fc5409adb70 <_PyRuntime+99120>) at ./Modules/atexitmodule.c:144
    #16 0x00007fc540723e42 in _PyAtExit_Call (interp=0x7fc5409ab1a8 <_PyRuntime+88424>) at ./Modules/atexitmodule.c:165
    #17 _Py_Finalize (runtime=<optimized out>) at Python/pylifecycle.c:2052
    #18 0x00007fc54073c693 in Py_RunMain () at Modules/main.c:778
    #19 0x00007fc5406f558c in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:830
    #20 0x00007fc54030bca8 in __libc_start_call_main (main=main@entry=0x5608b66ce140 <main>, argc=argc@entry=3, argv=argv@entry=0x7ffc0ef763d8) at ../sysdeps/nptl/libc_start_call_main.h:58
    #21 0x00007fc54030bd65 in __libc_start_main_impl (main=0x5608b66ce140 <main>, argc=3, argv=0x7ffc0ef763d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc0ef763c8) at ../csu/libc-start.c:360
    #22 0x00005608b66ce071 in _start ()
    [Inferior 1 (process 1) detached]
    

    (I think we can ignore the ModuleNotFoundError. I believe this is coming from GDB itself)

  15. tcsavage commented on Jun 19, 2026

    @tcsavage

    I've attempted to replicate this using web identity tokens outside EKS on my local macOS machine, but have so far been unable to reproduce the issue in that environment.

  16. jpatra72 commented on Jun 19, 2026

    @jpatra72
    Author

    Yup, I see the same end result with this whl.

    gdb logs here

  17. pitrou commented on Jun 22, 2026

    @pitrou
    Member

    @tcsavage Why is dpkg-preconfigure appearing in your Python process tree?

    @jpatra72 Your traceback shows libarrow.so.2400, not libarrow.so.2500.

  18. tcsavage commented on Jun 24, 2026

    @tcsavage

    @pitrou Fair question. I had kubectl execed into the container and had to install a package to get pstree. I don't know why those processes would stick around though. The point was really just to show that python was PID 1 and there's just the jemalloc and AWS event loop threads running.

  19. exaroj commented on Jun 24, 2026

    @exaroj

    I also saw this in production (under pyiceberg on EKS) but cannot reproduce locally.

  20. tcsavage commented on Jun 24, 2026

    @tcsavage

    @exaroj couple of follow-up questions if you don't mind:

    1. Can you tell me if pods in your EKS cluster authenticate with AWS via IRSA or EKS Pod Identity?
    2. When attempting to reproduce locally, did you provide AWS credentials? If so by what means?
    3. When attempting to reproduce locally, what local OS were you running? Running inside a container?
  21. exaroj commented on Jun 24, 2026

    @exaroj
    1. Prod was IRSA on a Debian (slim bookworm) docker image.
    2. Locally with short term credentials for a role account. Environment variables.
    3. Locally MacOS (may also have tried an Ubuntu container).

    We have spent (wasted) a lot of time trying to debug and reproduce AWS S3 CRT issues in the past. We struggled because the AWS libraries were attempting to determine if they were running on EKS/EC2 instances and tailor behavior accordingly.

  22. jpatra72 commented on Jun 25, 2026

    @jpatra72
    Author

    close it by mistake, @pitrou could you pls reopen

  23. reopened this on Jun 25, 2026
  24. dhirschfeld commented on Sep 11, 2026

    @dhirschfeld

    This bug is biting me pretty hard. I want to move to >=24 for new UUID features but this bug is causing our Dagster containers to hang in such a way as they're never cleaned up on k8s (Dagster gets a success signal before the hang happens).

    The bug only manifests when the containers are run in Dagster Cloud, never locally, making it super hard to track down, and hard to provide any repro - I don't know the exact conditions that trigger the bug for us.

    We've now set a cluster-level timeout on the Dagster pods, but have also reverted to 23.

    Does anyone have any updated info? A work-around?

  25. ROMNEUVILLE commented on Sep 14, 2026

    @ROMNEUVILLE

    This bug is also impacting our workloads. We’re running Kubernetes pods on AWS using IRSA, so pinning to older versions isn’t a viable option for us.

    Are there any plans or timelines for a fix? Is there a concrete workaround that doesn’t involve pinning to an older version or adding a hard exit at the end, or an explicit del statement? I

  26. raulcd commented on Sep 14, 2026

    @raulcd
    Member

    @tcsavage suggests that it only triggers with STS web identity credentials, not with access keys or SSO. Could someone try plain Linux docker (not macOS, the event loop backend differs, and outside K8s) with AWS_WEB_IDENTITY_TOKEN_FILE, AWS_ROLE_ARN and AWS_REGION set, pointing at a token file, and see whether it hangs? Even a bogus or expired token may be enough, since the deadlock happens without any S3 request being issued.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions