View Single Post
Old 12-26-11, 06:03 AM   #5
edscottwilson
Registered User
 
Join Date: Dec 2011
Posts: 2
Default Re: Segfault with 285.05.09

I've now posted a nvidia-bug-report with the following information.

The bug apparently is due to a race condition between threads, and therefore is not reproducible on demand. I have not yet pinpointed the race, but it happens in current svn code for "rodent filemanager" apparently when two threads are producing graphic output via the gtk library. These threads are protected with a mutex (GDK_THREADS_ENTER/LEAVE) mechanism.

Latest core dump reveals that after a program fork, the wrong process is inheriting the gtk loop and thus all graphic output is blocked. I don't know exactly how gtk determines which process keeps the gtk event loop after a fork, but in my experience, the first process which has graphic i/o keeps the event loop. This is the latest traceback:

Core was generated by `rodent-forked /raid/home/SVN/xffm/CURRENT/rodent'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f20f9761c50 in _nv019tls () from /usr/lib64/tls/libnvidia-tls.so.290.10
(gdb) where
#0 0x00007f20f9761c50 in _nv019tls () from /usr/lib64/tls/libnvidia-tls.so.290.10
#1 0x00007f20fba15966 in fork () from /lib64/libc.so.6
#2 0x00007f210072b30b in Tubo_threads (fork_function=0x7f210071d539 <fork_function>,
fork_function_data=0x7fffbe080910, stdin_fd=0x0, stdout_f=0x7f210071b9f5 <rfm_operate_stdout>,
stderr_f=0x7f210071b96e <rfm_operate_stderr>,
tubo_done_f=0x7f210071d517 <run_fork_finished_function>, user_function_data=0x80c900,
reap_child=0, check_valid_ansi_sequence=1) at ../../libs/tubo/src/tubo.c:109
#3 0x00007f210071e88c in thread_run (in_widgets_p=0x682328, argv=0x7fffbe080910,
stdout_f=0x7f210071b9f5 <rfm_operate_stdout>, stderr_f=0x7f210071b96e <rfm_operate_stderr>,
stdin_fd=0x0) at ../../libs/rfm/primary/primary-run.i:444
#4 0x00007f210071eb8b in private_rfm_thread_run_argv (in_widgets_p=0x682328, argv=0x7fffbe0849e0,
interm=1, stdout_f=0, stderr_f=0, stdin_fd=0x0) at ../../libs/rfm/primary/primary-run.i:508
#5 0x00007f210071f026 in rfm_thread_run_argv (widgets_p=0x682328, argv=0x7fffbe0849e0, interm=1)
at ../../libs/rfm/primary/primary-run.c:60
#6 0x00007f21004d448c in rodent_open_in_terminal_activate (menuitem=0x7f20e0065840,
user_data=0x682328) at ../../libs/rfm/rodent/rodent_popup.i:997
#7 0x00007f20fd63825e in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#8 0x00007f20fd64e6f7 in ?? () from /usr/lib64/libgobject-2.0.so.0
#9 0x00007f20fd64fbb6 in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#10 0x00007f20fd650143 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#11 0x00007f20ff9a06ee in gtk_widget_activate () from /usr/lib64/libgtk-x11-2.0.so.0
#12 0x00007f20ff893ced in gtk_menu_shell_activate_item () from /usr/lib64/libgtk-x11-2.0.so.0
#13 0x00007f20ff89558b in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#14 0x00007f20ff885a28 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#15 0x00007f20fd63825e in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
#16 0x00007f20fd64e340 in ?? () from /usr/lib64/libgobject-2.0.so.0
#17 0x00007f20fd64f9fb in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
#18 0x00007f20fd650143 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#19 0x00007f20ff99cd7f in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
#20 0x00007f20ff87dee3 in gtk_propagate_event () from /usr/lib64/libgtk-x11-2.0.so.0
#21 0x00007f20ff87ef9b in gtk_main_do_event () from /usr/lib64/libgtk-x11-2.0.so.0
#22 0x00007f20ff4f3e6c in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
#23 0x00007f20fcf4e262 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#24 0x00007f20fcf52928 in ?? () from /usr/lib64/libglib-2.0.so.0
#25 0x00007f20fcf52e35 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#26 0x00007f20ff87f437 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#27 0x00000000004033e4 in main (argc=2, argv=0x6294f0) at ../../src/rfm/fm/rodent.c:493

I will keep looking for the race condition which is triggering the segfault.
edscottwilson is offline   Reply With Quote