Project

General

Profile

Actions

Bug #2197

closed

Help! On FreeBSD: internal epg grabber - xmltv child process returns immediately with no output

Added by Dreamcat 4 almost 11 years ago. Updated almost 11 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
EPG - Grabbers
Target version:
-
Start date:
2014-08-04
Due date:
% Done:

0%

Estimated time:
Found in version:
tvheadend: version 3.9.20140801-47bb0ef
Affected Versions:

Description

Trying to debug this issue, but its really been hard on my own.

It had worked on 3.4. I update to master. It not work. I regressed back to 3.4 and it was then broke there too. I cannot get any clue in the output. So try to hack spawn.c spit out extra debugging. Nothing, no clue. And seems like nothing on stderr either.

Aug 4 08:19:03 tvheadend pkg-static: tvheadend-3.9.20140801 installed
Aug 4 08:19:05 tvheadend tvheadend[78866]: upnp: upnp_thread_multicast - cannot bind 239.255.255.250:1900 [e=Can't assign requested address]
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn: program = tv_find_grabbers
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn: pipe(fd) != -1. OK, continuing...
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn: file_readall(2, outp);
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn: prog: /usr/local/bin/tv_find_grabbers, stderr: (null)
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn: file_readall(1, outp);
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn: prog: /usr/local/bin/tv_find_grabbers, stdout: (null)
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn
Aug 4 08:19:05 tvheadend tvheadend[78866]: spawn: return file_readall(fd[0], outp);

All I know is that:

  • Child process is created and fork returns with a valid PID number.
  • Child process exits or returns immediately.
  • According to tvheadend, the child process returns no output whatsoever.
  • I have 'tvheadend' user login account.
  • I have configured the _uk_rk grabber in question.
  • The grabber works on command line with "sudo -u tvheadend /usr/local/bin/tv_grab_uk_rt"
  • Feature does or can works on linux (current master). As confirmed by other IRC user.
  • Nobody else has tested this feature on FreeBSD (yet). Because 'tvheadend' login user account isn't in the ports tree.

I have speculated to Decke a lot of ideas about what might be the matter with it. But truth is don't really have a clue. Despite trying absolutely many things. Including new totally new FreeBSD jail. Going back to older p5-xmltv package. Going back to older 3.4 stable release.

Any assistance appreciated.

  • Any other guy to try to reproduce this bug and confirm or dismiss it as being FreeBSD platform-related.

So I am asking tvheadend code experts. E.g. like Andoma, Adam Sutton, perex or more recent contributors who can improve the debug logging functionality around this function entry point:

src/epggrab.c:
@
/* ****************************************************************** * Internal Grab Thread * *****************************************************************/

/* * Grab from module
*/
static void _epggrab_module_grab ( epggrab_module_int_t *mod )
@

And also in here:

src/spawn.c
@
/** * Execute the given program and return its output in a malloc()ed buffer * * *outp will point to the allocated buffer * The function will return the size of the buffer
*/

int
spawn_and_store_stdout(const char *prog, char *argv[], char **outp)
@

It would be a great help.

Another thing I am dying to see in tvheadend logs is also this error message:

tvheadend tvheadend/ root~# sudo -u tvheadend /usr/local/bin/tv_grab_uk_rt
No channels selected in configfile /usr/local/etc/tvheadend/.xmltv/tv_grab_uk_rt.conf
Please run the grabber with --configure.

But that wasn't the bug here. As the settings was setup correctly beforehand.

What could it be?

  • Something in my environment?
  • Bad user account?

tvheadend tvheadend/ root~# cat /etc/passwd | grep tvheadend
tvheadend:*:981:981:TV Headend:/usr/local/etc/tvheadend:/bin/sh

  • Problem passing execution to perl interpreter / shebang line?

tvheadend tvheadend/ root~# head $(which tv_grab_uk_rt)
#!/usr/local/bin/perl

eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell

use warnings;
use strict;
use XMLTV::ProgressBar;
use XMLTV::Memoize; XMLTV::Memoize::check_argv('get_octets');
use XMLTV::DST;

tvheadend tvheadend/ root~# which /usr/local/bin/perl
/usr/local/bin/perl

I tried my best to eliminate all those reasons before coming here. / Raising this bug. Please help.

Actions

Also available in: Atom PDF