hi list
vdr 2.1.2 segfaults in libc, as soon as I use the terminal syntax (vdr --genindex) to recreate a missing index file. Trying the same thing in a user interface (vdr-sxfe) works as planed.
Here's a backtrace of what's happing:
/usr/local/src/vdr/vdr-2.1.2/vdr --genindex=/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec/ Speicherzugriffsfehler (Speicherabzug geschrieben) gdb /usr/local/src/vdr/vdr-2.1.2/vdr ./core Reading symbols from /usr/local/src/vdr/vdr-2.1.2/vdr...done. Loaded symbols for /lib/i686/cmov/libc.so.6 <<snip>> Core was generated by `/usr/local/src/vdr/vdr-2.1.2/vdr --genindex=/var/lib/video/True_blood/At_l'. Program terminated with signal 11, Segmentation fault. #0 0xb7496df5 in ?? () from /lib/i686/cmov/libc.so.6 (gdb) bt #0 0xb7496df5 in ?? () from /lib/i686/cmov/libc.so.6 #1 0x0813b644 in strstr (this=0xbfb16560, FileName=0x82600a8 "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec") at /usr/include/string.h:335 #2 cRecording (this=0xbfb16560, FileName=0x82600a8 "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec") at recording.c:814 #3 0x0813be54 in GenerateIndex (FileName=0xbfb177ee "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec/") at recording.c:2679 #4 0x0818c589 in main (argc=2, argv=0xbfb16904) at vdr.c:345
vdr source is unpatched, built using "make LCLBLD=1"
OS is Ubuntu 12.04 & Debian/Squeeze. Any ideas what is causing this? Can somebody else reproduce this as well with an unpatched source?
Regards,
Lou@vdr-portal
On 02.12.2013 13:15, Lou wrote:
hi list
vdr 2.1.2 segfaults in libc, as soon as I use the terminal syntax (vdr --genindex) to recreate a missing index file. Trying the same thing in a user interface (vdr-sxfe) works as planed.
Here's a backtrace of what's happing:
/usr/local/src/vdr/vdr-2.1.2/vdr --genindex=/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec/ Speicherzugriffsfehler (Speicherabzug geschrieben) gdb /usr/local/src/vdr/vdr-2.1.2/vdr ./core Reading symbols from /usr/local/src/vdr/vdr-2.1.2/vdr...done. Loaded symbols for /lib/i686/cmov/libc.so.6 <<snip>> Core was generated by `/usr/local/src/vdr/vdr-2.1.2/vdr --genindex=/var/lib/video/True_blood/At_l'. Program terminated with signal 11, Segmentation fault. #0 0xb7496df5 in ?? () from /lib/i686/cmov/libc.so.6 (gdb) bt #0 0xb7496df5 in ?? () from /lib/i686/cmov/libc.so.6 #1 0x0813b644 in strstr (this=0xbfb16560, FileName=0x82600a8 "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec") at /usr/include/string.h:335 #2 cRecording (this=0xbfb16560, FileName=0x82600a8 "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec") at recording.c:814 #3 0x0813be54 in GenerateIndex (FileName=0xbfb177ee "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec/") at recording.c:2679 #4 0x0818c589 in main (argc=2, argv=0xbfb16904) at vdr.c:345
I guess this was caused by the changes to videodir.[ch]. For a quick fix you could try moving the line
cVideoDirectory::SetName(VideoDirectory);
into the
case 'v': VideoDirectory = optarg; while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/') optarg[strlen(optarg) - 1] = 0; cVideoDirectory::SetName(VideoDirectory); // <----- here! break;
in vdr.c
Klaus
On 02.12.2013 17:55, Klaus Schmidinger wrote:
On 02.12.2013 13:15, Lou wrote:
hi list
vdr 2.1.2 segfaults in libc, as soon as I use the terminal syntax (vdr --genindex) to recreate a missing index file. Trying the same thing in a user interface (vdr-sxfe) works as planed.
Here's a backtrace of what's happing:
/usr/local/src/vdr/vdr-2.1.2/vdr --genindex=/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec/ Speicherzugriffsfehler (Speicherabzug geschrieben) gdb /usr/local/src/vdr/vdr-2.1.2/vdr ./core Reading symbols from /usr/local/src/vdr/vdr-2.1.2/vdr...done. Loaded symbols for /lib/i686/cmov/libc.so.6 <<snip>> Core was generated by `/usr/local/src/vdr/vdr-2.1.2/vdr --genindex=/var/lib/video/True_blood/At_l'. Program terminated with signal 11, Segmentation fault. #0 0xb7496df5 in ?? () from /lib/i686/cmov/libc.so.6 (gdb) bt #0 0xb7496df5 in ?? () from /lib/i686/cmov/libc.so.6 #1 0x0813b644 in strstr (this=0xbfb16560, FileName=0x82600a8 "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec") at /usr/include/string.h:335 #2 cRecording (this=0xbfb16560, FileName=0x82600a8 "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec") at recording.c:814 #3 0x0813be54 in GenerateIndex (FileName=0xbfb177ee "/var/lib/video/True_blood/At_last/2013-11-29.00.30.203-0.rec/") at recording.c:2679 #4 0x0818c589 in main (argc=2, argv=0xbfb16904) at vdr.c:345
I guess this was caused by the changes to videodir.[ch]. For a quick fix you could try moving the line
cVideoDirectory::SetName(VideoDirectory);
into the
case 'v': VideoDirectory = optarg; while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/') optarg[strlen(optarg) - 1] = 0; cVideoDirectory::SetName(VideoDirectory); // <----- here! break;
in vdr.c
Oh, and use the option '-v'... This is just a quick hack - I'll need to give this more thought.
Klaus
Am 02.12.2013, 17:59 Uhr, schrieb Klaus Schmidinger Klaus.Schmidinger@tvdr.de:
I guess this was caused by the changes to videodir.[ch]. For a quick fix you could try moving the line
cVideoDirectory::SetName(VideoDirectory);
into the
case 'v': VideoDirectory = optarg; while (optarg && *optarg && optarg[strlen(optarg)
- 1] == '/') optarg[strlen(optarg) - 1] = 0; cVideoDirectory::SetName(VideoDirectory); //
<----- here! break;
in vdr.c
Oh, and use the option '-v'... This is just a quick hack - I'll need to give this more thought.
Klaus
Thanks Klaus, this fixes things temporarily, but I agree it's annoying to set --video as well. Especially since you also have to remember setting --video first, THEN call --genindex. If you have it the wrong way around, it will segfault again ...
But it's okay to work with.
Lou
On 02.12.2013 20:31, Lou wrote:
Am 02.12.2013, 17:59 Uhr, schrieb Klaus Schmidinger Klaus.Schmidinger@tvdr.de:
I guess this was caused by the changes to videodir.[ch]. For a quick fix you could try moving the line
cVideoDirectory::SetName(VideoDirectory);
into the
case 'v': VideoDirectory = optarg; while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/') optarg[strlen(optarg) - 1] = 0; cVideoDirectory::SetName(VideoDirectory); // <----- here! break;
in vdr.c
Oh, and use the option '-v'... This is just a quick hack - I'll need to give this more thought.
Klaus
Thanks Klaus, this fixes things temporarily, but I agree it's annoying to set --video as well. Especially since you also have to remember setting --video first, THEN call --genindex. If you have it the wrong way around, it will segfault again ...
This should do it:
------------------------------------------------------------------------------------------- --- vdr.c 2013/12/25 11:01:28 3.6 +++ vdr.c 2013/12/25 11:24:26 @@ -223,6 +223,7 @@ VdrUser = VDR_USER; #endif
+ cVideoDirectory::SetName(VideoDirectory); cPluginManager PluginManager(DEFAULTPLUGINDIR);
static struct option long_options[] = { @@ -443,6 +444,7 @@ case 'v': VideoDirectory = optarg; while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/') optarg[strlen(optarg) - 1] = 0; + cVideoDirectory::SetName(VideoDirectory); break; case 'w': if (isnumber(optarg)) { int t = atoi(optarg); @@ -663,7 +665,6 @@
// Directories:
- cVideoDirectory::SetName(VideoDirectory); if (!ConfigDirectory) ConfigDirectory = DEFAULTCONFDIR; cPlugin::SetConfigDirectory(ConfigDirectory); -------------------------------------------------------------------------------------------
I'll need your full name if you want to be listed in the HISTORY/CONTRIBUTORS files.
Klaus