Skip to content

SIGABRT bionic #1024

@zhenyolka

Description

@zhenyolka

Hi! I use httplib in native binary, compiled for android bionic. Most time all works, but some time I get SIGABRT. I figured out, that it happens in create_socket function, exactly at calling res_init(). I heard on some platforms this function isn't thread safe, maybe this causes problems?

#0 0x0000007fbdd9c2cc in abort () from /apex/com.android.runtime/lib64/bionic/libc.so #1 0x0000007fbdd90914 in scudo::die() () from /apex/com.android.runtime/lib64/bionic/libc.so #2 0x0000007fbdd90f8c in scudo::ScopedErrorReport::~ScopedErrorReport() () from /apex/com.android.runtime/lib64/bionic/libc.so #3 0x0000007fbdd91094 in scudo::reportHeaderRace(void*) () from /apex/com.android.runtime/lib64/bionic/libc.so #4 0x0000007fbdd95dc4 in scudo::Allocator<scudo::AndroidConfig, &scudo_malloc_postinit>::quarantineOrDeallocateChunk(void*, scudo::Chunk::UnpackedHeader*, unsigned long) () from /apex/com.android.runtime/lib64/bionic/libc.so #5 0x0000007fbdd9258c in scudo::Allocator<scudo::AndroidConfig, &scudo_malloc_postinit>::deallocate(void*, scudo::Chunk::Origin, unsigned long, unsigned long) () from /apex/com.android.runtime/lib64/bionic/libc.so #6 0x0000007fbddc0a60 in __res_vinit () from /apex/com.android.runtime/lib64/bionic/libc.so #7 0x000000555559973c in httplib::detail::create_socket<httplib::detail::create_client_socket(char const*, int, int, bool, std::__ndk1::function<void (int)>, long, long, long, long, long, long, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, httplib::Error&)::{lambda(int, addrinfo&)#1}>(char const*, int, int, int, bool, std::__ndk1::function<void (int)>, httplib::detail::create_client_socket(char const*, int, int, bool, std::__ndk1::function<void (int)>, long, long, long, long, long, long, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, httplib::Error&)::{lambda(int, addrinfo&)#1})

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