public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libitm/52526] New: libitm: stuck in futex_wait
@ 2012-03-07 22:41 patrick.marlier at gmail dot com
  2012-03-08 12:43 ` [Bug libitm/52526] " torvald at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: patrick.marlier at gmail dot com @ 2012-03-07 22:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526

             Bug #: 52526
           Summary: libitm: stuck in futex_wait
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libitm
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: patrick.marlier@gmail.com
                CC: torvald@gcc.gnu.org
              Host: x86_64-unknown-linux-gnu
            Target: x86_64-unknown-linux-gnu


libitm (default configuration/4.8.0 20120307) is stuck in futex_wait with STAMP
kmeans with low contention and 8 threads.

(gdb) info threads 
  Id   Target Id         Frame 
  8    Thread 0x7ffff322b700 (LWP 24011) "kmeans" 0x0000003ecb40c14c in
pthread_barrier_wait () from /lib64/libpthread.so.0
  7    Thread 0x7ffff3a2c700 (LWP 24010) "kmeans" 0x0000003ecb40c14c in
pthread_barrier_wait () from /lib64/libpthread.so.0
  6    Thread 0x7ffff422d700 (LWP 24009) "kmeans" 0x0000003ecb40c14c in
pthread_barrier_wait () from /lib64/libpthread.so.0
  5    Thread 0x7ffff4a2e700 (LWP 24008) "kmeans" 0x0000003ecb40c14c in
pthread_barrier_wait () from /lib64/libpthread.so.0
* 4    Thread 0x7ffff522f700 (LWP 24007) "kmeans" GTM::futex_wait
(addr=0x7ffff7fdfbb8, val=1)
    at ../../../gcc-trunk/libitm/config/linux/futex.cc:49
  3    Thread 0x7ffff5a30700 (LWP 24006) "kmeans" 0x0000003ecb40c14c in
pthread_barrier_wait () from /lib64/libpthread.so.0
  2    Thread 0x7ffff6231700 (LWP 24005) "kmeans" 0x0000003ecb40c14c in
pthread_barrier_wait () from /lib64/libpthread.so.0
  1    Thread 0x7ffff73aa720 (LWP 24002) "kmeans" 0x0000003ecb40c14c in
pthread_barrier_wait () from /lib64/libpthread.so.0
(gdb) thread 5
[Switching to thread 5 (Thread 0x7ffff4a2e700 (LWP 24008))]
#0  0x0000003ecb40c14c in pthread_barrier_wait () from /lib64/libpthread.so.0
(gdb) bt
#0  0x0000003ecb40c14c in pthread_barrier_wait () from /lib64/libpthread.so.0
#1  0x0000000000403099 in threadWait ()
#2  0x0000003ecb407b41 in start_thread () from /lib64/libpthread.so.0
#3  0x0000003eca8df49d in clone () from /lib64/libc.so.6
(gdb) thread 4
[Switching to thread 4 (Thread 0x7ffff522f700 (LWP 24007))]
#0  GTM::futex_wait (addr=0x7ffff7fdfbb8, val=1) at
../../../gcc-trunk/libitm/config/linux/futex.cc:49
49        if (__builtin_expect (res == -ENOSYS, 0))
(gdb) bt
#0  GTM::futex_wait (addr=0x7ffff7fdfbb8, val=1) at
../../../gcc-trunk/libitm/config/linux/futex.cc:49
#1  0x00007ffff75cd1a4 in GTM::gtm_rwlock::read_lock (this=0x7ffff7fdfbb0,
tx=0x7fffd40008c0)
    at ../../../gcc-trunk/libitm/config/linux/rwlock.cc:76
#2  0x00007ffff75ccbfa in GTM::gtm_thread::decide_begin_dispatch
(this=0x7fffd40008c0, prop=<optimized out>)
    at ../../../gcc-trunk/libitm/retry.cc:182
#3  0x00007ffff75cc16b in GTM_begin_transaction (prop=41, jb=0x7ffff522edb0) at
../../../gcc-trunk/libitm/beginend.cc:235
#4  0x00007ffff75cd853 in _ITM_beginTransaction () at
../../../gcc-trunk/libitm/config/x86/sjlj.S:74
#5  0x00000000004021ab in work ()
#6  0x000000000040308d in threadWait ()
#7  0x0000003ecb407b41 in start_thread () from /lib64/libpthread.so.0
#8  0x0000003eca8df49d in clone () from /lib64/libc.so.6


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libitm/52526] libitm: stuck in futex_wait
  2012-03-07 22:41 [Bug libitm/52526] New: libitm: stuck in futex_wait patrick.marlier at gmail dot com
@ 2012-03-08 12:43 ` torvald at gcc dot gnu.org
  2012-03-10 17:46 ` torvald at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: torvald at gcc dot gnu.org @ 2012-03-08 12:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526

torvald at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-03-08
         AssignedTo|unassigned at gcc dot       |torvald at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libitm/52526] libitm: stuck in futex_wait
  2012-03-07 22:41 [Bug libitm/52526] New: libitm: stuck in futex_wait patrick.marlier at gmail dot com
  2012-03-08 12:43 ` [Bug libitm/52526] " torvald at gcc dot gnu.org
@ 2012-03-10 17:46 ` torvald at gcc dot gnu.org
  2012-03-12 21:30 ` patrick.marlier at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: torvald at gcc dot gnu.org @ 2012-03-10 17:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526

--- Comment #1 from torvald at gcc dot gnu.org 2012-03-10 17:46:12 UTC ---
Patrick, I posted a fix to gcc-patches.  Please have a look if you can.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libitm/52526] libitm: stuck in futex_wait
  2012-03-07 22:41 [Bug libitm/52526] New: libitm: stuck in futex_wait patrick.marlier at gmail dot com
  2012-03-08 12:43 ` [Bug libitm/52526] " torvald at gcc dot gnu.org
  2012-03-10 17:46 ` torvald at gcc dot gnu.org
@ 2012-03-12 21:30 ` patrick.marlier at gmail dot com
  2012-03-13 22:04 ` torvald at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: patrick.marlier at gmail dot com @ 2012-03-12 21:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526

--- Comment #2 from Patrick Marlier <patrick.marlier at gmail dot com> 2012-03-12 21:29:30 UTC ---
Indeed, with your proposed patch, it fixes the problem. Thanks!


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libitm/52526] libitm: stuck in futex_wait
  2012-03-07 22:41 [Bug libitm/52526] New: libitm: stuck in futex_wait patrick.marlier at gmail dot com
                   ` (2 preceding siblings ...)
  2012-03-12 21:30 ` patrick.marlier at gmail dot com
@ 2012-03-13 22:04 ` torvald at gcc dot gnu.org
  2012-03-13 22:13 ` torvald at gcc dot gnu.org
  2012-03-13 22:14 ` torvald at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: torvald at gcc dot gnu.org @ 2012-03-13 22:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526

--- Comment #3 from torvald at gcc dot gnu.org 2012-03-13 22:01:41 UTC ---
Author: torvald
Date: Tue Mar 13 22:01:34 2012
New Revision: 185358

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185358
Log:
libitm: Fix lost wake-up in serial lock.

    PR libitm/52526
    * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
    wake-up.

Modified:
    trunk/libitm/ChangeLog
    trunk/libitm/config/linux/rwlock.cc


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libitm/52526] libitm: stuck in futex_wait
  2012-03-07 22:41 [Bug libitm/52526] New: libitm: stuck in futex_wait patrick.marlier at gmail dot com
                   ` (3 preceding siblings ...)
  2012-03-13 22:04 ` torvald at gcc dot gnu.org
@ 2012-03-13 22:13 ` torvald at gcc dot gnu.org
  2012-03-13 22:14 ` torvald at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: torvald at gcc dot gnu.org @ 2012-03-13 22:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526

--- Comment #4 from torvald at gcc dot gnu.org 2012-03-13 22:11:52 UTC ---
Author: torvald
Date: Tue Mar 13 22:11:46 2012
New Revision: 185360

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185360
Log:
libitm: Fix lost wake-up in serial lock.

    PR libitm/52526
    Backported from mainline.
    * config/linux/rwlock.cc (GTM::gtm_rwlock::read_lock): Fix lost
    wake-up.

Modified:
    branches/gcc-4_7-branch/libitm/ChangeLog
    branches/gcc-4_7-branch/libitm/config/linux/rwlock.cc


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libitm/52526] libitm: stuck in futex_wait
  2012-03-07 22:41 [Bug libitm/52526] New: libitm: stuck in futex_wait patrick.marlier at gmail dot com
                   ` (4 preceding siblings ...)
  2012-03-13 22:13 ` torvald at gcc dot gnu.org
@ 2012-03-13 22:14 ` torvald at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: torvald at gcc dot gnu.org @ 2012-03-13 22:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52526

torvald at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from torvald at gcc dot gnu.org 2012-03-13 22:13:16 UTC ---
Fixed in both trunk and 4.7.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-13 22:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-07 22:41 [Bug libitm/52526] New: libitm: stuck in futex_wait patrick.marlier at gmail dot com
2012-03-08 12:43 ` [Bug libitm/52526] " torvald at gcc dot gnu.org
2012-03-10 17:46 ` torvald at gcc dot gnu.org
2012-03-12 21:30 ` patrick.marlier at gmail dot com
2012-03-13 22:04 ` torvald at gcc dot gnu.org
2012-03-13 22:13 ` torvald at gcc dot gnu.org
2012-03-13 22:14 ` torvald at gcc dot gnu.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).