Am Dienstag, den 26.11.2013, 00:18 +0100 schrieb Mark Wielaard:
> On Mon, Nov 25, 2013 at 10:40:40PM +0000, Tom Hughes wrote:
> > On 25/11/13 22:06, Joël Krähemann wrote:
> > 
> > > Hi, I get this nice error message out of valgrind while starting or
> > > using my application and I don't know why.
> > >
> > > http://sf.net/p/ags
> > >
> > > Please help.
> > 
> > Given the location of the instruction I'm guessing you have a Haswell 
> > processor and you've built glibc with transactional memory support so 
> > that it is trying to do lock ellision using the transactional memory 
> > instructions.
I'm using g_atomic_int_set, g_atomic_int_get, g_atomic_int_xor and
g_atomic_int_and to implement thread synchronization. Could theses
functions be the problem or aren't they working proper?
> > 
> > The transactional memory instructions aren't fully supported in valgrind 
> > yet, so you'll probably have to rebuild glibc without that support for now.
> 
> This is somewhat unfortunate. We do have prelimenary support, but only
> implemented xstart and xtest to indicate the transaction always immediately
> fails. The instruction hit is xabort, which in the valgrind case would
> always just be a NOP since no transaction is (can be) active.
> 
> If there isn't a bug report for XABORT not being implemented, please do
> file one. We really should add it.
Without running my application within valgrind I get the following out
of GDB.

***MEMORY-ERROR***: ags[14888]: GSlice: assertion failed: sinfo->n_allocated > 0

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe37fe700 (LWP 14892)]
0x00000034f2c35c59 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00000034f2c35c59 in raise () from /lib64/libc.so.6
#1  0x00000034f2c37368 in abort () from /lib64/libc.so.6
#2  0x00000034f5c1ab12 in mem_error () from /lib64/libglib-2.0.so.0
#3  0x00000034f5c6453b in slab_allocator_free_chunk () from 
/lib64/libglib-2.0.so.0
#4  0x00000034f5c647df in magazine_cache_push_magazine () from 
/lib64/libglib-2.0.so.0
#5  0x00000034f5c1b0ab in thread_memory_magazine2_unload.isra.11 () from 
/lib64/libglib-2.0.so.0
#6  0x00000034f5c656a8 in g_slice_free1 () from /lib64/libglib-2.0.so.0
#7  0x0000003509632de8 in _gtk_tree_data_list_header_free () from 
/lib64/libgtk-x11-2.0.so.0
#8  0x00000035094fdc7e in gtk_file_system_model_finalize () from 
/lib64/libgtk-x11-2.0.so.0
#9  0x00000034f7014fcb in g_object_unref () from /lib64/libgobject-2.0.so.0
#10 0x00000035094e4899 in recent_clear_model () from /lib64/libgtk-x11-2.0.so.0
#11 0x00000035094eb386 in operation_mode_set () from /lib64/libgtk-x11-2.0.so.0
#12 0x00000035094ec8b2 in shortcuts_activate_iter () from 
/lib64/libgtk-x11-2.0.so.0
#13 0x00000035094ecb33 in shortcuts_selection_changed_cb () from 
/lib64/libgtk-x11-2.0.so.0
#14 0x00000034f70104c7 in _g_closure_invoke_va () from 
/lib64/libgobject-2.0.so.0
#15 0x00000034f7029749 in g_signal_emit_valist () from 
/lib64/libgobject-2.0.so.0
#16 0x00000034f702a3af in g_signal_emit () from /lib64/libgobject-2.0.so.0
#17 0x00000035096582a6 in gtk_tree_view_real_set_cursor () from 
/lib64/libgtk-x11-2.0.so.0
#18 0x000000350965d175 in gtk_tree_view_button_press () from 
/lib64/libgtk-x11-2.0.so.0
#19 0x00000035095485bc in _gtk_marshal_BOOLEAN__BOXED () from 
/lib64/libgtk-x11-2.0.so.0
#20 0x00000034f7010298 in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#21 0x00000034f702211b in signal_emit_unlocked_R () from 
/lib64/libgobject-2.0.so.0
#22 0x00000034f7029ddd in g_signal_emit_valist () from 
/lib64/libgobject-2.0.so.0
#23 0x00000034f702a3af in g_signal_emit () from /lib64/libgobject-2.0.so.0
#24 0x0000003509677994 in gtk_widget_event_internal () from 
/lib64/libgtk-x11-2.0.so.0
#25 0x00000035095467e4 in gtk_propagate_event () from /lib64/libgtk-x11-2.0.so.0
#26 0x0000003509546bdb in gtk_main_do_event () from /lib64/libgtk-x11-2.0.so.0
#27 0x000000350846046c in gdk_event_dispatch () from /lib64/libgdk-x11-2.0.so.0
#28 0x00000034f5c492a6 in g_main_context_dispatch () from 
/lib64/libglib-2.0.so.0
#29 0x00000034f5c49628 in g_main_context_iterate.isra.24 () from 
/lib64/libglib-2.0.so.0
#30 0x00000034f5c496dc in g_main_context_iteration () from 
/lib64/libglib-2.0.so.0
#31 0x00000000004a1205 in ags_gui_thread_do_gtk_iteration () at 
./src/ags/thread/ags_gui_thread.c:221
#32 0x00000000004a14ba in ags_gui_thread_run () at 
./src/ags/thread/ags_gui_thread.c:255
#33 0x00000034f701043f in _g_closure_invoke_va () from 
/lib64/libgobject-2.0.so.0
#34 0x00000034f7029749 in g_signal_emit_valist () from 
/lib64/libgobject-2.0.so.0
#35 0x00000034f702a3af in g_signal_emit () from /lib64/libgobject-2.0.so.0
#36 0x000000000049f586 in ags_thread_run (thread=0x7f0000) at 
./src/ags/thread/ags_thread.c:1720
#37 0x000000000049f8ff in ags_thread_loop (ptr=<optimized out>) at 
./src/ags/thread/ags_thread.c:1643
#38 0x00000034f3407f33 in start_thread () from /lib64/libpthread.so.0
#39 0x00000034f2cf4ead in clone () from /lib64/libc.so.6

Is this abort caused by XABORT? I don't know much about CPU instructions
because I normally just do C and I expect that everything just works
fine.
By the way in what bugzilla should I file that bug. On valgrind.org or
maybe on fedoraproject.org? I'm using fedora 20-beta.

Here's the output of lscpu.

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 58
Model name:            Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz
Stepping:              9
CPU MHz:               2754.000
CPU max MHz:           3700.0000
CPU min MHz:           1200.0000
BogoMIPS:              5387.62
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K
NUMA node0 CPU(s):     0-7
> 
> Thanks,
> 
> Mark
regards
Joël



------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to