Bug#754392: libc6:amd64: lock elision code used on machine not supporting TSX (xbegin, ...) instructions

2014-09-13 Thread Hector Oron
Hello,

On Thu, Jul 10, 2014 at 04:52:42PM +0200, Laurent Bigonville wrote:
 Package: libc6
 Version: 2.19-5
 Severity: serious
 
 Hi,
 
 On my amd64 machine, weston is crashing on exit with an illegal
 instruction when the colord plugin is loaded.

On weston 1.5.93, having loaded modules=xwayland.so,cms-colord.so:

[11:29:15.522] Loading module '/usr/lib/i386-linux-gnu/weston/cms-colord.so'
[11:29:15.525] colord: initialized
[11:29:15.533] colord: output (null) coldplugged
[11:29:15.533] colord: output added xrandr-xwayland-none
[11:29:15.541] launching '/usr/lib/weston/weston-desktop-shell'
[11:29:15.550] colord: no assigned color profile for xrandr-xwayland-none
[11:29:15.550] colord: dispatching events

Apparently the segfault goes away, could you please test with upcoming 
experimental version? TIA

Please consider to close the issue if it is gone for you or consider a severity 
downgrade.

Regards,
-- 
  Hector Oron


signature.asc
Description: Digital signature


Bug#754392: libc6:amd64: lock elision code used on machine not supporting TSX (xbegin, ...) instructions

2014-09-13 Thread Hector Oron
On Sat, Sep 13, 2014 at 11:35:28AM +0200, Hector Oron wrote:
 On Thu, Jul 10, 2014 at 04:52:42PM +0200, Laurent Bigonville wrote:
 
 Please consider to close the issue if it is gone for you or consider a 
 severity downgrade.

Actually, this issue does not render weston unusable, therefore I consider this 
issue at most important severity. I hope you agree.

The issue is already fixed in 1.5.93-1, it should be closed once it hits 
sid/testing.

Regards,
-- 
  Hector Oron


signature.asc
Description: Digital signature


Bug#754392: libc6:amd64: lock elision code used on machine not supporting TSX (xbegin, ...) instructions

2014-07-27 Thread Emilio Pozuelo Monfort
On 12/07/14 21:29, Aurelien Jarno wrote:
 reassign 754392 weston/1.5.0-2
 retitle 754392 weston: segfault on exit when cms-colord.so is loaded
 forwarded 754392 https://bugs.freedesktop.org/show_bug.cgi?id=79560
 thanks
 
 On Thu, Jul 10, 2014 at 09:03:34PM +0200, Aurelien Jarno wrote:
 On Thu, Jul 10, 2014 at 04:52:42PM +0200, Laurent Bigonville wrote:
 Package: libc6
 Version: 2.19-5
 Severity: serious

 Hi,

 On my amd64 machine, weston is crashing on exit with an illegal
 instruction when the colord plugin is loaded.

 Using gdb shows me the following backtrace:

 #0  0x7681d18b in _xbegin () at 
 ../nptl/sysdeps/unix/sysv/linux/x86/hle.h:53
 #1  __lll_lock_elision (futex=0x727ab0, adapt_count=0x727ac6, private=128) 
 at ../nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c:56
 #2  0x7fffeca9d991 in g_mutex_lock (mutex=optimized out) at 
 /tmp/buildd/glib2.0-2.40.0/./glib/gthread-posix.c:209
 #3  0x7fffed732e5f in colord_idle_cancel_for_output 
 (cms=0x7fffe0003050, o=0x6dbca0) at src/cms-colord.c:77
 #4  0x7fffed7333bf in colord_notifier_output_destroy 
 (listener=0x7fffe00030a8, data=0x6dbca0) at src/cms-colord.c:223
 #5  0x00407673 in wl_signal_emit (signal=0x6dbeb0, data=0x6dbca0) 
 at /usr/include/wayland-server.h:260
 #6  0x0040e9a3 in weston_output_destroy (output=0x6dbca0) at 
 src/compositor.c:3119
 #7  0x76600b23 in x11_output_destroy (output_base=0x6dbca0) at 
 src/compositor-x11.c:497
 #8  0x76601c72 in x11_compositor_delete_window (c=0x6400c0, 
 window=50331653) at src/compositor-x11.c:935
 #9  0x766027a2 in x11_compositor_handle_event (fd=10, mask=1, 
 data=0x6400c0) at src/compositor-x11.c:1273
 #10 0x77bd3c22 in wl_event_loop_dispatch (loop=0x641290, 
 timeout=optimized out) at ../src/event-loop.c:419
 #11 0x0040c164 in weston_compositor_read_input (fd=9, mask=1, 
 data=0x6400c0) at src/compositor.c:1830
 #12 0x77bd3c22 in wl_event_loop_dispatch (loop=0x630240, 
 timeout=timeout@entry=-1) at ../src/event-loop.c:419
 #13 0x77bd2265 in wl_display_run (display=0x6301b0) at 
 ../src/wayland-server.c:969
 #14 0x0041116f in main (argc=1, argv=0x7fffe138) at 
 src/compositor.c:4316


 This is the (illegal) instruction executed:
 = 0x7681d18b __lll_lock_elision+75:  xbeginq 0x7681d191 
 __lll_lock_elision+81

 These instruction are only available on Haswell+ CPU's


 Do you also have problems with other programs than Weston? I really
 doubt this is a bug in the libc. For me it looks like the memory holding
 the mutex has been corrupted, forcing the PTHREAD_MUTEX_ELISION_NP flag.
 Unfortunately it's not easy to check as the mutex variable is not 
 accessible in gdb due do the code optimization.

 However the only code path in the glibc which can enable this flag is
 executed conditionally when the __pthread_force_elision variable is set.
 Could you please therefore run print __pthread_force_elision in gdb
 after getting the backtrace?
 
 I have been able to reproduce the problem, and I confirmed that
 __pthread_force_elision is set to 0. Also the problem is an illegal
 instruction only part of the time, other times I also got this following
 error:
 
 | GLib (gthread-posix.c): Unexpected error from C library during 
 'pthread_mutex_lock': Invalid argument.  Aborting.
 | [21:01:32.483] caught signal: 6
 | [21:01:32.483]   [0040814a]  --  (weston)
 | [21:01:32.483]   [004081b7]  --  (weston)
 | [21:01:32.483]   [7ff4a4c98480]  --  (/lib/x86_64-linux-gnu/libc.so.6)
 | [21:01:32.483]   [7ff4a4c98407]  gsignal  
 (/lib/x86_64-linux-gnu/libc.so.6)
 | [21:01:32.484]   [7ff4a4c997e8]  abort  
 (/lib/x86_64-linux-gnu/libc.so.6)
 | [21:01:32.484]   [7ff49a2d9453]  --  
 (/lib/x86_64-linux-gnu/libglib-2.0.so.0)
 | [21:01:32.484]   [7ff49a3489a3]  g_mutex_lock  
 (/lib/x86_64-linux-gnu/libglib-2.0.so.0)
 | [21:01:32.484]   [7ff49afddf15]  --  
 (/usr/lib/x86_64-linux-gnu/weston/cms-colord.so)
 | [21:01:32.484]   [7ff49afde750]  --  
 (/usr/lib/x86_64-linux-gnu/weston/cms-colord.so)
 | [21:01:32.484]   [0040dc54]  weston_output_destroy  (weston)
 | [21:01:32.484]   [7ff4a442d1fa]  --  
 (/usr/lib/x86_64-linux-gnu/weston/x11-backend.so)
 | [21:01:32.484]   [7ff4a442d674]  --  
 (/usr/lib/x86_64-linux-gnu/weston/x11-backend.so)
 | [21:01:32.484]   [7ff4a59fdc22]  wl_event_loop_dispatch  
 (/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
 | [21:01:32.484]   [00408d32]  --  (weston)
 | [21:01:32.484]   [7ff4a59fdc22]  wl_event_loop_dispatch  
 (/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
 | [21:01:32.484]   [7ff4a59fc265]  wl_display_run  
 (/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
 | [21:01:32.484]   [0040785c]  --  (weston)
 | [21:01:32.484]   [7ff4a4c84b45]  __libc_start_main  
 (/lib/x86_64-linux-gnu/libc.so.6)
 | [21:01:32.484]   [00407a35]  --  (weston)
 
 This clearly show that the 

Bug#754392: libc6:amd64: lock elision code used on machine not supporting TSX (xbegin, ...) instructions

2014-07-12 Thread Aurelien Jarno
reassign 754392 weston/1.5.0-2
retitle 754392 weston: segfault on exit when cms-colord.so is loaded
forwarded 754392 https://bugs.freedesktop.org/show_bug.cgi?id=79560
thanks

On Thu, Jul 10, 2014 at 09:03:34PM +0200, Aurelien Jarno wrote:
 On Thu, Jul 10, 2014 at 04:52:42PM +0200, Laurent Bigonville wrote:
  Package: libc6
  Version: 2.19-5
  Severity: serious
  
  Hi,
  
  On my amd64 machine, weston is crashing on exit with an illegal
  instruction when the colord plugin is loaded.
  
  Using gdb shows me the following backtrace:
  
  #0  0x7681d18b in _xbegin () at 
  ../nptl/sysdeps/unix/sysv/linux/x86/hle.h:53
  #1  __lll_lock_elision (futex=0x727ab0, adapt_count=0x727ac6, private=128) 
  at ../nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c:56
  #2  0x7fffeca9d991 in g_mutex_lock (mutex=optimized out) at 
  /tmp/buildd/glib2.0-2.40.0/./glib/gthread-posix.c:209
  #3  0x7fffed732e5f in colord_idle_cancel_for_output 
  (cms=0x7fffe0003050, o=0x6dbca0) at src/cms-colord.c:77
  #4  0x7fffed7333bf in colord_notifier_output_destroy 
  (listener=0x7fffe00030a8, data=0x6dbca0) at src/cms-colord.c:223
  #5  0x00407673 in wl_signal_emit (signal=0x6dbeb0, data=0x6dbca0) 
  at /usr/include/wayland-server.h:260
  #6  0x0040e9a3 in weston_output_destroy (output=0x6dbca0) at 
  src/compositor.c:3119
  #7  0x76600b23 in x11_output_destroy (output_base=0x6dbca0) at 
  src/compositor-x11.c:497
  #8  0x76601c72 in x11_compositor_delete_window (c=0x6400c0, 
  window=50331653) at src/compositor-x11.c:935
  #9  0x766027a2 in x11_compositor_handle_event (fd=10, mask=1, 
  data=0x6400c0) at src/compositor-x11.c:1273
  #10 0x77bd3c22 in wl_event_loop_dispatch (loop=0x641290, 
  timeout=optimized out) at ../src/event-loop.c:419
  #11 0x0040c164 in weston_compositor_read_input (fd=9, mask=1, 
  data=0x6400c0) at src/compositor.c:1830
  #12 0x77bd3c22 in wl_event_loop_dispatch (loop=0x630240, 
  timeout=timeout@entry=-1) at ../src/event-loop.c:419
  #13 0x77bd2265 in wl_display_run (display=0x6301b0) at 
  ../src/wayland-server.c:969
  #14 0x0041116f in main (argc=1, argv=0x7fffe138) at 
  src/compositor.c:4316
  
  
  This is the (illegal) instruction executed:
  = 0x7681d18b __lll_lock_elision+75:  xbeginq 0x7681d191 
  __lll_lock_elision+81
  
  These instruction are only available on Haswell+ CPU's
  
 
 Do you also have problems with other programs than Weston? I really
 doubt this is a bug in the libc. For me it looks like the memory holding
 the mutex has been corrupted, forcing the PTHREAD_MUTEX_ELISION_NP flag.
 Unfortunately it's not easy to check as the mutex variable is not 
 accessible in gdb due do the code optimization.
 
 However the only code path in the glibc which can enable this flag is
 executed conditionally when the __pthread_force_elision variable is set.
 Could you please therefore run print __pthread_force_elision in gdb
 after getting the backtrace?

I have been able to reproduce the problem, and I confirmed that
__pthread_force_elision is set to 0. Also the problem is an illegal
instruction only part of the time, other times I also got this following
error:

| GLib (gthread-posix.c): Unexpected error from C library during 
'pthread_mutex_lock': Invalid argument.  Aborting.
| [21:01:32.483] caught signal: 6
| [21:01:32.483]   [0040814a]  --  (weston)
| [21:01:32.483]   [004081b7]  --  (weston)
| [21:01:32.483]   [7ff4a4c98480]  --  (/lib/x86_64-linux-gnu/libc.so.6)
| [21:01:32.483]   [7ff4a4c98407]  gsignal  
(/lib/x86_64-linux-gnu/libc.so.6)
| [21:01:32.484]   [7ff4a4c997e8]  abort  (/lib/x86_64-linux-gnu/libc.so.6)
| [21:01:32.484]   [7ff49a2d9453]  --  
(/lib/x86_64-linux-gnu/libglib-2.0.so.0)
| [21:01:32.484]   [7ff49a3489a3]  g_mutex_lock  
(/lib/x86_64-linux-gnu/libglib-2.0.so.0)
| [21:01:32.484]   [7ff49afddf15]  --  
(/usr/lib/x86_64-linux-gnu/weston/cms-colord.so)
| [21:01:32.484]   [7ff49afde750]  --  
(/usr/lib/x86_64-linux-gnu/weston/cms-colord.so)
| [21:01:32.484]   [0040dc54]  weston_output_destroy  (weston)
| [21:01:32.484]   [7ff4a442d1fa]  --  
(/usr/lib/x86_64-linux-gnu/weston/x11-backend.so)
| [21:01:32.484]   [7ff4a442d674]  --  
(/usr/lib/x86_64-linux-gnu/weston/x11-backend.so)
| [21:01:32.484]   [7ff4a59fdc22]  wl_event_loop_dispatch  
(/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
| [21:01:32.484]   [00408d32]  --  (weston)
| [21:01:32.484]   [7ff4a59fdc22]  wl_event_loop_dispatch  
(/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
| [21:01:32.484]   [7ff4a59fc265]  wl_display_run  
(/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
| [21:01:32.484]   [0040785c]  --  (weston)
| [21:01:32.484]   [7ff4a4c84b45]  __libc_start_main  
(/lib/x86_64-linux-gnu/libc.so.6)
| [21:01:32.484]   [00407a35]  --  (weston)

This clearly show that the memory corresponding to the 

Processed (with 1 errors): Re: Bug#754392: libc6:amd64: lock elision code used on machine not supporting TSX (xbegin, ...) instructions

2014-07-12 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 reassign 754392 weston/1.5.0-2
Unknown command or malformed arguments to command.
 retitle 754392 weston: segfault on exit when cms-colord.so is loaded
Bug #754392 [libc6] libc6:amd64: lock elision code used on machine not 
supporting TSX (xbegin, ...) instructions
Changed Bug title to 'weston: segfault on exit when cms-colord.so is loaded' 
from 'libc6:amd64: lock elision code used on machine not supporting TSX 
(xbegin, ...) instructions'
 forwarded 754392 https://bugs.freedesktop.org/show_bug.cgi?id=79560
Bug #754392 [libc6] weston: segfault on exit when cms-colord.so is loaded
Set Bug forwarded-to-address to 
'https://bugs.freedesktop.org/show_bug.cgi?id=79560'.
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
754392: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754392
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#754392: libc6:amd64: lock elision code used on machine not supporting TSX (xbegin, ...) instructions

2014-07-10 Thread Laurent Bigonville
Package: libc6
Version: 2.19-5
Severity: serious

Hi,

On my amd64 machine, weston is crashing on exit with an illegal
instruction when the colord plugin is loaded.

Using gdb shows me the following backtrace:

#0  0x7681d18b in _xbegin () at 
../nptl/sysdeps/unix/sysv/linux/x86/hle.h:53
#1  __lll_lock_elision (futex=0x727ab0, adapt_count=0x727ac6, private=128) at 
../nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c:56
#2  0x7fffeca9d991 in g_mutex_lock (mutex=optimized out) at 
/tmp/buildd/glib2.0-2.40.0/./glib/gthread-posix.c:209
#3  0x7fffed732e5f in colord_idle_cancel_for_output (cms=0x7fffe0003050, 
o=0x6dbca0) at src/cms-colord.c:77
#4  0x7fffed7333bf in colord_notifier_output_destroy 
(listener=0x7fffe00030a8, data=0x6dbca0) at src/cms-colord.c:223
#5  0x00407673 in wl_signal_emit (signal=0x6dbeb0, data=0x6dbca0) at 
/usr/include/wayland-server.h:260
#6  0x0040e9a3 in weston_output_destroy (output=0x6dbca0) at 
src/compositor.c:3119
#7  0x76600b23 in x11_output_destroy (output_base=0x6dbca0) at 
src/compositor-x11.c:497
#8  0x76601c72 in x11_compositor_delete_window (c=0x6400c0, 
window=50331653) at src/compositor-x11.c:935
#9  0x766027a2 in x11_compositor_handle_event (fd=10, mask=1, 
data=0x6400c0) at src/compositor-x11.c:1273
#10 0x77bd3c22 in wl_event_loop_dispatch (loop=0x641290, 
timeout=optimized out) at ../src/event-loop.c:419
#11 0x0040c164 in weston_compositor_read_input (fd=9, mask=1, 
data=0x6400c0) at src/compositor.c:1830
#12 0x77bd3c22 in wl_event_loop_dispatch (loop=0x630240, 
timeout=timeout@entry=-1) at ../src/event-loop.c:419
#13 0x77bd2265 in wl_display_run (display=0x6301b0) at 
../src/wayland-server.c:969
#14 0x0041116f in main (argc=1, argv=0x7fffe138) at 
src/compositor.c:4316


This is the (illegal) instruction executed:
= 0x7681d18b __lll_lock_elision+75:  xbeginq 0x7681d191 
__lll_lock_elision+81

These instruction are only available on Haswell+ CPU's

Cheers,

Laurent Bigonville

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_BE.utf8, LC_CTYPE=fr_BE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6:amd64 depends on:
ii  libgcc1  1:4.9.0-10

libc6:amd64 recommends no packages.

Versions of packages libc6:amd64 suggests:
ii  debconf [debconf-2.0]  1.5.53
pn  glibc-doc  none
ii  locales2.19-5

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#754392: libc6:amd64: lock elision code used on machine not supporting TSX (xbegin, ...) instructions

2014-07-10 Thread Aurelien Jarno
On Thu, Jul 10, 2014 at 04:52:42PM +0200, Laurent Bigonville wrote:
 Package: libc6
 Version: 2.19-5
 Severity: serious
 
 Hi,
 
 On my amd64 machine, weston is crashing on exit with an illegal
 instruction when the colord plugin is loaded.
 
 Using gdb shows me the following backtrace:
 
 #0  0x7681d18b in _xbegin () at 
 ../nptl/sysdeps/unix/sysv/linux/x86/hle.h:53
 #1  __lll_lock_elision (futex=0x727ab0, adapt_count=0x727ac6, private=128) at 
 ../nptl/sysdeps/unix/sysv/linux/x86/elision-lock.c:56
 #2  0x7fffeca9d991 in g_mutex_lock (mutex=optimized out) at 
 /tmp/buildd/glib2.0-2.40.0/./glib/gthread-posix.c:209
 #3  0x7fffed732e5f in colord_idle_cancel_for_output (cms=0x7fffe0003050, 
 o=0x6dbca0) at src/cms-colord.c:77
 #4  0x7fffed7333bf in colord_notifier_output_destroy 
 (listener=0x7fffe00030a8, data=0x6dbca0) at src/cms-colord.c:223
 #5  0x00407673 in wl_signal_emit (signal=0x6dbeb0, data=0x6dbca0) at 
 /usr/include/wayland-server.h:260
 #6  0x0040e9a3 in weston_output_destroy (output=0x6dbca0) at 
 src/compositor.c:3119
 #7  0x76600b23 in x11_output_destroy (output_base=0x6dbca0) at 
 src/compositor-x11.c:497
 #8  0x76601c72 in x11_compositor_delete_window (c=0x6400c0, 
 window=50331653) at src/compositor-x11.c:935
 #9  0x766027a2 in x11_compositor_handle_event (fd=10, mask=1, 
 data=0x6400c0) at src/compositor-x11.c:1273
 #10 0x77bd3c22 in wl_event_loop_dispatch (loop=0x641290, 
 timeout=optimized out) at ../src/event-loop.c:419
 #11 0x0040c164 in weston_compositor_read_input (fd=9, mask=1, 
 data=0x6400c0) at src/compositor.c:1830
 #12 0x77bd3c22 in wl_event_loop_dispatch (loop=0x630240, 
 timeout=timeout@entry=-1) at ../src/event-loop.c:419
 #13 0x77bd2265 in wl_display_run (display=0x6301b0) at 
 ../src/wayland-server.c:969
 #14 0x0041116f in main (argc=1, argv=0x7fffe138) at 
 src/compositor.c:4316
 
 
 This is the (illegal) instruction executed:
 = 0x7681d18b __lll_lock_elision+75:xbeginq 0x7681d191 
 __lll_lock_elision+81
 
 These instruction are only available on Haswell+ CPU's
 

Do you also have problems with other programs than Weston? I really
doubt this is a bug in the libc. For me it looks like the memory holding
the mutex has been corrupted, forcing the PTHREAD_MUTEX_ELISION_NP flag.
Unfortunately it's not easy to check as the mutex variable is not 
accessible in gdb due do the code optimization.

However the only code path in the glibc which can enable this flag is
executed conditionally when the __pthread_force_elision variable is set.
Could you please therefore run print __pthread_force_elision in gdb
after getting the backtrace?

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org