On Thu, 2008-10-30 at 14:12 +0100, Pierre Habouzit wrote:
> On Thu, Oct 30, 2008 at 12:44:35PM +0000, Martin Schwidefsky wrote:
> > On Mon, 2008-10-27 at 19:59 +0100, Julien Danjou wrote:
> > > At 1225129482 time_t, Moritz Muehlenhoff wrote:
> > > > Maybe we could forward this bug to Martin Schwidefsky <[EMAIL
> > > > PROTECTED]>,
> > > > who is the glibc s390 maintainer and who works for IBM on the s390
> > > > Linux port.
> > >
> > > Why not.
> > >
> > > Martin, do you have any clue about bug #479952?
> > >
> > > http://bugs.debian.org/479952
> >
> > This does look familiar, I've seen this some years ago with broken
> > locking primivites in the nptl lowlevellock implementation. Could you
> > check your copy of glibc to verify if the locking inline assemblies in
> > nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h all have the "memory"
> > clobber? This has been the bug last time. Just for information I'm
> > currently on travel and will read my mail only randomly.
>
> They all have the memory constraint.
In the meantime Michael Matz from Novell found the problem: the
__lll_lock Funktion uses atomic_compare_and_exchange_bool_acq which uses
the __arch_compare_and_exchange_val_32_acq function which does NOT have
a "memory" clobber. The patch below should fix the problem
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
---
diff -urpN libc/sysdeps/s390/bits/atomic.h libc-s390/sysdeps/s390/bits/atomic.h
--- libc/sysdeps/s390/bits/atomic.h 2003-05-05 20:20:54.000000000 +0200
+++ libc-s390/sysdeps/s390/bits/atomic.h 2008-11-03 10:56:20.000000000
+0100
@@ -56,7 +56,7 @@ typedef uintmax_t uatomic_max_t;
__typeof (*mem) __archold = (oldval); \
__asm __volatile ("cs %0,%2,%1" \
: "+d" (__archold), "=Q" (*__archmem) \
- : "d" (newval), "m" (*__archmem) : "cc" ); \
+ : "d" (newval), "m" (*__archmem) : "cc", "memory" ); \
__archold; })
#ifdef __s390x__
@@ -65,7 +65,8 @@ typedef uintmax_t uatomic_max_t;
__typeof (*mem) __archold = (oldval); \
__asm __volatile ("csg %0,%2,%1" \
: "+d" (__archold), "=Q" (*__archmem) \
- : "d" ((long) (newval)), "m" (*__archmem) : "cc" ); \
+ : "d" ((long) (newval)), "m" (*__archmem) \
+ : "cc", "memory" ); \
__archold; })
#else
/* For 31 bit we do not really need 64-bit compare-and-exchange. We can
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]