[vlc-devel] VLC-1.0.5 Porting Issues on OpenBSD

Edd Barrett vext01 at gmail.com
Tue Apr 6 01:52:17 CEST 2010


Hi guys and gals,

brad@ and Myself (edd@) from the OpenBSD porting team have been
working to get our rather ancient VLC package up to date. We now have
a port of 1.0.5 which works fine on i386. However it does not work
properly  on sparc64 and I have reports that it does not work on amd64
either. I have personally reproduced the problem on my own sparc64
machine. Here are the details:

The symptoms - GUI never turns up. We get the banner and then we get a hang.

It seems the hotkeys plugin is waiting for a thread. The line of code which we
never get past (in the vlc tree atleast) is this:

vlc_cond_wait (p_condvar=0x40cfa148, p_mutex=0xfffffffffffffffe) at
misc/threads.c:584
584         int val = pthread_cond_wait( p_condvar, p_mutex );

After this we are just spinning around in libpthread.

This is how we got there:
#0  vlc_cond_wait (p_condvar=0x40cfa148, p_mutex=0xfffffffffffffffe)
at misc/threads.c:584
#1  0x000000007e981bd4 in GetAction (p_intf=0x40cfa140) at hotkeys.c:903
#2  0x000000007e97fa9c in Run (p_intf=0x4077dd78) at hotkeys.c:178
#3  0x00000000476b0270 in RunInterface (p_this=0x4077dd78) at
interface/interface.c:218
#4  0x0000000047711e18 in thread_entry (data=0x47711800) at misc/threads.c:1093
#5  0x0000000048976cf8 in _thread_start ()
    at /usr/src/lib/libpthread/uthread/uthread_create.c:241
#6  0x0000000048976cc0 in pthread_create (thread=0x0, attr=0x0,
start_routine=0, arg=0x0)
    at /usr/src/lib/libpthread/uthread/uthread_create.c:230


vlc_cond_wait is just a portability wrapper around threading
implementations. For us this means it just calls pthread_cond_wait().
So I guess we need to look here:

static int GetAction( intf_thread_t *p_intf )
{
    intf_sys_t *p_sys = p_intf->p_sys;
    int i_ret;

    vlc_mutex_lock( &p_sys->lock );
    mutex_cleanup_push( &p_sys->lock );

    while( p_sys->i_size == 0 )
        vlc_cond_wait( &p_sys->wait, &p_sys->lock ); /* <----------- STUCK */

    i_ret = p_sys->p_actions[ 0 ];
    p_sys->i_size--;
    for( int i = 0; i < p_sys->i_size; i++ )
        p_sys->p_actions[i] = p_sys->p_actions[i + 1];

    vlc_cleanup_run();
    return i_ret;
}

I spoke to a dev on your IRC channel and he informs me that this
section of code is vastly changed in trunk.

So I'm hoping someone here can help us get this running. Any ideas?

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



More information about the vlc-devel mailing list