[ardour-dev] rogue thread(s) in ardour2

Doug McLain doug at nostar.net
Wed Mar 29 23:22:58 PST 2006


This is regarding some convo on irc yesterday. As a learning process 
I've been stepping thru the startup of ardour2 via gdb and noticed a 
rogue thread being created in fc5 (2, sometimes 3 at the same point in 
fc4).  Ive shown a gdb session from both fc4, and fc5. I traced it down 
to the call to glade_xml_construct() from 
libs/libglademm/libglademm/xml.cc during the initialization of the 
libglade based new_session_dialog.  This appears to be a glade thing. 
Problem or not?  This thread hangs around throughout the life of ardour2.

P.S.  I did try single 's'teping into that call instead of 'n'ext 
already, couldn't get any deeper into glade_xml_construct() since no 
symbols.  Same sorta problem trying to set a breakpoint in 
pthread_create() too.  I'm looking at try to set breakpoints by lib and 
address of symbol next.



The FC4 gdb session:

[nostar at localhost gtk2_ardour]$ gdb ardour.bin
GNU gdb Red Hat Linux (6.3.0.0-1.21rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host 
libthread_db library "/lib/libthread_db.so.1".

(gdb) break xml.cc:66
Breakpoint 1 at 0x8bb092b: file libs/libglademm/libglademm/xml.cc, line 66.
(gdb) run
Starting program: /home/nostar/src/ardour2/gtk2_ardour/ardour.bin
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x353000
[Thread debugging using libthread_db enabled]
[New Thread 3493024 (LWP 18296)]
Ardour/GTK 2.0alpha2
    (built using 1.0.2 with libardour 1.0.0 and GCC version 4.0.2 
20051125 (Red Hat 4.0.2-8))
Copyright (C) 1999-2005 Paul Davis
Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel 
Baker

Ardour comes with ABSOLUTELY NO WARRANTY
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is free software, and you are welcome to redistribute it
under certain conditions; see the source for copying conditions.
[Switching to Thread 3493024 (LWP 18296)]

Breakpoint 1, Xml (this=0x9c39190, filename=@0xbfb861a8, 
root=@0xbfb861a4, domain=@0xbfb86164) at 
libs/libglademm/libglademm/xml.cc:66
66        if(!glade_xml_construct(gobj(), filename.c_str(), root.empty() 
   ? 0 : root.c_str(),
(gdb) n
[New Thread 6093744 (LWP 18301)]
[New Thread 8842160 (LWP 18302)]
[New Thread 12868528 (LWP 18303)]
0x08bb0bc1      71      }
(gdb) thread apply all bt

Thread 4 (Thread 12868528 (LWP 18303)):
#0  0x00993dd8 in clone () from /lib/libc.so.6
#1  0x007d0f00 in ?? ()
#2  0x00000000 in ?? ()

Thread 3 (Thread 8842160 (LWP 18302)):
#0  0x00353402 in __kernel_vsyscall ()
#1  0x00b137a6 in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib/libpthread.so.0
#2  0x052672db in _gnome_vfs_thread_pool_init () from 
/usr/lib/libgnomevfs-2.so.0
#3  0x0014fe9a in g_static_private_free () from /usr/lib/libglib-2.0.so.0
#4  0x00b11b80 in start_thread () from /lib/libpthread.so.0
#5  0x00993dee in clone () from /lib/libc.so.6

Thread 2 (Thread 6093744 (LWP 18301)):
#0  0x00353402 in __kernel_vsyscall ()
#1  0x00989cec in poll () from /lib/libc.so.6
#2  0x00137248 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#3  0x001376e3 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#4  0x050a63de in link_thread_io_context () from /usr/lib/libORBit-2.so.0
#5  0x0014fe9a in g_static_private_free () from /usr/lib/libglib-2.0.so.0
#6  0x00b11b80 in start_thread () from /lib/libpthread.so.0
#7  0x00993dee in clone () from /lib/libc.so.6

Thread 1 (Thread 3493024 (LWP 18296)):
#0  0x08bb0bc1 in Xml (this=0x9c39190, filename=@0xbfb861a8, 
root=@0xbfb861a4, domain=@0xbfb86164) at 
libs/libglademm/libglademm/xml.cc:71
#1  0x08bb0bf4 in Gnome::Glade::Xml::create (filename=@0xbfb861a8, 
root=@0xbfb861a4, domain=@0xbfb86164) at 
libs/libglademm/libglademm/xml.cc:88
#2  0x087299b8 in GladeFactory::create (full_path_to_file=@0xbfb861a8, 
toplevel_widget=@0xbfb861a4) at gtk2_ardour/glade_factory.cc:32
#3  0x087c60eb in NewSessionDialogFactory::create () at 
gtk2_ardour/new_session_dialog.cc:37
#4  0x085724ca in ARDOUR_UI (this=0x9b1cd50, argcp=0xbfb86520, 
argvp=0xbfb86524, rcfile=@0xbfb86478) at gtk2_ardour/ardour_ui.cc:151
#5  0x0877a39a in main (argc=1, argv=0xbfb865a4) at gtk2_ardour/main.cc:354
(gdb)

And the FC5 gdb session:
[nostar at mainman gtk2_ardour]$ gdb ardour.bin
GNU gdb Red Hat Linux (6.3.0.0-1.122rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host 
libthread_db library "/lib/libthread_db.so.1".

(gdb) break xml.cc:66
Breakpoint 1 at 0x8653451: file libs/libglademm/libglademm/xml.cc, line 66.
(gdb) run
Starting program: /home/nostar/src/ardour2/gtk2_ardour/ardour.bin
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xd6f000
[Thread debugging using libthread_db enabled]
[New Thread -1208394912 (LWP 12252)]
Ardour/GTK 2.0alpha2
    (built using 1.0.2 with libardour 1.0.0 and GCC version 4.1.0 
20060304 (Red Hat 4.1.0-3))
Copyright (C) 1999-2005 Paul Davis
Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel 
Baker

Ardour comes with ABSOLUTELY NO WARRANTY
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is free software, and you are welcome to redistribute it
under certain conditions; see the source for copying conditions.
Using file ./ardour2_ui.rc found in ARDOUR_PATH.
Using file ./ardour.menus found in ARDOUR_PATH.
Using file ./ardour.colors found in ARDOUR_PATH.
Using file ./glade/new_session_dialog.glade found in ARDOUR_PATH.
[Switching to Thread -1208394912 (LWP 12252)]

Breakpoint 1, Xml (this=0x94bddd0, filename=@0xbfbbbf38, 
root=@0xbfbbbf34, domain=@0xbfbbbef4) at 
libs/libglademm/libglademm/xml.cc:66
66        if(!glade_xml_construct(gobj(), filename.c_str(), root.empty() 
   ? 0 : root.c_str(),
(gdb) n
[New Thread 112503712 (LWP 12257)]
0x086536d2      71      }
(gdb) thread apply all bt

Thread 2 (Thread 112503712 (LWP 12257)):
#0  0x00d6f402 in __kernel_vsyscall ()
#1  0x00c628c1 in __lll_mutex_unlock_wake () from /lib/libpthread.so.0
#2  0x00c5f8f1 in _L_mutex_unlock_397 () from /lib/libpthread.so.0
#3  0x00c5f7e1 in pthread_mutex_unlock () from /lib/libpthread.so.0
#4  0x009da1f9 in pthread_mutex_unlock () from /lib/libc.so.6
#5  0x02d59e1e in giop_send_buffer_use_request () from 
/usr/lib/libORBit-2.so.0
#6  0x02d5b56f in giop_connection_handle_input () from 
/usr/lib/libORBit-2.so.0
#7  0x02d78d8d in link_connection_state_changed () from 
/usr/lib/libORBit-2.so.0
#8  0x02d7bc2e in link_io_add_watch_fd () from /usr/lib/libORBit-2.so.0
#9  0x0023209d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#10 0x0023532f in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#11 0x002356d9 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#12 0x02d77ba0 in link_set_io_thread () from /usr/lib/libORBit-2.so.0
#13 0x0024f8ef in g_thread_create_full () from /usr/lib/libglib-2.0.so.0
#14 0x00c5d3b6 in start_thread () from /lib/libpthread.so.0
#15 0x009ce33e in clone () from /lib/libc.so.6

Thread 1 (Thread -1208394912 (LWP 12252)):
#0  0x086536d2 in Xml (this=0x94bddd0, filename=@0xbfbbbf38, 
root=@0xbfbbbf34, domain=@0xbfbbbef4)
     at libs/libglademm/libglademm/xml.cc:71
#1  0x08653714 in Gnome::Glade::Xml::create (filename=@0xbfbbbf38, 
root=@0xbfbbbf34, domain=@0xbfbbbef4)
     at libs/libglademm/libglademm/xml.cc:88
#2  0x084d2f37 in GladeFactory::create (full_path_to_file=@0xbfbbbf38, 
toplevel_widget=@0xbfbbbf34) at gtk2_ardour/glade_factory.cc:32
#3  0x085685a7 in NewSessionDialogFactory::create () at 
gtk2_ardour/new_session_dialog.cc:37
#4  0x083354fe in ARDOUR_UI (this=0x93b5380, argcp=0xbfbbc230, 
argvp=0xbfbbc234, rcfile=@0xbfbbc180) at gtk2_ardour/ardour_ui.cc:150
#5  0x0851f39f in main (argc=1, argv=0xbfbbc2b4) at gtk2_ardour/main.cc:370
(gdb)





More information about the Ardour-Dev mailing list