public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS
@ 2007-09-18 18:40 daney at gcc dot gnu dot org
2007-09-18 18:48 ` [Bug libgcj/33479] " daney at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-09-18 18:40 UTC (permalink / raw)
To: java-prs
As noted in:
http://gcc.gnu.org/ml/gcc-testresults/2007-09/msg00818.html
With this configuration:
../trunk/configure --prefix=/home/ddaney/gccsvn/trunk-install
--target=mipsel-linux --build=mipsel-linux --host=mipsel-linux
--with-gmp=/home/ddaney/mp --with-mpfr=/home/ddaney/mp --with-arch=sb1
--disable-java-awt --without-x --enable-__cxa_atexit --disable-jvmpi
--disable-static
The SyncTest test fails sometimes.
--
Summary: SyncTest Intermittent failing on MIPS
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcj
AssignedTo: daney at gcc dot gnu dot org
ReportedBy: daney at gcc dot gnu dot org
GCC build triplet: mipsel-linux-gnu
GCC host triplet: mipsel-linux-gnu
GCC target triplet: mipsel-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/33479] SyncTest Intermittent failing on MIPS
2007-09-18 18:40 [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS daney at gcc dot gnu dot org
@ 2007-09-18 18:48 ` daney at gcc dot gnu dot org
2007-09-18 22:26 ` Hans dot Boehm at hp dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-09-18 18:48 UTC (permalink / raw)
To: java-prs
------- Comment #1 from daney at gcc dot gnu dot org 2007-09-18 18:48 -------
SyncTest never completes. When it gets into this state the threads are in the
followin state:
(gdb) thread 6
[Switching to thread 6 (Thread 758265024 (LWP 29566))]#0 0x2ce68fac in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0 0x2ce68fac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0x2b7190fc in _Jv_CondWait (cv=0x2cd84e00, mu=0x2cd84de0,
millis=<value optimized out>, nanos=0)
at ../../../trunk/libjava/posix-threads.cc:212
#2 0x2b6f37c8 in gnu::gcj::runtime::FinalizerThread::run (
this=<value optimized out>)
at ../../../trunk/libjava/gnu/gcj/runtime/natFinalizerThread.cc:57
#3 0x2b70cb78 in _Jv_ThreadRun (thread=0x2d086f50)
at ../../../trunk/libjava/java/lang/natThread.cc:335
#4 0x2b718838 in really_start (x=0x2d04bb68)
at ../../../trunk/libjava/posix-threads.cc:616
#5 0x2c389e18 in GC_start_routine (arg=<value optimized out>)
at ../../../trunk/boehm-gc/pthread_support.c:1301
#6 0x2ce62130 in start_thread () from /lib/libpthread.so.0
#7 0x2cf9ef48 in ?? () from /lib/libc.so.6
(gdb) thread 5
[Switching to thread 5 (Thread 760362176 (LWP 29567))]#0 0x2cf5d820 in
nanosleep () from /lib/libc.so.6
(gdb) bt
#0 0x2cf5d820 in nanosleep () from /lib/libc.so.6
#1 0x2cf9678c in usleep () from /lib/libc.so.6
#2 0x2b706d28 in wait_unlocked (he=0x2cd861d0)
at ../../../trunk/libjava/java/lang/natObject.cc:634
#3 0x2b7079a0 in _Jv_MonitorEnter (obj=0x411870)
at ../../../trunk/libjava/java/lang/natObject.cc:966
#4 0x00401070 in SyncTest.run()void (this=<value optimized out>)
at SyncTest.java:10
#5 0x2bc40420 in java.lang.Thread.run()void (this=<value optimized out>)
at /home/ddaney/gccsvn/trunk/libjava/java/lang/Thread.java:755
#6 0x2b70cb78 in _Jv_ThreadRun (thread=0x2d086f00)
at ../../../trunk/libjava/java/lang/natThread.cc:335
#7 0x2b718838 in really_start (x=0x2d04bb40)
at ../../../trunk/libjava/posix-threads.cc:616
#8 0x2c389e18 in GC_start_routine (arg=<value optimized out>)
at ../../../trunk/boehm-gc/pthread_support.c:1301
#9 0x2ce62130 in start_thread () from /lib/libpthread.so.0
(gdb) thread 4
[Switching to thread 4 (Thread 762459328 (LWP 29568))]#0 0x2cf5d820 in
nanosleep () from /lib/libc.so.6
(gdb) bt
#0 0x2cf5d820 in nanosleep () from /lib/libc.so.6
#1 0x2cf9678c in usleep () from /lib/libc.so.6
#2 0x2b706d28 in wait_unlocked (he=0x2cd861d0)
at ../../../trunk/libjava/java/lang/natObject.cc:634
#3 0x2b7079a0 in _Jv_MonitorEnter (obj=0x411870)
at ../../../trunk/libjava/java/lang/natObject.cc:966
#4 0x00401070 in SyncTest.run()void (this=<value optimized out>)
at SyncTest.java:10
#5 0x2bc40420 in java.lang.Thread.run()void (this=<value optimized out>)
at /home/ddaney/gccsvn/trunk/libjava/java/lang/Thread.java:755
#6 0x2b70cb78 in _Jv_ThreadRun (thread=0x2d086eb0)
at ../../../trunk/libjava/java/lang/natThread.cc:335
#7 0x2b718838 in really_start (x=0x2d04bb38)
at ../../../trunk/libjava/posix-threads.cc:616
#8 0x2c389e18 in GC_start_routine (arg=<value optimized out>)
at ../../../trunk/boehm-gc/pthread_support.c:1301
#9 0x2ce62130 in start_thread () from /lib/libpthread.so.0
(gdb) thread 3
[Switching to thread 3 (Thread 764556480 (LWP 29569))]#0 0x2cf5d820 in
nanosleep () from /lib/libc.so.6
(gdb) bt
#0 0x2cf5d820 in nanosleep () from /lib/libc.so.6
#1 0x2cf9678c in usleep () from /lib/libc.so.6
#2 0x2b706d28 in wait_unlocked (he=0x2cd861d0)
at ../../../trunk/libjava/java/lang/natObject.cc:634
#3 0x2b7079a0 in _Jv_MonitorEnter (obj=0x411870)
at ../../../trunk/libjava/java/lang/natObject.cc:966
#4 0x00401070 in SyncTest.run()void (this=<value optimized out>)
at SyncTest.java:10
#5 0x2bc40420 in java.lang.Thread.run()void (this=<value optimized out>)
at /home/ddaney/gccsvn/trunk/libjava/java/lang/Thread.java:755
#6 0x2b70cb78 in _Jv_ThreadRun (thread=0x2d086e60)
at ../../../trunk/libjava/java/lang/natThread.cc:335
#7 0x2b718838 in really_start (x=0x2d04bb30)
at ../../../trunk/libjava/posix-threads.cc:616
#8 0x2c389e18 in GC_start_routine (arg=<value optimized out>)
at ../../../trunk/boehm-gc/pthread_support.c:1301
#9 0x2ce62130 in start_thread () from /lib/libpthread.so.0
(gdb) thread 2
[Switching to thread 2 (Thread 766653632 (LWP 29570))]#0 0x2cf5d820 in
nanosleep () from /lib/libc.so.6
(gdb) bt
#0 0x2cf5d820 in nanosleep () from /lib/libc.so.6
#1 0x2cf9678c in usleep () from /lib/libc.so.6
#2 0x2b706d28 in wait_unlocked (he=0x2cd861d0)
at ../../../trunk/libjava/java/lang/natObject.cc:634
#3 0x2b7079a0 in _Jv_MonitorEnter (obj=0x411870)
at ../../../trunk/libjava/java/lang/natObject.cc:966
#4 0x00401070 in SyncTest.run()void (this=<value optimized out>)
at SyncTest.java:10
#5 0x2bc40420 in java.lang.Thread.run()void (this=<value optimized out>)
at /home/ddaney/gccsvn/trunk/libjava/java/lang/Thread.java:755
#6 0x2b70cb78 in _Jv_ThreadRun (thread=0x2d086e10)
at ../../../trunk/libjava/java/lang/natThread.cc:335
#7 0x2b718838 in really_start (x=0x2d04bb28)
at ../../../trunk/libjava/posix-threads.cc:616
#8 0x2c389e18 in GC_start_routine (arg=<value optimized out>)
at ../../../trunk/boehm-gc/pthread_support.c:1301
#9 0x2ce62130 in start_thread () from /lib/libpthread.so.0
(gdb) thread 1
[Switching to thread 1 (Thread 755130368 (LWP 29565))]#0 0x2ce68fac in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
(gdb) bt
#0 0x2ce68fac in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0x2b7190fc in _Jv_CondWait (cv=0x2d078c24, mu=0x2d078c04,
millis=<value optimized out>, nanos=0)
at ../../../trunk/libjava/posix-threads.cc:212
#2 0x2b70ce94 in java::lang::Thread::join (this=0x2d086f00, millis=0, nanos=0)
at ../../../trunk/libjava/java/lang/natThread.cc:160
#3 0x2bc40374 in java.lang.Thread.join()void (this=0x2d078c24)
at /home/ddaney/gccsvn/trunk/libjava/java/lang/Thread.java:677
#4 0x00401268 in SyncTest.main(java.lang.String[])void (
args=<value optimized out>) at SyncTest.java:26
#5 0x2b6f5304 in gnu::java::lang::MainThread::call_main (this=0x2d11ef60)
at ../../../trunk/libjava/gnu/java/lang/natMainThread.cc:54
#6 0x2b70cb78 in _Jv_ThreadRun (thread=0x2d11ef60)
at ../../../trunk/libjava/java/lang/natThread.cc:335
#7 0x2b6acb5c in _Jv_RunMain (vm_args=<value optimized out>, klass=0x411870,
name=0x0, argc=<value optimized out>, argv=0x7fc39b24, is_jar=false)
at ../../../trunk/libjava/prims.cc:1789
#8 0x2b6acd54 in _Jv_RunMain (klass=0x2d026000,
name=0xa <Address 0xa out of bounds>, argc=0, argv=<value optimized out>,
is_jar=false) at ../../../trunk/libjava/prims.cc:1814
#9 0x2b6acde4 in JvRunMain (klass=0x2d078c24, argc=755130368, argv=0x7fc39b24)
at ../../../trunk/libjava/prims.cc:1820
#10 0x2cecb2e0 in __libc_start_main () from /lib/libc.so.6
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-09-18 18:48:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/33479] SyncTest Intermittent failing on MIPS
2007-09-18 18:40 [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS daney at gcc dot gnu dot org
2007-09-18 18:48 ` [Bug libgcj/33479] " daney at gcc dot gnu dot org
@ 2007-09-18 22:26 ` Hans dot Boehm at hp dot com
2007-09-18 23:35 ` daney at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Hans dot Boehm at hp dot com @ 2007-09-18 22:26 UTC (permalink / raw)
To: java-prs
------- Comment #2 from Hans dot Boehm at hp dot com 2007-09-18 22:26 -------
I assume the LOCKED bit in *he is actually set when gdb looks at it? What does
the rest of the hash entry look like? That might give you a hint as to the
culprit.
Clearly someone sets the LOCKED bit on a hash entry and neglects to clear it.
If a compare_and_swap succeeded but returned failure anyway, that might explain
it. A misimplementation of release_set might also cause the problem. I don't
immediately see how this can be explained by a memory ordering issue.
--
Hans dot Boehm at hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Hans dot Boehm at hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/33479] SyncTest Intermittent failing on MIPS
2007-09-18 18:40 [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS daney at gcc dot gnu dot org
2007-09-18 18:48 ` [Bug libgcj/33479] " daney at gcc dot gnu dot org
2007-09-18 22:26 ` Hans dot Boehm at hp dot com
@ 2007-09-18 23:35 ` daney at gcc dot gnu dot org
2007-09-20 7:03 ` daney at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-09-18 23:35 UTC (permalink / raw)
To: java-prs
------- Comment #3 from daney at gcc dot gnu dot org 2007-09-18 23:35 -------
The LOCKED bit is set. All the other fields in the hash entry are zero.
I think adding a memory barrier at the end of compare_and_swap fixes the
problem.
Currently I have:
inline static bool
compare_and_swap(volatile obj_addr_t *addr,
obj_addr_t old,
obj_addr_t new_val)
{
bool b = __sync_bool_compare_and_swap(addr, old, new_val);
__sync_synchronize();
return b;
}
inline static bool
compare_and_swap_release(volatile obj_addr_t *addr,
obj_addr_t old,
obj_addr_t new_val)
{
return __sync_bool_compare_and_swap(addr, old, new_val);
}
I would have thought that the 'sc' instruction emitted by
__sync_bool_compare_and_swap made the swap visible to other CPUs, but it
appears that the 'sync' emitted by __sync_synchronize() is required. Hmm.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/33479] SyncTest Intermittent failing on MIPS
2007-09-18 18:40 [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS daney at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-09-18 23:35 ` daney at gcc dot gnu dot org
@ 2007-09-20 7:03 ` daney at gcc dot gnu dot org
2007-09-26 16:45 ` [Bug target/33479] " daney at gcc dot gnu dot org
2007-09-27 15:53 ` daney at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-09-20 7:03 UTC (permalink / raw)
To: java-prs
------- Comment #4 from daney at gcc dot gnu dot org 2007-09-20 07:03 -------
Created an attachment (id=14227)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14227&action=view)
Proposed patch.
I am testing this patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/33479] SyncTest Intermittent failing on MIPS
2007-09-18 18:40 [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS daney at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-09-20 7:03 ` daney at gcc dot gnu dot org
@ 2007-09-26 16:45 ` daney at gcc dot gnu dot org
2007-09-27 15:53 ` daney at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-09-26 16:45 UTC (permalink / raw)
To: java-prs
------- Comment #5 from daney at gcc dot gnu dot org 2007-09-26 16:45 -------
Subject: Bug 33479
Author: daney
Date: Wed Sep 26 16:45:39 2007
New Revision: 128821
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128821
Log:
2007-09-26 David Daney <ddaney@avtrex.com>
PR target/33479
* config/mips/mips.md (sync_compare_and_swap<mode>, sync_old_add<mode>,
sync_new_add<mode>, sync_old_<optab><mode>, sync_new_<optab><mode>,
sync_old_nand<mode>, sync_new_nand<mode>,
sync_lock_test_and_set<mode>): Fix '&' constraint modifiers.
Update length attributes.
(sync_add<mode>, sync_sub<mode>, sync_old_sub<mode>,
sync_new_sub<mode>, sync_<optab><mode>, sync_nand<mode>): Update
length attributes.
* config/mips/mips.h (MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP,
MIPS_SYNC_OLD_OP, MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND,
MIPS_SYNC_OLD_NAND, MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): Add
post-loop sync.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/mips/mips.h
trunk/gcc/config/mips/mips.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/33479] SyncTest Intermittent failing on MIPS
2007-09-18 18:40 [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS daney at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-09-26 16:45 ` [Bug target/33479] " daney at gcc dot gnu dot org
@ 2007-09-27 15:53 ` daney at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-09-27 15:53 UTC (permalink / raw)
To: java-prs
------- Comment #6 from daney at gcc dot gnu dot org 2007-09-27 15:53 -------
Fixed now.
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-09-27 15:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-18 18:40 [Bug libgcj/33479] New: SyncTest Intermittent failing on MIPS daney at gcc dot gnu dot org
2007-09-18 18:48 ` [Bug libgcj/33479] " daney at gcc dot gnu dot org
2007-09-18 22:26 ` Hans dot Boehm at hp dot com
2007-09-18 23:35 ` daney at gcc dot gnu dot org
2007-09-20 7:03 ` daney at gcc dot gnu dot org
2007-09-26 16:45 ` [Bug target/33479] " daney at gcc dot gnu dot org
2007-09-27 15:53 ` daney at gcc dot gnu dot org
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).