public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kumba at gentoo dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61538] g++ compiled binary, linked to glibc libpthread, hangs on SGI MIPS R1x000 systems on Linux
Date: Sat, 21 Jun 2014 01:21:00 -0000	[thread overview]
Message-ID: <bug-61538-4-RhooxlX1dc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61538-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Joshua Kinard <kumba at gentoo dot org> ---
I rebuilt both glibc-2.19 and gcc-4.8.3 w/ debugging, though gcc's build system
managed to strip out or optimize away some of the debugging code.  That said,
it's enough to see that the hang is being triggered by gcc because it makes two
futex syscalls in gcc-4.8.3/libstdc++-v3/libsupc++/guard.cc:290:
    syscall (SYS_futex, gi, _GLIBCXX_FUTEX_WAIT, expected, 0);

The first one lines up with the strace output where it gets -1 EAGAIN, and then
the second attempt is where the program hangs.

>From GDB:
(gdb) r
Starting program: /usr/obj/mips-unknown-linux-gnu/c2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Catchpoint 1 (call to syscall 4238), __pthread_initialize_minimal_internal ()
at nptl-init.c:328
(gdb) c
Continuing.

Catchpoint 1 (call to syscall 4238), 0x77f9dd90 in
__pthread_initialize_minimal_internal () at nptl-init.c:348
(gdb) break *0x77d2b684
Breakpoint 2 at 0x77d2b684: file ../sysdeps/unix/syscall.S, line 27.
(gdb) break *0x77ec621c
Breakpoint 3 at 0x77ec621c: file
/usr/obj/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libstdc++-v3/libsupc++/guard.cc,
line 290.
(gdb) c
Continuing.

Breakpoint 3, 0x77ec621c in __cxxabiv1::__cxa_guard_acquire (g=0x77f95500
<guard variable for (anonymous
namespace)::__future_category_instance()::__fec>)
    at
/usr/obj/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libstdc++-v3/libsupc++/guard.cc:290
(gdb) c
Continuing.

Breakpoint 2, 0x77d2b684 in syscall () at ../sysdeps/unix/syscall.S:27
(gdb) c
Continuing.

Breakpoint 3, 0x77ec621c in __cxxabiv1::__cxa_guard_acquire (g=0x77f95500
<guard variable for (anonymous
namespace)::__future_category_instance()::__fec>)
    at
/usr/obj/portage/sys-devel/gcc-4.8.3/work/gcc-4.8.3/libstdc++-v3/libsupc++/guard.cc:290
(gdb) c
Continuing.
<HANGS HERE>
^C
Program received signal SIGINT, Interrupt.
0x77d2b684 in syscall () at ../sysdeps/unix/syscall.S:27
(gdb)


  parent reply	other threads:[~2014-06-21  1:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 17:31 [Bug c++/61538] New: " kumba at gentoo dot org
2014-06-17 18:07 ` [Bug c++/61538] " kumba at gentoo dot org
2014-06-18 16:55 ` redi at gcc dot gnu.org
2014-06-18 22:06 ` kumba at gentoo dot org
2014-06-19  1:11 ` pinskia at gcc dot gnu.org
2014-06-19  1:54 ` kumba at gentoo dot org
2014-06-19  4:58 ` kumba at gentoo dot org
2014-06-21  1:21 ` kumba at gentoo dot org [this message]
2014-06-21  1:59 ` kumba at gentoo dot org
2014-07-06 20:29 ` kumba at gentoo dot org
2014-07-15  5:02 ` pinskia at gcc dot gnu.org
2014-07-15  6:42 ` kumba at gentoo dot org
2014-07-15  7:38 ` pinskia at gcc dot gnu.org
2014-07-21  7:00 ` kumba at gentoo dot org
2014-07-21  7:10 ` [Bug regression/61538] gcc after commit 39a8c5ea produces bad code for MIPS R1x000 CPUs kumba at gentoo dot org
2014-07-21  7:17 ` kumba at gentoo dot org
2014-10-21  6:04 ` pinskia at gcc dot gnu.org
2014-10-21  6:30 ` kumba at gentoo dot org
2015-02-16  6:41 ` kumba at gentoo dot org
2015-02-18  8:22 ` kumba at gentoo dot org
2015-02-18  9:24 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-61538-4-RhooxlX1dc@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).