vlc does not recover from SIGSTOP

*nix specific usage questions
Cruncher
New Cone
New Cone
Posts: 4
Joined: 02 Apr 2009 01:42

vlc does not recover from SIGSTOP

Postby Cruncher » 02 Apr 2009 03:51

Hi.

When sending a "kill -STOP" to a vlc process that is currently playing a video, it does not recover after sending a "kill -CONT". It *does* recover if no video is playing, or if the player is in pause mode. However, in play mode vlc stays frozen, and can even be no longer killed via a normal kill (SIGTERM), you have to kill the process with SIGKILL.

Why is this a problem?
I generally start vlc from a shell, and usually in the foreground. But sometimes I want to continue using the shell while vlc is running, so I suspend the process with ctrl+z and send it into the background with "bg", where the process is supposed to automatically continue.

I can confirm that this worked once, however, I am unsure since when it is no longer working. Possibly since my Ubuntu upgrade 8.04->8.10 (8.04 used vlc 0.8.6, 8.10 uses 0.9.4). If you think it will help, I can run a git bisect.

Is this a known bug? (probably not, since very few people nowadays seem to use terminals anymore)
Shall I file this as a bug on trac then?

Thanks,
Cruncher

vlc 0.9.4-1ubuntu3.1
Xubuntu 8.10 (xfce4/xfwm4)
nvidia 173.14.12-1-0ubuntu5.1
kernel 2.6.27-11-generic

Rémi Denis-Courmont
Developer
Developer
Posts: 15330
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc does not recover from SIGSTOP

Postby Rémi Denis-Courmont » 02 Apr 2009 16:32

It's a known bug if you're using the GNU debugger (but the bug is in gdb then). Otherwise, it looks fishy. Try with strace.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Cruncher
New Cone
New Cone
Posts: 4
Joined: 02 Apr 2009 01:42

Re: vlc does not recover from SIGSTOP

Postby Cruncher » 03 Apr 2009 06:24

It's a standard Ubuntu vlc package, so I am not using gdb while this is happening. However, there is a lot of noisy output when I start vlc, so maybe it's a debug version that has made it into that package - or is this output normal and always there?

Code: Select all

[hobbes->crunch] 4 :) vlc VLC media player 0.9.4 Grishenko [00000001] main libvlc debug: VLC media player - version 0.9.4 Grishenko - (c) 1996-2008 the VideoLAN team [00000001] main libvlc debug: libvlc was configured with ./configure '--build=i486-linux-gnu' '--enable-maintaner-mode' '--enable-release' '--prefix=/usr' '--enable-libtool' '--enable-fast-install' '--with-binary-version=1ubuntu3.1' '--disable-update-check' '--disable-gnome' '--disable-gtk' '--disable-familiar' '--disable-fb' '--enable-ggi' '--enable-sdl' '--enable-esd' '--enable-mad' '--enable-arts' '--enable-jack' '--enable-pulse' '--enable-lirc' '--enable-a52' '--enable-aa' '--enable-dvbpsi' '--enable-mozilla' '--with-mozilla-pkg=libxul-plugin' '--disable-kde' '--enable-mp4' '--enable-dvb' '--disable-satellite' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--disable-slp' '--enable-flac' '--disable-skins' '--disable-basic-skins' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-cdio' '--enable-mod' '--enable-theora' '--enable-modplug' '--enable-dvdnav' '--enable-gnutls' '--enable-ffmpeg' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-x264' '--enable-faad' '--disable-zvbi' '--enable-telx' '--enable-mediacontrol-bindings' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-libdca' '--enable-alsa' '--enable-dv' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--enable-svgalib' '--enable-dvd' '--without-dvdcss' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2' [00000001] main libvlc debug: translation test: code is "C"
I tried with strace, but there's not much goin on there. Here are the last few lines before the 'kill -STOP':

Code: Select all

select(6, [5], [], NULL, NULL) = 1 (in [5]) read(5, "\1\0\5\0\0\0\0\0\1\227t\260\0\0\0\0\24\0\0\0\0\0\0\000"..., 4096) = 32 read(5, 0x9f4f9b4, 4096) = -1 EAGAIN (Resource temporarily unavailable) select(6, [5], [5], NULL, NULL) = 1 (out [5]) writev(5, [{"\227\0\2\0\1\0\0\0", 8}], 1) = 8 select(6, [5], [], NULL, NULL) = 1 (in [5]) read(5, "\1\1\6\0\0\0\0\0\1\0\0\0008\267W\n\n\0\0\0\10\0\0\0000"..., 4096) = 32 read(5, 0x9f4f9b4, 4096) = -1 EAGAIN (Resource temporarily unavailable) select(6, [5], [5], NULL, NULL) = 1 (out [5]) writev(5, [{"<\0\2\0\0\0\0\2+\0\1\0", 12}], 1) = 12 select(6, [5], [], NULL, NULL) = 1 (in [5]) read(5, "\1\2\10\0\0\0\0\0\n\0\340\1\0\0\0\0\4\0\0\0\0\0\0\0000"..., 4096) = 32 read(5, 0x9f4f9b4, 4096) = -1 EAGAIN (Resource temporarily unavailable) close(5) = 0 clock_gettime(CLOCK_MONOTONIC, {29465, 906387306}) = 0 rt_sigprocmask(SIG_BLOCK, [INT QUIT PIPE TERM], [HUP INT QUIT PIPE TERM CHLD], 8) = 0 mmap2(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb18e6000 mprotect(0xb18e6000, 4096, PROT_NONE) = 0 clone(child_stack=0xb20e64c4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xb20e6bd8, {entry_number:6, base_addr:0xb20e6b90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xb20e6bd8) = 27731 rt_sigprocmask(SIG_SETMASK, [HUP INT QUIT PIPE TERM CHLD], NULL, 8) = 0 futex(0x9e049bc, 0x85 /* FUTEX_??? */, 1) = 1 futex(0x9e0128c, 0x80 /* FUTEX_??? */, 1QPainter::begin: Paint device returned engine == 0, type: 1
This is after the SIGSTOP:

Code: Select all

) = ? ERESTARTSYS (To be restarted) --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- --- SIGSTOP (Stopped (signal)) @ 0 (0) --- futex(0x9e0128c, 0x80 /* FUTEX_??? */, 1
And this after the SIGCONT (identical for every SIGCONT):

Code: Select all

) = ? ERESTARTSYS (To be restarted) --- SIGCONT (Continued) @ 0 (0) --- futex(0x9e0128c, 0x80 /* FUTEX_??? */, 1
The output is identical for play mode (vlc freezes) and pause mode (vlc continuation is successful).

Cruncher
New Cone
New Cone
Posts: 4
Joined: 02 Apr 2009 01:42

Re: vlc does not recover from SIGSTOP

Postby Cruncher » 03 Apr 2009 07:43

I tried compiling vlc from the current git, but it fails in live555.cpp with

Code: Select all

/mnt/hdf6/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:48:25: error: stddef.h: No such file or directory
and a zillion C core errors after that. Disabling live555 in ./configure fails, too, with

Code: Select all

libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -DSYS_LINUX -I/usr/local/include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__LIBVLC__ -D__PLUGIN__ -DMODULE_NAME=mod -DMODULE_NAME_IS_mod -DMODULE_STRING=\"mod\" -O2 -ffast-math -funroll-loops -mtune=pentium2 -fomit-frame-pointer -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -MT libmod_plugin_la-mod.lo -MD -MP -MF .deps/libmod_plugin_la-mod.Tpo -c mod.c -fPIC -DPIC -o .libs/libmod_plugin_la-mod.o In file included from ../../include/vlc_common.h:47, from mod.c:32: /usr/include/stdlib.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ctype_get_mb_cur_max’ /usr/include/stdlib.h: In function ‘atof’: /usr/include/stdlib.h:281: error: ‘NULL’ undeclared (first use in this function) /usr/include/stdlib.h:281: error: (Each undeclared identifier is reported only once /usr/include/stdlib.h:281: error: for each function it appears in.) /usr/include/stdlib.h: In function ‘atoi’: /usr/include/stdlib.h:286: error: ‘NULL’ undeclared (first use in this function) /usr/include/stdlib.h: In function ‘atol’: /usr/include/stdlib.h:291: error: ‘NULL’ undeclared (first use in this function) /usr/include/stdlib.h: In function ‘atoll’: /usr/include/stdlib.h:300: error: ‘NULL’ undeclared (first use in this function) In file included from ../../include/vlc_common.h:47,
I also tried compiling the 0.9.9 tarball now, with the ./configure suggested in the Wiki, but it also fails with

Code: Select all

/mnt/hdf6/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:48:25: error: stddef.h: No such file or directory
, this time in qt4.cpp, so I'm giving up trying to compile it for now. Do you have Linux i386 binaries of the release versions somewhere I can try?

Rémi Denis-Courmont
Developer
Developer
Posts: 15330
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc does not recover from SIGSTOP

Postby Rémi Denis-Courmont » 04 Apr 2009 12:01

STOP/CONT is delivered inside a futex call, that is restarted. VLC should see this.
If there is a bug, it's either in your libc ot kernel. Can't help you.

Note that stopping VLC while playing will screw up the time synchronization. This is unavoidable.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 40 guests