From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 285863857C66; Sat, 19 Dec 2020 10:11:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 285863857C66 From: "stefan at bytereef dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/98390] New: AIX: exceptions in threads: IOT/Abort trap(coredump) Date: Sat, 19 Dec 2020 10:11:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stefan at bytereef dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2020 10:11:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98390 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: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #include #include #include 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 =3D 100; std::vector t(n); for (size_t k =3D 0; k < n; k++) { t[k] =3D std::thread(doit); } for (size_t k =3D 0; k < n; k++) { t[k].join(); } } int main() { do_threads(); return 0; } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D doit.sh: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #!/bin/sh while ./test; do : done =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $ g++ -pthread -Wall -Wextra -std=3Dgnu++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(libs= tdc++.so.6) #7 0x100006dc in doit () at test.cc:14 #8 0x100021fc in void std::__invoke_impl(std::__invoke_other, void (*&&)()) (__f=3D) #9 0x100020c4 in std::__invoke_result::type std::__invoke(void (*&&)()) (__fn=3D) #10 0x10002cd4 in decltype (__invoke((_S_declval<0ul>)())) std::thread::_Invoker >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=3D) #11 0x10002c2c in std::thread::_Invoker >::operator() (this=3D) #12 0x10002b8c in std::thread::_State_impl > >::_M_run (this=3D) #13 0xd18964d8 in execute_native_thread_routine () from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libstdc++.a(libs= tdc++.so.6) #14 0xd0572f68 in _pthread_body () from /usr/lib/libpthreads.a(shr_xpg5.o) #15 0x00000000 in ?? ()=