From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20643 invoked by alias); 18 Dec 2011 22:22:43 -0000 Received: (qmail 20620 invoked by uid 22791); 18 Dec 2011 22:22:42 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GC X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 18 Dec 2011 22:22:31 +0000 From: "nwfilardo at gmail dot com" To: java-prs@gcc.gnu.org Subject: [Bug libgcj/51615] New: Condition Variable queue state corruption and infinite loop Date: Sun, 18 Dec 2011 22:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcj X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nwfilardo at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2011-q4/txt/msg00051.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51615 Bug #: 51615 Summary: Condition Variable queue state corruption and infinite loop Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned@gcc.gnu.org ReportedBy: nwfilardo@gmail.com When attempting to run ecj-3.8M4.jar on a large number of files, gij hangs. (On a small number of files, it runs fine, curiously enough.) Invoking gdb (7.3.1), I see that the thread is stuck in (gdb) bt #0 _Jv_CondWait (cv=0x1729a48, mu=, millis=, nanos=) at ../.././../gcc-4.7-20111210/libjava/posix-threads.cc:241 #1 0x00000000419d99b8 in java::lang::Object::wait (this=0x1704900, timeout=250, nanos=) at ../.././../gcc-4.7-20111210/libjava/java/lang/natObject.cc:226 #2 0x0000000042486aa4 in ffi_call_v9 () at ../.././../gcc-4.7-20111210/libffi/src/sparc/v9.S:83 #3 0x0000000042486400 in ffi_call (cif=0x1815f08, fn=, rvalue=0x7fdff7f97e8, avalue=0x7fdff7f9680) at ../.././../gcc-4.7-20111210/libffi/src/sparc/ffi.c:415 #4 0x00000000424830c8 in ffi_java_raw_call (cif=, fn=, rvalue=, raw=) at ../.././../gcc-4.7-20111210/libffi/src/java_raw_api.c:300 #5 0x00000000419b6430 in _Jv_InterpMethod::run (retp=0x7fdff7f9aa0, args=0x419b6d9c, meth=0x13a0c00) at ../.././../gcc-4.7-20111210/libjava/interpret-run.cc:613 #6 0x0000000042483028 in ffi_java_translate_args (cif=, rvalue=, avalue=, user_data=) at ../.././../gcc-4.7-20111210/libffi/src/java_raw_api.c:314 #7 0x00000000424867e0 in ffi_closure_sparc_inner_v9 (closure=, rvalue=0x7fdff7f9aa0, gpr=0x7fdff7f9bc0, fpr=0x7fdff7f9ac0) at ../.././../gcc-4.7-20111210/libffi/src/sparc/ffi.c:621 #8 0x0000000042486b90 in ffi_closure_v9 () at ../.././../gcc-4.7-20111210/libffi/src/sparc/v9.S:181 #9 0x0000000041dd2ce8 in java.lang.Thread.run()void (this=) at /var/ports/usr/ports/lang/gcc47/work/gcc-4.7-20111210/libjava/java/lang/Thread.java:761 #10 0x00000000419ddbec in _Jv_ThreadRun (thread=) at ../.././../gcc-4.7-20111210/libjava/java/lang/natThread.cc:335 #11 0x00000000419e78a8 in really_start (x=) at ../.././../gcc-4.7-20111210/libjava/posix-threads.cc:639 #12 0x000000004249950c in GC_start_routine (arg=0x12ca120) at ../.././../gcc-4.7-20111210/boehm-gc/pthread_support.c:1301 #13 0x0000000043c68890 in ?? () from /lib/libthr.so.3 #14 0x0000000043c68890 in ?? () from /lib/libthr.so.3 and if I (gdb) print cv.first $14 = (_Jv_Thread_t *) 0x446c4830 (gdb) print cv.first.next $15 = (_Jv_Thread_t *) 0x446c4830 which is obviously bad since the loop we're stuck in is over ->next pointers until we see a NULL, which we won't. Note that current has also become corrupted in the same way: (gdb) print current $16 = (_Jv_Thread_t *) 0x446c4860 (gdb) print current.next $17 = (_Jv_Thread_t *) 0x446c4860 I am on a FreeBSD/sparc64 machine, running 8.2 and using gcc47 from ports (which means exactly 4.7.0 20111210). It's quite easy to get into this state, so if I've left something out please don't hesitate to ask.