From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19228 invoked by alias); 18 Aug 2009 11:52:34 -0000 Received: (qmail 19217 invoked by uid 22791); 18 Aug 2009 11:52:33 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from gmp-eb-inf-2.sun.com (HELO gmp-eb-inf-2.sun.com) (192.18.6.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Aug 2009 11:52:25 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged)) by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n7IBqKDP015539 for ; Tue, 18 Aug 2009 11:52:20 GMT MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) id <0KOK00J00LUJ4D00@fe-emea-09.sun.com> for gdb-patches@sourceware.org; Tue, 18 Aug 2009 12:52:01 +0100 (BST) Received: from [10.0.0.3] ([unknown] [88.117.81.192]) by fe-emea-09.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) with ESMTPSA id <0KOK006G6MAP1D10@fe-emea-09.sun.com>; Tue, 18 Aug 2009 12:52:01 +0100 (BST) Date: Tue, 18 Aug 2009 12:24:00 -0000 From: Christian Thalinger Subject: Re: [patch] Fix Darwin breakage In-reply-to: <8ac60eac0908140922m57367e9dn464783d8ff625474@mail.gmail.com> To: Paul Pluzhnikov Cc: gdb-patches ml Message-id: <4A8A95E0.7090409@Sun.COM> References: <8ac60eac0908140922m57367e9dn464783d8ff625474@mail.gmail.com> User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00274.txt.bz2 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 , 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