Hi, On Thu, Mar 25, 2010 at 12:05:56AM +0000, Edd Barrett wrote: > On Wed, Mar 24, 2010 at 11:41:41PM +0300, Kirill Bychkov wrote: > > > I thought I'd try this on amd64, but it doesn't do anything. > > > When I run "vlc", nothing happens. It prints its little > > > "VLC media player 1.0.5 Goldeneye" banner, and that's it. > > > No window comes up or anything. > > > > I've seen the same behaviour on amd64 > > Thats what i was getting on sparc64.
OK, after some fiddling, here are some findings: I built a vlc binary with debug symbols and ran it with gdb, hitting ctrl+c to see where execution was up to in the hope. At first it looked like the plugin loading was hanging, but it turns out it just takes a while. I added printf()s to module_Load() in os.c allowing me to see when the plugin loading was complete. Interrupting execution aftter this reveals that the real problem *appears* to exist in the threading libraries. At the time VLC is hanging, it is obviously not blocking as it shows about 25% CPU usage on my sparc64. It is probably stuck in an infinite loop around a few function calls. Each time I interrupt the process to examine the stack I get slightly different results. Attached are script(1) outcomes of 2 such stack traces. There is some odd looking dbus behavior going on here, I wonder if there is a bug there: ---8<--- #4 0x0000000046516c84 in dbus_shutdown () from /usr/local/lib/libdbus-1.so.7.1^M No symbol table info available.^M #5 0x0000000046519558 in dbus_shutdown () from /usr/local/lib/libdbus-1.so.7.1^M No symbol table info available.^M #6 0x0000000046519840 in dbus_shutdown () from /usr/local/lib/libdbus-1.so.7.1^M No symbol table info available.^M #7 0x000000004650cffc in dbus_threads_init_default ()^M from /usr/local/lib/libdbus-1.so.7.1^M No symbol table info available.^M #8 0x000000004650cffc in dbus_threads_init_default ()^M from /usr/local/lib/libdbus-1.so.7.1^M No symbol table info available.^M Previous frame identical to this frame (corrupt stack?)^M ---8<--- Could even be a compiler bug we are facing? I will try a build with GCC4. I am now hoping that someone with mad threading skillz can step up to help :\ Is there any other information we can get from GDB that can help? Attached -- Best Regards Edd Barrett http://www.theunixzoo.co.uk
Script started on Sun Mar 28 19:26:04 2010 $ gdb c vlc GNU gdb 6.3 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 "sparc64-unknown-openbsd4.7"... (gdb) run Starting program: /usr/local/bin/vlc VLC media player 1.0.5 Goldeneye Loading /usr/local/lib/vlc/access/libaccess_bd_plugin.so ...done Loading /usr/local/lib/vlc/access/libaccess_directory_plugin.so ...done Loading /usr/local/lib/vlc/access/libaccess_fake_plugin.so ...done ... etc... Loading /usr/local/lib/vlc/video_output/libxvideo_plugin.so ...done Loading /usr/local/lib/vlc/video_output/libyuv_plugin.so ...done Loading /usr/local/lib/vlc/visualization/libvisual_plugin.so ...done ^C Program received signal SIGINT, Interrupt. 0x000000004a8fdae8 in poll () from /usr/lib/libc.so.53.1 (gdb) bt full #0 0x000000004a8fdae8 in poll () from /usr/lib/libc.so.53.1 No symbol table info available. #1 0x0000000044dbe26c in _thread_kern_poll (wait_reqd=0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:760 count = 0 kern_pipe_added = 1 i = 1269800833 found = 1161595537 nfds = 2 timeout_ms = 10005 pthread = (struct pthread *) 0x0 next = (struct pthread *) 0x0 ts = {tv_sec = 1269800833, tv_nsec = 655777000} tv = {tv_sec = 1269800833, tv_usec = 655777} #2 0x0000000044dbdc70 in _thread_kern_sched (scp=0x0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:382 ts = {tv_sec = 1269800833, tv_nsec = 655777000} tv = {tv_sec = 1269800833, tv_usec = 655777} curthread = (struct pthread *) 0x453c99e0 pthread = 0x44fc4050 pthread_h = 0x0 current_tick = 1161606128 ---Type <return> to continue, or q <return> to quit--- add_to_prioq = 0 old_thread_run = 0x49ab1c00 #3 0x0000000044db6dac in read (fd=11, buf=0x4cedd800, nbytes=1024) at /usr/src/lib/libpthread/uthread/uthread_read.c:83 curthread = (struct pthread *) 0x49ab1c00 ret = -1 type = 1276 #4 0x0000000046516c84 in dbus_shutdown () from /usr/local/lib/libdbus-1.so.7.1 No symbol table info available. #5 0x0000000046519558 in dbus_shutdown () from /usr/local/lib/libdbus-1.so.7.1 No symbol table info available. #6 0x0000000046519840 in dbus_shutdown () from /usr/local/lib/libdbus-1.so.7.1 No symbol table info available. #7 0x000000004650cffc in dbus_threads_init_default () from /usr/local/lib/libdbus-1.so.7.1 No symbol table info available. #8 0x000000004650cffc in dbus_threads_init_default () from /usr/local/lib/libdbus-1.so.7.1 No symbol table info available. Previous frame identical to this frame (corrupt stack?) (gdb) The program is running. Exit anyway? (y or n) y Killed $ ^D Script done on Sun Mar 28 19:28:09 2010
Script started on Sun Mar 28 19:28:59 2010 $ gdb vlc GNU gdb 6.3 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 "sparc64-unknown-openbsd4.7"... (gdb) run Starting program: /usr/local/bin/vlc VLC media player 1.0.5 Goldeneye Loading /usr/local/lib/vlc/access/libaccess_bd_plugin.so ...done Loading /usr/local/lib/vlc/access/libaccess_directory_plugin.so ...done Loading /usr/local/lib/vlc/access/libaccess_fake_plugin.so ...done ... etc ... Loading /usr/local/lib/vlc/video_output/libxvideo_plugin.so ...done Loading /usr/local/lib/vlc/video_output/libyuv_plugin.so ...done Loading /usr/local/lib/vlc/visualization/libvisual_plugin.so ...done ^C Program received signal SIGINT, Interrupt. 0x000000004a8c1ae8 in poll () from /usr/lib/libc.so.53.1 (gdb) bt full #0 0x000000004a8c1ae8 in poll () from /usr/lib/libc.so.53.1 No symbol table info available. #1 0x0000000049b4e26c in _thread_kern_poll (wait_reqd=0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:760 count = 0 kern_pipe_added = 1 i = 1269801021 found = 0 nfds = 2 timeout_ms = 10000 pthread = (struct pthread *) 0x0 next = (struct pthread *) 0x0 ts = {tv_sec = 1269801021, tv_nsec = 920000000} tv = {tv_sec = 1269801021, tv_usec = 920000} #2 0x0000000049b4dc70 in _thread_kern_sched (scp=0x0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:382 ts = {tv_sec = 1269801021, tv_nsec = 920000000} tv = {tv_sec = 1269801021, tv_usec = 920000} curthread = (struct pthread *) 0x4a1599e0 pthread = 0x49d54050 pthread_h = 0x0 current_tick = 1242936304 ---Type <return> to continue, or q <return> to quit--- add_to_prioq = 0 old_thread_run = 0x45b38c00 #3 0x0000000049b4b584 in pthread_cond_timedwait (cond=0x49d54110, mutex=0x49d54108, abstime=0x4e603e70) at /usr/src/lib/libpthread/uthread/uthread_cond.c:431 curthread = (struct pthread *) 0x45b38c00 rval = 0 done = 0 interrupted = 0 seqno = 0 #4 0x0000000049b43034 in _thread_gc (arg=0x0) at /usr/src/lib/libpthread/uthread/uthread_gc.c:181 curthread = (struct pthread *) 0x45b38c00 f_debug = 0 f_done = 0 ret = 1276 mask = 4294967295 pthread = 0x4aff2000 next = 0x8 pthread_cln = 0x0 abstime = {tv_sec = 1269801031, tv_nsec = 920032952} p_stack = (void *) 0x0 ---Type <return> to continue, or q <return> to quit--- #5 0x0000000049b42cf8 in _thread_start () at /usr/src/lib/libpthread/uthread/uthread_create.c:241 curthread = (struct pthread *) 0x4aff2000 #6 0x0000000049b42cc0 in pthread_create (thread=0x0, attr=0x0, start_routine=0, arg=0x0) at /usr/src/lib/libpthread/uthread/uthread_create.c:230 curthread = (struct pthread *) 0x0 itimer = Cannot access memory at address 0x7cf (gdb) (gdb) quit The program is running. Exit anyway? (y or n) y Killed $ ^D Script done on Sun Mar 28 19:31:06 2010