Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christian Thalinger <Christian.Thalinger@Sun.COM>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [patch] Fix Darwin breakage
Date: Tue, 18 Aug 2009 12:24:00 -0000	[thread overview]
Message-ID: <4A8A95E0.7090409@Sun.COM> (raw)
In-Reply-To: <8ac60eac0908140922m57367e9dn464783d8ff625474@mail.gmail.com>

Paul Pluzhnikov wrote:
> Greetings,
> 
> This patch:
>   http://sourceware.org/ml/gdb-patches/2009-07/msg00417.html
> caused Darwin/MacOSX to stop working with assertion:
>   objfiles.c:793: internal-error: qsort_cmp: Assertion
> `obj_section_endaddr (sect1) <= sect2_addr' failed.
> 
> Turns out this worked only "by accident" before.
> 
> Here is a proposed fix. Tested by running "./gdb ./gdb", setting
> breakpoints, etc.
> (I don't have dejagnu setup on MacOS yet).

I tried that patch and it kind of works.  But running a program takes
ages (about 5-10 minutes), with GDB using 100% CPU time.

A backtrace looks like this:

(gdb) thr 6
[Switching to thread 6 (Thread 0x2703 of process 55928)]#0  0x94e9c136
in __semwait_signal_nocancel () from /usr/lib/libSystem.B.dylib
(gdb) bt
#0  0x94e9c136 in __semwait_signal_nocancel () from
/usr/lib/libSystem.B.dylib
#1  0x94e9bd1b in nanosleep$NOCANCEL$UNIX2003 () from
/usr/lib/libSystem.B.dylib
#2  0x94e95013 in usleep$NOCANCEL$UNIX2003 () from
/usr/lib/libSystem.B.dylib
#3  0x94eac62e in __abort () from /usr/lib/libSystem.B.dylib
#4  0x94eac68a in abort () from /usr/lib/libSystem.B.dylib
#5  0x01ebdcaa in os::abort(bool) () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#6  0x0206cf4e in VMError::report_and_die() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#7  0x01b03c4a in report_assertion_failure(char const*, int, char
const*) () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#8  0x01ed2cf9 in Compile::Fill_buffer() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#9  0x01ed4d53 in Compile::Output() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#10 0x01a93198 in Compile::Code_Gen() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#11 0x01a93795 in Compile::Compile(ciEnv*, TypeFunc const* (*)(),
unsigned char*, char const*, int, bool, bool, bool) () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#12 0x01f68030 in OptoRuntime::generate_stub(ciEnv*, TypeFunc const*
(*)(), unsigned char*, char const*, int, bool, bool, bool) () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#13 0x01f680ba in OptoRuntime::generate(ciEnv*) () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#14 0x019cfeac in C2Compiler::initialize_runtime() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#15 0x01771c9e in AbstractCompiler::initialize_runtimes (this=0x11e148,
f=0x19cfd6a <C2Compiler::initialize_runtime()>, state=0x21c955c) at
/Users/twisti/bsd-port/hotspot/src/share/vm/compiler/abstractCompiler.cpp:50
#16 0x019cff11 in C2Compiler::initialize() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#17 0x019cff88 in C2Compiler::compile_method(ciEnv*, ciMethod*, int) ()
from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#18 0x01a9e00c in CompileBroker::invoke_compiler_on_method(CompileTask*)
() from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#19 0x01a9e744 in CompileBroker::compiler_thread_loop() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#20 0x020103c8 in compiler_thread_entry(JavaThread*, Thread*) () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#21 0x02011eac in JavaThread::thread_main_inner() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#22 0x02012031 in JavaThread::run() () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#23 0x01ebdeb6 in java_start(Thread*) () from
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
#24 0x94df1155 in _pthread_start () from /usr/lib/libSystem.B.dylib
#25 0x94df1012 in thread_start () from /usr/lib/libSystem.B.dylib
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)

#26 0x00000000 in ?? ()

The backtrace looks fine, but arguments and local variables are not
visible.  Loaded shared libraries look OK:

(gdb) info sharedlibrary
From        To          Syms Read   Shared Object Library
0x01771b90  0x026a7c27  Yes
/Users/twisti/bsd-port/hotspot/build/bsd/bsd_i486_compiler2/jvmg/libjvm.dylib
0x94dc00c0  0x94f67fbf  Yes         /usr/lib/libSystem.B.dylib
0x96160780  0x9616904b  Yes         /usr/lib/libgcc_s.1.dylib
0x910d3fb4  0x9113f6f2  Yes         /usr/lib/libstdc++.6.dylib
0x975e12b0  0x975e500c  Yes         /usr/lib/system/libmathCommon.A.dylib
0x0000d850  0x00018130  Yes
/Users/twisti/bsd-port/hotspot/build/bsd/jdk-bsd-i586/debug/jre/lib/i386/libverify.dylib
0x000267e0  0x00041379  Yes
/Users/twisti/bsd-port/hotspot/build/bsd/jdk-bsd-i586/debug/jre/lib/i386/libjava.dylib
0x0004e390  0x00053248  Yes
/Users/twisti/bsd-port/hotspot/build/bsd/jdk-bsd-i586/debug/jre/lib/i386/native_threads/libhpi.dylib
0x000720f0  0x0008210d  Yes
/Users/twisti/bsd-port/hotspot/build/bsd/jdk-bsd-i586/debug/jre/lib/i386/libzip.dylib

-- Christian


  parent reply	other threads:[~2009-08-18 11:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 16:32 Paul Pluzhnikov
2009-08-14 17:56 ` Paul Pluzhnikov
2009-08-14 19:09   ` Tom Tromey
2009-08-14 18:32 ` Tom Tromey
2009-08-14 19:15   ` Paul Pluzhnikov
2009-08-18 12:24 ` Christian Thalinger [this message]
2009-08-18 16:17   ` Paul Pluzhnikov
2009-08-20 17:01     ` Christian Thalinger
2009-08-20 17:09       ` Paul Pluzhnikov
2009-08-20 17:16         ` Christian Thalinger
2009-08-21 11:30         ` Christian Thalinger

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=4A8A95E0.7090409@Sun.COM \
    --to=christian.thalinger@sun.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.com \
    /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