Ticket #1543 (closed defect: fixed)

Opened 5 months ago

Last modified 3 months ago

LibVLC input item leak: abort at exit

Reported by: DGMurdockIII Assigned to: courmisch
Priority: normal Milestone: 0.9.0-test1
Component: LibVLC Version: master
Severity: normal Keywords:
Cc: pdherbemont Platform(s): all
Difficulty: unknown Work status: Not started

Description

I get runtime error ever time i try to play a file i have to have vlc open to not get the error and i get it when i exit vlc

Change History

04/03/08 22:22:40 changed by jb

  • status changed from new to assigned.
  • owner changed from fkuehne, jb to jb.
  • component changed from Interfaces to Build system.
  • milestone changed from 0.9.0-test1 to 0.9.0-final.

04/03/08 22:24:30 changed by jb

  • status changed from assigned to new.

04/03/08 22:24:43 changed by jb

  • priority changed from high to low.

04/05/08 03:29:51 changed by DGMurdockIII

here is a screen shot of the error i just got that may help with this http://img153.imageshack.us/img153/6247/vlcruntimexj6.png

05/31/08 18:58:32 changed by courmisch

  • priority changed from low to normal.
  • platform changed from Win32 to all.
  • summary changed from runtime error to LibVLC input item leak: abort at exit.
  • component changed from Build system to Input.
  • milestone changed from 0.9.0-final to 0.9.0-test1.

Same on Linux:

% LANG=C ./vlc -I dummy vlc://quit
VLC media player 0.9.0-git Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.0-git Grishenko - (c) 1996-2008 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ../configure  '-C' 'CC=ccache gcc-4.3' 'CXX=ccache g++-4.3' 'CFLAGS=-O2 -g' 'CXXFLAGS=-O2 -g' 'LDFLAGS=-Wl,-z,defs,--as-needed,-Bsymbolic' '--enable--maintainer-mode' '--enable-debug' '--enable-libmpeg2' '--disable-mad' '--enable-dvd' '--enable-qt4' '--disable-faad' '--disable-skins2' '--disable-wxwidgets' '--enable-loader' '--enable-real' '--enable-ffmpeg' '--disable-glx' '--disable-fribidi'
[00000001] main libvlc debug: translation test: code is "C"
[00000343] dummy interface: using the dummy interface module...
[00000356] dummy demux: command `quit'
[00000001] main libvlc error: input item 0x8d18e18 has not been deleted properly: refcount 2, name Undefined
[00000001] main libvlc error: input item 0x8d22828 has not been deleted properly: refcount 2, name Playlist
[00000001] main libvlc error: input item 0x8d17658 has not been deleted properly: refcount 2, name Media Library
[00000001] main libvlc error: input item 0x8d29678 has not been deleted properly: refcount 3, name quit
vlc: ../../src/libvlc-common.c:1010: libvlc_InternalCleanup: Assertion `b_clean' failed.
Aborted

06/02/08 07:57:22 changed by jb

Does this still happen ?

06/02/08 16:39:35 changed by courmisch

Yes. Just try "./vlc -I dummy vlc://quit".

06/07/08 09:32:59 changed by courmisch

  • component changed from Input to Playlist.

06/07/08 13:24:49 changed by courmisch

  • cc set to pdherbemont.
Program terminated with signal 6, Aborted.
[New process 28388]
[New process 28400]
[New process 28394]
[New process 28393]
[New process 28392]
#0  0xb7f9a424 in __kernel_vsyscall ()
(gdb) thread apply all bt

Thread 5 (process 28392):
#0  0xb7f9a424 in __kernel_vsyscall ()
#1  0xb7d3e015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb7e3b4cd in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libc.so.6
#3  0xb7f4f825 in __vlc_object_wait (obj=0x96d8494) at ../../include/vlc_threads.h:322
#4  0xb7ed871a in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#5  0xb7ed6576 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#6  0xb7f40c27 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#7  0xb7d3a4b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8  0xb7e2d38e in clone () from /lib/i686/cmov/libc.so.6

Thread 4 (process 28393):
#0  0xb7f9a424 in __kernel_vsyscall ()
#1  0xb7d3e015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb7e3b4cd in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libc.so.6
#3  0xb7f4f825 in __vlc_object_wait (obj=0x96e263c) at ../../include/vlc_threads.h:322
#4  0xb7ed9988 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#5  0xb7ed64f0 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#6  0xb7f40c27 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#7  0xb7d3a4b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8  0xb7e2d38e in clone () from /lib/i686/cmov/libc.so.6

Thread 3 (process 28394):
#0  0xb7f9a424 in __kernel_vsyscall ()
#1  0xb7d3e015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb7e3b4cd in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libc.so.6
#3  0xb7f4f825 in __vlc_object_wait (obj=0x96d75dc) at ../../include/vlc_threads.h:322
#4  0xb7ed64a2 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#5  0xb7f40c27 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#6  0xb7d3a4b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#7  0xb7e2d38e in clone () from /lib/i686/cmov/libc.so.6

Thread 2 (process 28400):
#0  0xb7f9a424 in __kernel_vsyscall ()
#1  0xb7d3ab97 in pthread_join () from /lib/i686/cmov/libpthread.so.0
#2  0xb7f40aea in __vlc_thread_join (p_this=0x96d75dc, psz_file=0xb7f79e44 "../../src/misc/objects.c", i_line=332) at ../../src/misc/threads.c:678
#3  0xb7f50a23 in __vlc_object_release (p_this=0x96d75dc) at ../../src/misc/objects.c:332
#4  0xb48c5fc7 in Demux (p_demux=0x96e486c) at ../../../../modules/misc/dummy/input.c:237
#5  0xb7efa473 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#6  0xb7efdbd7 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#7  0xb7f40c27 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#8  0xb7d3a4b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#9  0xb7e2d38e in clone () from /lib/i686/cmov/libc.so.6

Thread 1 (process 28388):
#0  0xb7f9a424 in __kernel_vsyscall ()
#1  0xb7d785e0 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb7d79fb8 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb7d7156e in __assert_fail () from /lib/i686/cmov/libc.so.6
#4  0xb7ec6e54 in libvlc_InternalCleanup (p_libvlc=0x95b10b4) at ../../src/libvlc.c:993
#5  0xb7f85368 in libvlc_release (p_instance=0x95b3960) at ../../src/control/core.c:166
#6  0x08048c31 in main (i_argc=6, ppsz_argv=0xbffb5d24) at ../../src/vlc.c:142

Thread 2: the demux object is vlc:// (a.k.a.) dummy, and releasing the last reference to the playlist, so it is joining the playlist thread.

Thread 3: waiting on the playlist

Thread 4: waiting on the fetcher

Thread 5: waiting on the preparser

AFAICT, LibVLC has released its reference to the playlist while another thread is still using it. This is incorrect, as it could cause the other thread to crash in pl_Yield().

06/13/08 17:23:01 changed by pdherbemont

What is the status of that one?

06/13/08 17:31:39 changed by courmisch

Unfixed, as far as I can tell.

06/13/08 17:34:48 changed by pdherbemont

"./vlc -I dummy vlc://quit" works here™

06/13/08 17:57:19 changed by courmisch

It crashes every now and then. This is a race condition. I can still reproduce the exact same backtrace.

06/13/08 23:12:04 changed by pdherbemont

  • status changed from new to closed.
  • resolution set to fixed.

Should be fixed by [058cf75a3dc66e4cf223a8cded6910daea90144e].

I am closing it.

06/14/08 22:51:28 changed by courmisch

  • status changed from closed to reopened.
  • resolution deleted.

06/14/08 23:02:34 changed by courmisch

Still present in [8ad05151abe4cefca9e61318d2f21c9a8d382923]:

[00000375] main demux debug: TIMER module_Need() : 0,307 ms - Total 0,307 ms / 1 intvls (Avg 0,307 ms)
[00000371] main input debug: `vlc://quit' successfully opened
[00000001] main libvlc debug: removing all interfaces
[00000329] main interaction debug: thread ended
[Thread 0xb7981b90 (LWP 15492) exited]
[00000362] main interface debug: thread ended
[Thread 0xb37f9b90 (LWP 15500) exited]
[00000358] main interface debug: thread ended
[00000360] main interface debug: thread ended
[00000356] main interface debug: thread ended
[00000362] main interface debug: thread 3011484560 joined (../../src/interface/interface.c:177)
[Thread 0xb57fdb90 (LWP 15496) exited]
[Thread 0xb3ffab90 (LWP 15499) exited]
[Thread 0xb4ffcb90 (LWP 15497) exited]
[00000360] main interface debug: thread 3019877264 joined (../../src/interface/interface.c:177)
[00000358] main interface debug: thread 3036662672 joined (../../src/interface/interface.c:177)
[00000356] main interface debug: thread 3045055376 joined (../../src/interface/interface.c:177)
[00000001] main libvlc debug: removing all services discovery tasks
[00000001] main libvlc debug: removing playlist
[00000001] main libvlc debug: removing interaction
[00000001] main libvlc debug: removing all video outputs
[00000001] main libvlc debug: TIMER ML Load : Total 103,480 ms / 1 intvls (Avg 103,480 ms)
[00000001] main libvlc debug: TIMER Items array build : Total 0,104 ms / 2 intvls (Avg 0,052 ms)
[00000001] main libvlc debug: TIMER input launching for 'quit' : Total 10,866 ms / 1 intvls (Avg 10,866 ms)
[00000001] main libvlc error: input item 0x9967bb0 has not been deleted properly: refcount 2, name Indéfini
[00000001] main libvlc error: input item 0x9965d10 has not been deleted properly: refcount 2, name Liste de lecture
[00000001] main libvlc error: input item 0x99673c0 has not been deleted properly: refcount 2, name Bibliothèque
[00000001] main libvlc error: input item 0x9970060 has not been deleted properly: refcount 3, name quit
vlc: ../../src/libvlc.c:997: libvlc_InternalCleanup:  l'assertion « b_clean » a échoué.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb7c9f8d0 (LWP 15491)]
0xb803c424 in __kernel_vsyscall ()
(gdb) thread apply all bt

Thread 11 (Thread 0xb2ff8b90 (LWP 15501)):
#0  0xb803c424 in __kernel_vsyscall ()
#1  0xb7ddadbc in __lll_unlock_wake () from /lib/i686/cmov/libpthread.so.0
#2  0xb7dd73fb in _L_unlock_92 () from /lib/i686/cmov/libpthread.so.0
#3  0xb7dd703c in __pthread_mutex_unlock_usercnt () from /lib/i686/cmov/libpthread.so.0
#4  0xb7ed56d6 in pthread_mutex_unlock () from /lib/i686/cmov/libc.so.6
#5  0xb7ff04fa in __vlc_object_kill (p_this=0x996d16c) at ../../include/vlc_threads.h:232
#6  0xb7ff056f in __vlc_object_kill (p_this=0x98380b4) at ../../src/misc/objects.c:643
#7  0xb696400b in Demux (p_demux=0x1) at ../../../../modules/misc/dummy/input.c:211
#8  0xb7f94c9e in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#9  0xb7f996ab in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#10 0xb7fdee2a in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#11 0xb7dd44b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#12 0xb7ec738e in clone () from /lib/i686/cmov/libc.so.6

Thread 8 (Thread 0xb47fbb90 (LWP 15498)):
#0  0xb803c424 in __kernel_vsyscall ()
#1  0xb7e12b50 in sigwait () from /lib/i686/cmov/libc.so.6
#2  0xb7a7edb2 in SigThread (data=0x996d16c) at ../../../modules/control/signals.c:109
#3  0xb7dd44b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#4  0xb7ec738e in clone () from /lib/i686/cmov/libc.so.6

Thread 5 (Thread 0xb5ffeb90 (LWP 15495)):
#0  0xb7dc9989 in clock_nanosleep () from /lib/i686/cmov/librt.so.1
#1  0xb7fd625a in msleep (delay=50000) at ../../src/misc/mtime.c:365
#2  0xb7f72bfb in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#3  0xb7f70a67 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#4  0xb7fdee2a in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#5  0xb7dd44b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#6  0xb7ec738e in clone () from /lib/i686/cmov/libc.so.6

Thread 4 (Thread 0xb67ffb90 (LWP 15494)):
#0  0xb803c424 in __kernel_vsyscall ()
#1  0xb7dd8015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb7ed54cd in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libc.so.6
#3  0xb7feea3c in __vlc_object_wait (obj=0xb6800544) at ../../include/vlc_threads.h:322
#4  0xb7f74508 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#5  0xb7f70aaa in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#6  0xb7fdee2a in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#7  0xb7dd44b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8  0xb7ec738e in clone () from /lib/i686/cmov/libc.so.6

Thread 3 (Thread 0xb716cb90 (LWP 15493)):
#0  0xb803c424 in __kernel_vsyscall ()
#1  0xb7dd8015 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb7ed54cd in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libc.so.6
#3  0xb7feea3c in __vlc_object_wait (obj=0x995c69c) at ../../include/vlc_threads.h:322
#4  0xb7f73358 in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#5  0xb7f70b4a in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#6  0xb7fdee2a in ?? () from /home/remi/videolan/vlc/build/src/.libs/libvlccore.so.0
#7  0xb7dd44b0 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8  0xb7ec738e in clone () from /lib/i686/cmov/libc.so.6

Thread 1 (Thread 0xb7c9f8d0 (LWP 15491)):
#0  0xb803c424 in __kernel_vsyscall ()
#1  0xb7e125e0 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb7e13fb8 in abort () from /lib/i686/cmov/libc.so.6
#3  0xb7e0b56e in __assert_fail () from /lib/i686/cmov/libc.so.6
#4  0xb7f6105b in libvlc_InternalCleanup (p_libvlc=0x98380b4) at ../../src/libvlc.c:997
#5  0xb80273bf in libvlc_release (p_instance=0x983a960) at ../../src/control/core.c:166
#6  0x08048d83 in main (i_argc=6, ppsz_argv=0xbfd55a94) at ../../src/vlc.c:142

Thread 3: waiting on preparser Thread 4: waiting on fetcher Thread 5: in msleep(50ms), unidentified, supposedly the playlist waiting for the input to die Thread 8: the signals thread Thread 11: locking the signals interface to kill it, from killing libvlc, from the dummy demux (input thread?).

06/22/08 15:39:19 changed by courmisch

  • status changed from reopened to new.
  • owner changed from jb to courmisch.
  • component changed from Playlist to LibVLC.

06/22/08 15:39:25 changed by courmisch

  • status changed from new to closed.
  • resolution set to fixed.