public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/98390] New: AIX: exceptions in threads: IOT/Abort trap(coredump)
@ 2020-12-19 10:11 stefan at bytereef dot org
  2024-01-02 15:24 ` [Bug target/98390] " stefan at bytereef dot org
  0 siblings, 1 reply; 2+ messages in thread
From: stefan at bytereef dot org @ 2020-12-19 10:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98390

            Bug ID: 98390
           Summary: AIX: exceptions in threads: IOT/Abort trap(coredump)
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stefan at bytereef dot org
  Target Milestone: ---

The following test case is extracted from a larger program. When repeated
often enough, it terminates with: IOT/Abort trap(coredump)

Confirmed with g++ (GCC) 7.2.0 and g++ (GCC) 10.2.0 on gcc119.fsffrance.org.


test.cc:
========================================================================
#include <stdexcept>
#include <thread>
#include <vector>


class suntime_error : public std::runtime_error {
  using std::runtime_error::runtime_error;
};

static void
doit()
{
    try {
        throw suntime_error("this is an error");
    }
    catch (const suntime_error& err) {
        (void)err;
    }
}

static void
do_threads()
{
    const size_t n = 100;
    std::vector<std::thread> t(n);

    for (size_t k = 0; k < n; k++) {
        t[k] = std::thread(doit);
    }

    for (size_t k = 0; k < n; k++) {
        t[k].join();
    }
}

int
main()
{
    do_threads();
    return 0;
}
========================================================================


doit.sh:
========================================================================
#!/bin/sh

while ./test; do
    :
done
========================================================================



$ g++ -pthread -Wall -Wextra -std=gnu++11 -pedantic -O0 -g -o test test.cc

$ ./doit.sh
./doit.sh[3]: 14484092 IOT/Abort trap(coredump)

$ gdb ./test core
[...]
Program terminated with signal SIGABRT, Aborted.
#0  0xd058f3ec in pthread_kill () from /usr/lib/libpthreads.a(shr_xpg5.o)
(gdb) bt
#0  0xd058f3ec in pthread_kill () from /usr/lib/libpthreads.a(shr_xpg5.o)
#1  0xd058e7cc in _p_raise () from /usr/lib/libpthreads.a(shr_xpg5.o)
#2  0xd0123608 in raise () from /usr/lib/libc.a(shr.o)
#3  0xd0189ebc in abort () from /usr/lib/libc.a(shr.o)
#4  0xd08741a4 in uw_init_context_1 () from
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libgcc_s.a(shr.o)
#5  0xd0874e50 in _Unwind_RaiseException () from
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libgcc_s.a(shr.o)
#6  0xd17cd2cc in __cxa_throw () from
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libstdc++.a(libstdc++.so.6)
#7  0x100006dc in doit () at test.cc:14
#8  0x100021fc in void std::__invoke_impl<void, void
(*)()>(std::__invoke_other, void (*&&)()) (__f=<incomplete type>)
#9  0x100020c4 in std::__invoke_result<void (*)()>::type std::__invoke<void
(*)()>(void (*&&)()) (__fn=<incomplete type>)
#10 0x10002cd4 in decltype (__invoke((_S_declval<0ul>)()))
std::thread::_Invoker<std::tuple<void (*)()>
>::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=<incomplete type>)
#11 0x10002c2c in std::thread::_Invoker<std::tuple<void (*)()> >::operator()
(this=<incomplete type>)
#12 0x10002b8c in
std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> >
>::_M_run (this=<incomplete type>)
#13 0xd18964d8 in execute_native_thread_routine () from
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libstdc++.a(libstdc++.so.6)
#14 0xd0572f68 in _pthread_body () from /usr/lib/libpthreads.a(shr_xpg5.o)
#15 0x00000000 in ?? ()

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-02 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19 10:11 [Bug libgcc/98390] New: AIX: exceptions in threads: IOT/Abort trap(coredump) stefan at bytereef dot org
2024-01-02 15:24 ` [Bug target/98390] " stefan at bytereef dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).