Skip to content

Unhandled exception in AWS TransferManager thread #2493

Closed

Description

@edolstra

An abort seen in hydra-queue-runner:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f7ff8044665 in __GI_abort () at abort.c:90
#2  0x00007f7ff89b2415 in __gnu_cxx::__verbose_terminate_handler() ()
   from /nix/store/12zhmzzhrwszdc8q3fwgifpwjkwi3mzc-gcc-7.3.0-lib/lib/libstdc++.so.6
#3  0x00007f7ff89b0206 in ?? () from /nix/store/12zhmzzhrwszdc8q3fwgifpwjkwi3mzc-gcc-7.3.0-lib/lib/libstdc++.so.6
#4  0x00007f7ff89b0251 in std::terminate() () from /nix/store/12zhmzzhrwszdc8q3fwgifpwjkwi3mzc-gcc-7.3.0-lib/lib/libstdc++.so.6
#5  0x00007f7ff89db0ce in ?? () from /nix/store/12zhmzzhrwszdc8q3fwgifpwjkwi3mzc-gcc-7.3.0-lib/lib/libstdc++.so.6
#6  0x00007f7ff978d2a7 in start_thread (arg=0x7f7f337fe700) at pthread_create.c:465
#7  0x00007f7ff80ff57f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

This is not very helpful, but listing some addresses on the stack suggests that this was due to an uncaught std::bad_alloc in an AWS S3 TransferManager thread:

(gdb) x/500a 0x7f7f337fd158
...
0x7f7f337fd7a8: 0x7f7ff8a55698 <_ZTSSt9bad_alloc>       0x7f7f980a6ae0
...
0x7f7f337fd828: 0x7f7ff6fd0358 <_ZNK3Aws8Transfer15TransferManager36TriggerTransferStatusUpdatedCallbackERKSt10shared_ptrIKNS0_14TransferHandleEE+56>     0x7f7fa80c24a0
...
0x7f7f337fd848: 0x7f7ff6fd431f <_ZN3Aws8Transfer15TransferManager23HandlePutObjectResponseEPKNS_2S38S3ClientERKNS2_5Model16PutObjectRequestERKNS_5Utils7OutcomeINS6_15PutObjectResultENS_6Client8AWSErrorINS2_8S3ErrorsEEEEERKSt10shared_ptrIKNSD_18AsyncCallerContextEE+271>     0x7f7fb80ad4b8

Activity

  1. grahamc commented on Oct 30, 2018

    @grahamc
    Member

    It feels a bit surprising that TransferManager would be doing the wrong thing. None the less, maybe this is related? aws/aws-sdk-cpp#542

  2. edolstra commented on Oct 30, 2018

    @edolstra
    MemberAuthor

    TransferManager starts threads but does not handle uncaught exceptions at top-level, so if an allocation throws std::bad_alloc, the entire program is terminated.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions