After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 120194 - Crash while changing view during library population
Crash while changing view during library population
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
unspecified
Other other
: High critical
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-08-19 00:02 UTC by Jason Cook
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
(240 bytes, application/pgp-signature)
2003-08-19 00:03 UTC, Unknown User
Details
Backtrace (10.38 KB, text/plain)
2003-09-09 10:50 UTC, Yann Rouillard
Details
Backtrace of the deadlock (11.99 KB, text/plain)
2003-09-09 10:54 UTC, Yann Rouillard
Details

Description Jason Cook 2003-08-19 00:03:55 UTC
Package: rhythmbox
Severity: normal
Version: 0.5.0
Synopsis: Crash while changing view during library population
Bugzilla-Product: rhythmbox
Bugzilla-Component: General
BugBuddy-GnomeVersion: 2.0 (2.2.2)

Description:
Description of Problem:

Segfault while adding songs and changing artist/album/genre views

Steps to reproduce the problem:
1. Add a music library
2. While running, open the prefs
3. Click between the various display modes, crashed after 3-4 changes

Actual Results:
Crash, also got it to hang indefinately on another try

Expected Results:
Successful addition of tracks and ability to change the view

How often does this happen?
Have been able to repeat consistently

Additional Information:
Songs being loaded via nfs
There are some bag id3 tags
Oggs also exist in the collection



Debugging Information:

Backtrace was generated from '/usr/bin/rhythmbox'

(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...[New Thread 16384 (LWP 1580)]
[New Thread 32769 (LWP 1581)]
[New Thread 16386 (LWP 1582)]
[New Thread 32771 (LWP 1583)]
(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
0x407efbf0 in waitpid () from /lib/libpthread.so.0

Thread 1 (Thread 16384 (LWP 1580))

  • #0 waitpid
    from /lib/libpthread.so.0
  • #1 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #2 __pthread_sighandler
    from /lib/libpthread.so.0
  • #3 <signal handler called>
  • #4 memcpy
    from /lib/libc.so.6
  • #5 g_array_append_vals
    from /usr/lib/libglib-2.0.so.0
  • #6 gtk_tree_model_sort_new_with_model
  • #7 gtk_tree_model_sort_new_with_model
  • #8 gtk_tree_sortable_set_sort_column_id
    from /usr/lib/libgtk-x11-2.0.so.0
  • #9 rb_node_view_get_model
  • #10 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #15 rb_node_filter_done_changing
  • #16 rb_library_source_eval_filter
  • #17 rb_library_source_new
  • #18 g_cclosure_marshal_VOID__POINTER
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #22 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #23 rb_node_view_get_random_node
  • #24 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #25 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #26 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #29 _gtk_tree_selection_internal_select_node
    from /usr/lib/libgtk-x11-2.0.so.0
  • #30 gtk_tree_selection_select_path
    from /usr/lib/libgtk-x11-2.0.so.0
  • #31 gtk_tree_selection_select_iter
    from /usr/lib/libgtk-x11-2.0.so.0
  • #32 rb_node_view_select_node
  • #33 ??
  • #34 ??
  • #35 ??
  • #36 ??
  • #37 ??
  • #38 ??
  • #39 ??
  • #0 waitpid
    from /lib/libpthread.so.0


-- 
Jason Cook                    GnuPG Fingerprint: D531 F4F4 BDBF 41D1 514D
http://reinit.org                                F930 FD03 262E 5120 BEDD





------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-08-18 20:03 -------

Reassigning to the default owner of the component, rhythmbox-maint@bugzilla.gnome.org.

Comment 1 Colin Walters 2003-08-30 03:12:57 UTC
Thanks for the information, I think it is the same bug as 120125.

*** This bug has been marked as a duplicate of 120125 ***
Comment 2 Colin Walters 2003-08-30 12:52:01 UTC
Er, gah.  Wrong bug.
Comment 3 Yann Rouillard 2003-09-09 10:44:01 UTC
I tried to reproduce this bug and I was able to reproduce it each time
I tried.
I had two behaviours:

- the application crashes, attached my backtrace. The bug seems to be
caused by an invalid EggTreeModelFilter GtkTreeIter. I investigated
and it seems that EggTreeModelFilter increments its internals stamps
during some row deletion or addition, to invalidate the previous iters
I suppose. I bet it's a multi thread problem, TreeView sorting is done
while another thread add new song/row to the gtktreeview.

Could it be solved by the new thread design ?
Comment 4 Yann Rouillard 2003-09-09 10:50:54 UTC
Created attachment 19822 [details]
Backtrace
Comment 5 Yann Rouillard 2003-09-09 10:53:42 UTC
- the second behaviour is maybe more alarming. It's a deadlock.
Looking at the backtrace I don't understand right now how a reader
thread and a writer thread can deadlock but here is the backtrace.
Comment 6 Yann Rouillard 2003-09-09 10:54:19 UTC
Created attachment 19823 [details]
Backtrace of the deadlock
Comment 7 Yann Rouillard 2003-09-09 16:36:03 UTC
Eventually I understood the deadlock it happens because of
rb_node_get_children which hold a read lock which must be unlock by
rb_node_thaw. 
The problem is that between those 2 calls you shouldn't not try to
acquire again a read lock, because this could lead to the following
scenario:

- Thread 1 calls rb_node_get_children -> acquires read lock
- switch to thread 4 which tries to write on the same node, it will
try to acquire a write lock but he can't since Thread 1 has a read
lock, so it wait on condition.
- switch again to Thread 1 which tries to acquire another read lock,
it will block since there is a writer waiting (they seem to have
priority). So it will block here and never release the first read lock
=> deadlock

This is what happens here in thread 1 in the function
filter_changed_cb there is a call to rb_node_get_children and then a
call to rb_tree_model_node_update_node this triggers many callbacks
functions and one of them calls rb_node_get_nth_child.
In the meantime the Thread 4 wanted to add a child. . .

I don't know if there are many place where this deadlock can arise, I
  only noticed one other place, in the get_status_normal function
rb-library.c
 
Comment 8 Colin Walters 2003-10-02 03:01:18 UTC
This is fixed in the latest arch/cvs.