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: Wed, 18 Jun 2014 22:06:00 -0000	[thread overview]
Message-ID: <bug-61538-4-TxhOzRbIkv@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 #3 from Joshua Kinard <kumba at gentoo dot org> ---
(In reply to Jonathan Wakely from comment #2)
> Can you provide a stack trace to show which constructor/destructor it's
> hanging in?

Hopefully you mean a backtrace from gdb.  Not finding a lot of info on doing a
C++ stacktrace (I haven't messed with C++ in years).

The testcase isn't stripped and has debugging info, but glibc-2.19, and
gcc-4.8.2 are stripped and built w/o debugging, so the backtrace doesn't
provide a lot of info.  I might be able to rebuild them w/ debugging, but gcc
takes almost 13+ hours on the Octane to build, while glibc takes another 3-4.

First, here is what strace shows:
set_tid_address(0x7797f2e8)             = 2532
set_robust_list(0x7797f2f0, 12)         = 0
futex(0x7fb06690, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fb06690, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 0) =
-1 EINVAL (Invalid argument)
rt_sigaction(SIGRT_0, {0x8, [],
SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_NOCLDWAIT|0x7921a94}, NULL, 16) = 0
rt_sigaction(SIGRT_1, {0x10000008, [],
SA_RESTART|SA_INTERRUPT|SA_NODEFER|SA_SIGINFO|SA_NOCLDWAIT|0x7921940}, NULL,
16) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_0 RT_1], NULL, 16) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=2147483647}) = 0
syscall(0x108e, 0x77929500, 0, 0, 0, 0, 0x77929160) = -1 EAGAIN (Resource
temporarily unavailable)
syscall(0x108e, 0x77929500, 0, 0x10100, 0, 0, 0x77929160

That last line is where you see it hanging until I send ctrl+c, with the first
argument to both being 0x108e (4238 in decimal, I typoed it as '4328' in my
original post), which is a futex call, per mips-o32-linux.xml in GDB:
  <syscall name="futex" number="4238"/>

Running in GDB, setting a catchpoint on syscall 4238 and upping the
heuristic-fence-post limit a fair bit to quiet some warnings down:

This first catchpoint doesn't hang:
 ¦0x77f9dc1c <__pthread_initialize_minimal_internal+148>  addiu  a0,s8,32
 ¦0x77f9dc20 <__pthread_initialize_minimal_internal+152>  li     a1,129
 ¦0x77f9dc24 <__pthread_initialize_minimal_internal+156>  li     a2,1
 ¦0x77f9dc28 <__pthread_initialize_minimal_internal+160>  li     v0,4238
 ¦0x77f9dc2c <__pthread_initialize_minimal_internal+164>  syscall
>¦0x77f9dc30 <__pthread_initialize_minimal_internal+168>  bnez   a3,0x77f9df9c <__pthread_initialize_minimal_internal+1044>

Catchpoint 1 (call to syscall 4238), 0x77f9dc30 in
__pthread_initialize_minimal_internal () from /lib/libpthread.so.0
(gdb) thread apply all bt

Thread 1 (process 2584):
#0  0x77f9dc30 in __pthread_initialize_minimal_internal () from
/lib/libpthread.so.0
#1  0x77f9c5a4 in _init () from /lib/libpthread.so.0
Cannot access memory at address 0x77fc3ffe

Here's the second catchpoint for syscall #4238:
 ¦0x77f9dc64 <__pthread_initialize_minimal_internal+220>  addiu  sp,sp,-32
 ¦0x77f9dc68 <__pthread_initialize_minimal_internal+224>  sw     v0,16(sp)
 ¦0x77f9dc6c <__pthread_initialize_minimal_internal+228>  li     v0,4238
 ¦0x77f9dc70 <__pthread_initialize_minimal_internal+232>  syscall
>¦0x77f9dc74 <__pthread_initialize_minimal_internal+236>  addiu  sp,sp,32

Catchpoint 1 (call to syscall 4238), 0x77f9dc74 in
__pthread_initialize_minimal_internal () from /lib/libpthread.so.0
(gdb) thread apply all bt

Thread 1 (process 2584):
#0  0x77f9dc74 in __pthread_initialize_minimal_internal () from
/lib/libpthread.so.0
#1  0x77f9c5a4 in _init () from /lib/libpthread.so.0
Cannot access memory at address 0x77fc3ffe

After I type continue again, it hangs until interrupted:
(gdb) c
Continuing.
<HANGS HERE>

Program received signal SIGINT, Interrupt.
0x77d50864 in syscall () from /lib/libc.so.6
(gdb) thread apply all bt

Thread 1 (Thread 0x77feb000 (LWP 2591)):
#0  0x77d50864 in syscall () from /lib/libc.so.6
#1  0x77ed9160 in __cxa_guard_acquire () from
/usr/lib/gcc/mips-unknown-linux-gnu/4.8.2/libstdc++.so.6
#2  0x77f4325c in std::future_category() () from
/usr/lib/gcc/mips-unknown-linux-gnu/4.8.2/libstdc++.so.6
#3  0x77ed406c in ?? () from
/usr/lib/gcc/mips-unknown-linux-gnu/4.8.2/libstdc++.so.6
Cannot access memory at address 0x77fc3ffe
(gdb)
>From gcc-bugs-return-454520-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 18 22:12:36 2014
Return-Path: <gcc-bugs-return-454520-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17474 invoked by alias); 18 Jun 2014 22:12:35 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17242 invoked by uid 55); 18 Jun 2014 22:12:30 -0000
From: "kkojima at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/61550] [4.10 Regression] [SH] build failure with ICE in gen_reg_rtx, at emit-rtl.c:943
Date: Wed, 18 Jun 2014 22:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kkojima at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
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:
Message-ID: <bug-61550-4-rVUi6urTDj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61550-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61550-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-06/txt/msg01602.txt.bz2
Content-length: 462

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida550

--- Comment #2 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
Author: kkojima
Date: Wed Jun 18 22:11:55 2014
New Revision: 211807

URL: https://gcc.gnu.org/viewcvs?rev!1807&root=gcc&view=rev
Log:
    PR target/61550
    * config/sh/sh.c (prepare_move_operands): Don't process TLS
    addresses here if reload in progress or completed.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.c


  parent reply	other threads:[~2014-06-18 22:06 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 [this message]
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
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-TxhOzRbIkv@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).