public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [linux-dvb] dvbstream reliability issues?
@ 2008-03-20  8:57 Adam Nielsen
  2008-03-20  9:02 ` Nico Sabbi
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Nielsen @ 2008-03-20  8:57 UTC (permalink / raw)
  To: linux-dvb

Hi all,

I've recently started using dvbstream (instead of dvbrecord) to record
shows using cron but I'm finding it to be very unreliable.

Depending on my reception quality, it has a tendency to segfault fairly
regularly - enough that I wrote a script to reload it after a segfault
so that I wouldn't miss my recording.  With this set up it usually
segfaults once every 15 minutes or so, and sometimes as often as every
4-5 minutes if the reception isn't so great.

Sometimes it doesn't segfault though, it just stops recording for some
reason (the output file only grows by a few bytes a minute.)  This is
worse because it doesn't terminate, so my script isn't able to reload it
to catch the rest of the recording.

For those people using dvbstream to do their recording, are any of you
having issues like this?

I'm running CVS from 2008-02-24 and I'm using -prog to record based on
the program instead of using PIDs (as our broadcasters here seem to
change their PIDs without warning every couple of months.)

I'm hoping there's some easy fix for this, because I'd rather not have
to try to get dvbrecord to work again!

Thanks,
Adam.

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb] dvbstream reliability issues?
  2008-03-20  8:57 [linux-dvb] dvbstream reliability issues? Adam Nielsen
@ 2008-03-20  9:02 ` Nico Sabbi
  2008-03-21  0:54   ` Adam Nielsen
  0 siblings, 1 reply; 8+ messages in thread
From: Nico Sabbi @ 2008-03-20  9:02 UTC (permalink / raw)
  To: linux-dvb

On Thursday 20 March 2008 09:57:11 Adam Nielsen wrote:
> Hi all,
>
> I've recently started using dvbstream (instead of dvbrecord) to
> record shows using cron but I'm finding it to be very unreliable.
>
> Depending on my reception quality, it has a tendency to segfault
> fairly regularly - enough that I wrote a script to reload it after
> a segfault so that I wouldn't miss my recording.  With this set up
> it usually segfaults once every 15 minutes or so, and sometimes as
> often as every 4-5 minutes if the reception isn't so great.
>
> Sometimes it doesn't segfault though, it just stops recording for
> some reason (the output file only grows by a few bytes a minute.) 
> This is worse because it doesn't terminate, so my script isn't able
> to reload it to catch the rest of the recording.
>
> For those people using dvbstream to do their recording, are any of
> you having issues like this?
>
> I'm running CVS from 2008-02-24 and I'm using -prog to record based
> on the program instead of using PIDs (as our broadcasters here seem
> to change their PIDs without warning every couple of months.)
>
> I'm hoping there's some easy fix for this, because I'd rather not
> have to try to get dvbrecord to work again!
>
> Thanks,
> Adam.
>

I use it for hours, even forgetting that it's recording, without 
segfaults.
Try to run it under gdb (after having compiled it with -g) and 
see with "bt" where it segfaults, or bugs can't be fixed

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb] dvbstream reliability issues?
  2008-03-20  9:02 ` Nico Sabbi
@ 2008-03-21  0:54   ` Adam Nielsen
  2008-03-21  8:52     ` Nico Sabbi
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Nielsen @ 2008-03-21  0:54 UTC (permalink / raw)
  To: linux-dvb

> I use it for hours, even forgetting that it's recording, without 
> segfaults.
> Try to run it under gdb (after having compiled it with -g) and 
> see with "bt" where it segfaults, or bugs can't be fixed

What's your reception like?  This particular card (DVico Fusion HDTV)
seems to be somewhat less sensitive compared to my other cards, and I
think getting corrupted data coming in is what breaks dvbstream.  The
recording itself is full of blips as if the reception is quite bad.

When the recording just stops (no crash) gdb doesn't seem to reveal
anything amazing:

<Ctrl+C>
Program received signal SIGINT, Interrupt.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ebf77b in poll () from /lib/libc.so.6
#2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at dvbstream.c:1516
(gdb) fr 2
#2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at dvbstream.c:1516
1516            poll(pfds,1,500);
(gdb) cont
Continuing.
[Still no DVB data being written to disk]
<Ctrl+C>
Program received signal SIGINT, Interrupt.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ebf77b in poll () from /lib/libc.so.6
#2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at dvbstream.c:1516
(gdb) fr 2
#2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at dvbstream.c:1516
1516            poll(pfds,1,500);


If I kill dvbstream and reload it then all is fine, so it seems that
maybe the card loses sync with the signal, and either dvbstream needs to
retune the card, or perhaps the kernel driver should do that automatically.

When it crashes it looks like this:


Program received signal SIGSEGV, Segmentation fault.
0xb7ee153c in memcpy () from /lib/libc.so.6
(gdb) bt
#0  0xb7ee153c in memcpy () from /lib/libc.so.6
#1  0x08049714 in collect_section (section=0x815bef0, pusi=<value
     optimized out>, buf=0x3ffff59e <Address 0x3ffff59e out of bounds>,
     len=3221135360) at dvbstream.c:579
#2  0x0804b21b in main (argc=12, argv=0xbffe8084) at dvbstream.c:683

(gdb) fr 1
#1  0x08049714 in collect_section (section=0x815bef0, pusi=<value
     optimized out>, buf=0x3ffff59e <Address 0x3ffff59e out of bounds>,
     len=3221135360) at dvbstream.c:579
579       memcpy(&(section->buf[section->pos]), buf, len);

(gdb) fr 2
#2  0x0804b21b in main (argc=12, argv=0xbffe8084) at dvbstream.c:683
683       skip = collect_section(&(pmt->section), pusi, b, l);


It looks like the default CFLAGS do some optimisation - let me know if
you need me to recompile it without this.

Cheers,
Adam.

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb] dvbstream reliability issues?
  2008-03-21  0:54   ` Adam Nielsen
@ 2008-03-21  8:52     ` Nico Sabbi
  2008-03-24 18:35       ` Nico Sabbi
  0 siblings, 1 reply; 8+ messages in thread
From: Nico Sabbi @ 2008-03-21  8:52 UTC (permalink / raw)
  To: linux-dvb

On Friday 21 March 2008 01:54:13 Adam Nielsen wrote:
> > I use it for hours, even forgetting that it's recording, without
> > segfaults.
> > Try to run it under gdb (after having compiled it with -g) and
> > see with "bt" where it segfaults, or bugs can't be fixed
>
> What's your reception like?  This particular card (DVico Fusion
> HDTV) seems to be somewhat less sensitive compared to my other
> cards, and I think getting corrupted data coming in is what breaks
> dvbstream.  The recording itself is full of blips as if the
> reception is quite bad.
>
> When the recording just stops (no crash) gdb doesn't seem to reveal
> anything amazing:
>
> <Ctrl+C>
> Program received signal SIGINT, Interrupt.
> 0xffffe410 in __kernel_vsyscall ()
> (gdb) bt
> #0  0xffffe410 in __kernel_vsyscall ()
> #1  0xb7ebf77b in poll () from /lib/libc.so.6
> #2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at
> dvbstream.c:1516 (gdb) fr 2
> #2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at
> dvbstream.c:1516 1516            poll(pfds,1,500);
> (gdb) cont
> Continuing.

poll() is used because the dvr device is opened in O_NONBLOCK mode,
that can be replaced with the usual blocking mode (although if it
makes a difference it's probably an indicator of a bug in the driver)

>
>
> If I kill dvbstream and reload it then all is fine, so it seems
> that maybe the card loses sync with the signal, and either
> dvbstream needs to retune the card, or perhaps the kernel driver
> should do that automatically.
>
> When it crashes it looks like this:
>
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xb7ee153c in memcpy () from /lib/libc.so.6
> (gdb) bt
> #0  0xb7ee153c in memcpy () from /lib/libc.so.6
> #1  0x08049714 in collect_section (section=0x815bef0, pusi=<value
>      optimized out>, buf=0x3ffff59e <Address 0x3ffff59e out of
> bounds>, len=3221135360) at dvbstream.c:579
> #2  0x0804b21b in main (argc=12, argv=0xbffe8084) at
> dvbstream.c:683

len is so big?? this must be an actual bug

>
> (gdb) fr 1
> #1  0x08049714 in collect_section (section=0x815bef0, pusi=<value
>      optimized out>, buf=0x3ffff59e <Address 0x3ffff59e out of
> bounds>, len=3221135360) at dvbstream.c:579
> 579       memcpy(&(section->buf[section->pos]), buf, len);
>
> (gdb) fr 2
> #2  0x0804b21b in main (argc=12, argv=0xbffe8084) at
> dvbstream.c:683 683       skip = collect_section(&(pmt->section),
> pusi, b, l);
>
>
> It looks like the default CFLAGS do some optimisation - let me know
> if you need me to recompile it without this.
>

fortunately a peaceful easter of coding is coming :)

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb] dvbstream reliability issues?
  2008-03-21  8:52     ` Nico Sabbi
@ 2008-03-24 18:35       ` Nico Sabbi
  2008-03-24 23:23         ` Adam Nielsen
  2008-03-29  9:25         ` Nico Sabbi
  0 siblings, 2 replies; 8+ messages in thread
From: Nico Sabbi @ 2008-03-24 18:35 UTC (permalink / raw)
  To: linux-dvb

On Friday 21 March 2008 09:52:01 Nico Sabbi wrote:
> On Friday 21 March 2008 01:54:13 Adam Nielsen wrote:
> > > I use it for hours, even forgetting that it's recording,
> > > without segfaults.
> > > Try to run it under gdb (after having compiled it with -g) and
> > > see with "bt" where it segfaults, or bugs can't be fixed
> >
> > What's your reception like?  This particular card (DVico Fusion
> > HDTV) seems to be somewhat less sensitive compared to my other
> > cards, and I think getting corrupted data coming in is what
> > breaks dvbstream.  The recording itself is full of blips as if
> > the reception is quite bad.
> >
> > When the recording just stops (no crash) gdb doesn't seem to
> > reveal anything amazing:
> >
> > <Ctrl+C>
> > Program received signal SIGINT, Interrupt.
> > 0xffffe410 in __kernel_vsyscall ()
> > (gdb) bt
> > #0  0xffffe410 in __kernel_vsyscall ()
> > #1  0xb7ebf77b in poll () from /lib/libc.so.6
> > #2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at
> > dvbstream.c:1516 (gdb) fr 2
> > #2  0x0804aeeb in main (argc=12, argv=0xbfe38484) at
> > dvbstream.c:1516 1516            poll(pfds,1,500);
> > (gdb) cont
> > Continuing.
>
> poll() is used because the dvr device is opened in O_NONBLOCK mode,
> that can be replaced with the usual blocking mode (although if it
> makes a difference it's probably an indicator of a bug in the
> driver)
>
> > If I kill dvbstream and reload it then all is fine, so it seems
> > that maybe the card loses sync with the signal, and either
> > dvbstream needs to retune the card, or perhaps the kernel driver
> > should do that automatically.
> >
> > When it crashes it looks like this:
> >
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0xb7ee153c in memcpy () from /lib/libc.so.6
> > (gdb) bt
> > #0  0xb7ee153c in memcpy () from /lib/libc.so.6
> > #1  0x08049714 in collect_section (section=0x815bef0, pusi=<value
> >      optimized out>, buf=0x3ffff59e <Address 0x3ffff59e out of
> > bounds>, len=3221135360) at dvbstream.c:579
> > #2  0x0804b21b in main (argc=12, argv=0xbffe8084) at
> > dvbstream.c:683
>
> len is so big?? this must be an actual bug
>
> > (gdb) fr 1
> > #1  0x08049714 in collect_section (section=0x815bef0, pusi=<value
> >      optimized out>, buf=0x3ffff59e <Address 0x3ffff59e out of
> > bounds>, len=3221135360) at dvbstream.c:579
> > 579       memcpy(&(section->buf[section->pos]), buf, len);
> >
> > (gdb) fr 2
> > #2  0x0804b21b in main (argc=12, argv=0xbffe8084) at
> > dvbstream.c:683 683       skip = collect_section(&(pmt->section),
> > pusi, b, l);
> >
> >
> > It looks like the default CFLAGS do some optimisation - let me
> > know if you need me to recompile it without this.
>
> fortunately a peaceful easter of coding is coming :)
>
should be fixed in cvs

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb] dvbstream reliability issues?
  2008-03-24 18:35       ` Nico Sabbi
@ 2008-03-24 23:23         ` Adam Nielsen
  2008-03-29  9:25         ` Nico Sabbi
  1 sibling, 0 replies; 8+ messages in thread
From: Adam Nielsen @ 2008-03-24 23:23 UTC (permalink / raw)
  To: linux-dvb

>>>
>>> When it crashes it looks like this:
>>>
> should be fixed in cvs

Thanks Nico!  I'm testing it now - I'll let you know how I go.

I've also added some default settings for Australia, if you would like 
to add them to dvb_defaults.h:

#ifdef AUSTRALIA

/* AUSTRALIA settings */
#define DVB_T_LOCATION              "Australia"
#define BANDWIDTH_DEFAULT           BANDWIDTH_7_MHZ
#define HP_CODERATE_DEFAULT         FEC_3_4  /* SBS is FEC_2_3 */
#define CONSTELLATION_DEFAULT       QAM_64
#define TRANSMISSION_MODE_DEFAULT   TRANSMISSION_MODE_8K
#define GUARD_INTERVAL_DEFAULT      GUARD_INTERVAL_1_16
#define HIERARCHY_DEFAULT           HIERARCHY_NONE

#endif

I also got a few errors come up when I compiled, some of which may lead 
to other problems - I'm not sure whether this is because I'm running on 
64-bit now or what.

tune.c: In function ‘tune_it’:
tune.c:254: warning: format ‘%d’ expects type ‘int’, but argument 8 has
   type ‘long unsigned int’
tune.c:254: warning: format ‘%d’ expects type ‘int’, but argument 9 has
   type ‘long unsigned int’
tune.c:254: warning: format ‘%d’ expects type ‘int’, but argument 10 has
   type ‘long unsigned int’

dvbstream.c:483:1: warning: "setbit" redefined
/usr/include/sys/param.h:45:1: warning: this is the location of the
   previous definition

dvbstream.c: In function ‘parse_ts_packet’:
dvbstream.c:854: warning: control reaches end of non-void function


Cheers,
Adam.

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb] dvbstream reliability issues?
  2008-03-24 18:35       ` Nico Sabbi
  2008-03-24 23:23         ` Adam Nielsen
@ 2008-03-29  9:25         ` Nico Sabbi
  2008-03-29 11:33           ` Adam Nielsen
  1 sibling, 1 reply; 8+ messages in thread
From: Nico Sabbi @ 2008-03-29  9:25 UTC (permalink / raw)
  To: linux-dvb

Il Monday 24 March 2008 19:35:32 Nico Sabbi ha scritto:
> On Friday 21 March 2008 09:52:01 Nico Sabbi wrote:
> >
> should be fixed in cvs
> 

Adam, please report if the version in cvs fixed your problems 

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb] dvbstream reliability issues?
  2008-03-29  9:25         ` Nico Sabbi
@ 2008-03-29 11:33           ` Adam Nielsen
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Nielsen @ 2008-03-29 11:33 UTC (permalink / raw)
  To: Nico Sabbi; +Cc: linux-dvb

 > Adam, please report if the version in cvs fixed your problems

Sorry Nico, yes, since testing your update I haven't had a single crash. 
  The card still drops the signal when the reception isn't great and 
dvbstream doesn't realise that has happened, but as far as the crashes 
go the same programmes that used to have 15-20 crashes in them now have 
none!

Many thanks for fixing this!

Cheers,
Adam.


_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-03-29 11:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-20  8:57 [linux-dvb] dvbstream reliability issues? Adam Nielsen
2008-03-20  9:02 ` Nico Sabbi
2008-03-21  0:54   ` Adam Nielsen
2008-03-21  8:52     ` Nico Sabbi
2008-03-24 18:35       ` Nico Sabbi
2008-03-24 23:23         ` Adam Nielsen
2008-03-29  9:25         ` Nico Sabbi
2008-03-29 11:33           ` Adam Nielsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox