public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/16549] New: pthread_cond_wait and pthread_cond_timedwait do not suspend the calling thread
@ 2014-02-10 13:28 vinxxe at gmail dot com
  2014-02-10 13:29 ` [Bug nptl/16549] " vinxxe at gmail dot com
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: vinxxe at gmail dot com @ 2014-02-10 13:28 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=16549

            Bug ID: 16549
           Summary: pthread_cond_wait and pthread_cond_timedwait do not
                    suspend the calling thread
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: vinxxe at gmail dot com
                CC: drepper.fsp at gmail dot com

Created attachment 7402
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7402&action=edit
source file to reproduce the problem

the two functions

pthread_cond_wait and pthread_cond_timedwait

do not suspend the calling thread if the condition variable has a misaligned
address.

attached find the source code to reproduce the problem as well as a file
describing my current software configuration.

to compile 

gcc -g3 -pthread -o cond_ex cond_example.c

then run the program and watch the cpu load with 

top -p <process id>

should see the waiter tread continuously running instead of sleeping.

to remove the problem compile with

gcc -D_ALIGNED -g3 -pthread -o cond_ex cond_example.c

the followings are some system information of my linux machine


cat /proc/version
Linux version 2.6.32-220.7.1.el6.centos.plus.i686 (root@thalix11dev) (gcc
version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Mon Oct 21 07:05:28
UTC 2013

rpm -qa | grep glibc
glibc-devel-2.12-1.47.i686
glibc-common-2.12-1.47.i686
glibc-2.12-1.47.i686
glibc-debuginfo-2.12-1.47.i686
glibc-headers-2.12-1.47.i686
glibc-utils-2.12-1.47.i686
glibc-debuginfo-common-2.12-1.47.i686
glibc-static-2.12-1.47.i686

cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 15
model        : 3
model name    : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping    : 4
cpu MHz        : 2799.930
cache size    : 1024 KB
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 5
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc up pebs bts
pni dtes64 monitor ds_cpl cid xtpr
bogomips    : 5586.31
clflush size    : 64
cache_alignment    : 128
address sizes    : 36 bits physical, 32 bits virtual
power management:

rpm -qa | grep gcc
gcc-4.4.6-3.el6.i686
libgcc-4.4.6-3.el6.i686
gcc-c++-4.4.6-3.el6.i686

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-06-13  8:41 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-10 13:28 [Bug nptl/16549] New: pthread_cond_wait and pthread_cond_timedwait do not suspend the calling thread vinxxe at gmail dot com
2014-02-10 13:29 ` [Bug nptl/16549] " vinxxe at gmail dot com
2014-02-10 13:33 ` schwab@linux-m68k.org
2014-02-10 13:38 ` vinxxe at gmail dot com
2014-02-10 13:43 ` neleai at seznam dot cz
2014-02-10 13:45 ` jakub at redhat dot com
2014-02-10 13:46 ` vinxxe at gmail dot com
2014-02-11 17:50 ` bugdal at aerifal dot cx
2014-02-11 17:53 ` bugdal at aerifal dot cx
2014-02-11 18:54 ` vinxxe at gmail dot com
2014-02-12  9:24 ` vinxxe at gmail dot com
2014-02-12  9:35 ` schwab@linux-m68k.org
2014-02-12  9:43 ` vinxxe at gmail dot com
2014-02-12  9:48 ` jakub at redhat dot com
2014-02-12  9:51 ` vinxxe at gmail dot com
2014-02-12 10:01 ` schwab@linux-m68k.org
2014-02-12 10:09 ` vinxxe at gmail dot com
2014-02-12 10:44 ` schwab@linux-m68k.org
2014-02-12 11:34 ` vinxxe at gmail dot com
2014-02-12 17:10 ` bugdal at aerifal dot cx
2014-02-12 17:18 ` bugdal at aerifal dot cx
2014-02-12 17:25 ` vinxxe at gmail dot com
2014-02-12 17:42 ` vinxxe at gmail dot com
2014-06-13  8:41 ` fweimer at redhat dot com

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).