Skip to content

[3.0.18] Arch Linux deadlock

This issue only happens on LINUX, windows didn't ocurrs. External issue (if is needed): https://github.com/SrRapero720/watermedia/issues/3

This issue is caused on a started player (any multimedia) using libvlc_media_player_will_play and libvlc_media_player_get_length (via VLCJ bindings)

Using GBB to inspect process show is locking itself (libvlc_media_player_will_play)

#0  futex_wait (private=0, expected=2, futex_word=0x7f46f62594b0) at ../sysdeps/nptl/futex-internal.h:146
#1  __GI___lll_lock_wait (futex=futex@entry=0x7f46f62594b0, private=0) at lowlevellock.c:49
#2  0x00007f46fb9958c2 in lll_mutex_lock_optimized (mutex=0x7f46f62594b0) at pthread_mutex_lock.c:48
#3  ___pthread_mutex_lock (mutex=0x7f46f62594b0) at pthread_mutex_lock.c:93
#4  0x00007f4618ed3baa in libvlc_media_player_will_play () at /usr/lib64/libvlc.so
(lldb) thread select 2
* thread #2, name = 'Render thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fdccf68b160 libc.so.6`__GI___lll_lock_wait at futex-internal.h:146:13
   143 	static __always_inline int
   144 	futex_wait (unsigned int *futex_word, unsigned int expected, int private)
   145 	{
-> 146 	 int err = lll_futex_timed_wait (futex_word, expected, NULL, private);
   147 	 switch (err)
   148 	   {
   149 	   case 0:
(lldb) up
frame #1: 0x00007fdccf68b14a libc.so.6`__GI___lll_lock_wait(futex=0x00007fdcca48b580, private=0) at lowlevellock.c:49:7
   46  	   {
   47  	   futex:
   48  	     LIBC_PROBE (lll_lock_wait, 1, futex);
-> 49  	     futex_wait ((unsigned int *) futex, 2, private); /* Wait if *futex == 2.  */
   50  	   }
   51  	}
   52  	libc_hidden_def (__lll_lock_wait)
(lldb) up
frame #2: 0x00007fdccf6918c2 libc.so.6`___pthread_mutex_lock at pthread_mutex_lock.c:48:5
   45  	 if (private == LLL_PRIVATE && SINGLE_THREAD_P && mutex->__data.__lock == 0)
   46  	   mutex->__data.__lock = 1;
   47  	 else
-> 48  	   lll_lock (mutex->__data.__lock, private);
   49  	}
   50  	
   51  	# define LLL_MUTEX_LOCK(mutex)						\
(lldb) up
frame #3: 0x00007fdccf6918b8 libc.so.6`___pthread_mutex_lock(mutex=0x00007fdcca48b580) at pthread_mutex_lock.c:93:7
   90  	     FORCE_ELISION (mutex, goto elision);
   91  	   simple:
   92  	     /* Normal mutex.  */
-> 93  	     LLL_MUTEX_LOCK_OPTIMIZED (mutex);
   94  	     assert (mutex->__data.__owner == 0);
   95  	   }
   96  	#if ENABLE_ELISION_SUPPORT
(lldb) up
frame #4: 0x00007fdbe4028baa libvlc.so`libvlc_media_player_will_play [inlined] lock_input(mp=0x00007fdcca48b510) at media_player.c:119:5
   116 	
   117 	static inline void lock_input(libvlc_media_player_t *mp)
   118 	{
-> 119 	   vlc_mutex_lock(&mp->input.lock);
   120 	}
   121 	
   122 	static inline void unlock_input(libvlc_media_player_t *mp)
(lldb) up
frame #5: 0x00007fdbe4028ba4 libvlc.so`libvlc_media_player_will_play at media_player.c:198:5
   195 	
   196 	   assert( p_mi );
   197 	
-> 198 	   lock_input(p_mi);
   199 	   p_input_thread = p_mi->input.p_thread;
   200 	   if( p_input_thread )
   201 	       vlc_object_hold( p_input_thread );
(lldb) up
frame #6: 0x00007fdbe4028ba4 libvlc.so`libvlc_media_player_will_play(p_mi=0x00007fdcca48b510) at media_player.c:1749:29
   1746	int libvlc_media_player_will_play( libvlc_media_player_t *p_mi )
   1747	{
   1748	   input_thread_t *p_input_thread =
-> 1749	                           libvlc_get_input_thread ( p_mi );
   1750	   if ( !p_input_thread )
   1751	       return false;
   1752

System information OS: Arch Linux Kernel version: 6.3.8-arch1-1 Package manager: pacman CPU: Intel i7-7700K GPU: NVIDIA GeForce GTX 1060 6GB GPU Driver version: 535.54.03

VLC installation medium: Arch Linux extra repository

using vlc --version

VLC media player 3.0.18 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC version 3.0.18 Vetinari (3.0.13-8-g41878ff4f2)
Compiled by builduser on  (Jun  8 2023 12:15:27)
Compiler: gcc version 13.1.1 20230429 (GCC)
Edited by J-RAP
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information