Bug #1440
Channel scan/mapping causes crash of dvb driver
0%
Description
Sometimes it crashes during channel scan, sometimes not until I start to map the channels.
The log-file of the driver (dvbhdhomerun) then outputs:
hdhomerun_device_set_tuner_channel: ffffffff hdhomerun_tuner_status_t: ffffffff
the correct values would be:
hdhomerun_device_set_tuner_channel: 1 hdhomerun_tuner_status_t: 1
According to the source code of the driver, possible values are 1 for OK, 0 for device error and -1 for a bad request.
So I don't have a clue how an output of ffffffff is even possible. If you like, I can show you the appropriate functions.
At first I thought it's bug within the driver, but then I tried the same steps with TVHeadend V3.2 - without any crashes!
Was there a change, how the hardware is beeing addressed / what command are beeing send?
Files
History
Updated by Rene Herbrich about 12 years ago
What I forgot: the debug output of tvheadend is then "no input detected" and I'm not able to watch tv after that, for example.
After restarting driver and tvheadend everything is ok again.
I assume the driver gets a wrong information, to which channel it should tune and crashes then.
The 'ffffffff' could be a buffer overflow or something like this?
Updated by Villy Thomsen about 12 years ago
What I forgot: the debug output of tvheadend is then "no input detected" and I'm not able to watch tv after that, for example.
After restarting driver and tvheadend everything is ok again.I assume the driver gets a wrong information, to which channel it should tune and crashes then.
The 'ffffffff' could be a buffer overflow or something like this?
Anything in /var/log/kern.log around the point in time when it happens?
Updated by Rene Herbrich about 12 years ago
The linux on my synology NAS does not have such a file and /var/log/messages and dmesg contain/output nothing helpful.
The only logs where I can see, that something happened is dvbhdhomerun.log:
FE_READ_SIGNAL_STRENGTH strength: 63 sym qual: 64 sig to noise:64 sym qual: 64 hdhomerun_device_set_tuner_channel: 1 hdhomerun_tuner_status_t: 1 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 sym qual: 0 hdhomerun_device_set_tuner_channel: ffffffff hdhomerun_tuner_status_t: ffffffff FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0
and tvheadend debug output:
Dec 01 20:32:39 eit: install table handlers Dec 01 20:32:53 dvb: "458,000 kHz" on adapter "HDHomeRun DVB-C #2", status changed to No signal Dec 01 20:32:57 dvb: "/dev/dvb/adapter1" tuning to "466,000 kHz" (Initial autoscan)
If I try to find the hdhomerun in my network with my mac, it's not able to find the device again until
I kill the dvbhdhomerun process on my NAS. So I think driver stays in a "crashed state" and jams the hdhomerun.
Updated by Rene Herbrich about 12 years ago
If I let tvheadend scan for channels only with one adapter of my hdhomerun device it usually completes that task.
If both adapters do that at the same time (= more traffic/higher load on the hdhomerun?) it crashes really fast.
Updated by Villy Thomsen about 12 years ago
Rene Herbrich wrote:
If I try to find the hdhomerun in my network with my mac, it's not able to find the device again until
I kill the dvbhdhomerun process on my NAS. So I think driver stays in a "crashed state" and jams the hdhomerun.If I let tvheadend scan for channels only with one adapter of my hdhomerun device it usually completes that task.
If both adapters do that at the same time (= more traffic/higher load on the hdhomerun?) it crashes really
Interesting. Both that you can't discover the hdhomerun when the error is there and that works with only one tuner.
The symptoms sound like it could be network related - but we need a bit more log from the hdhomerun library when it happens.
Can/do you build the userhdhomerun application yourself? If yes, then I'll commit a little snippet of code that allows you to log a lot more in a failure situation (something I've been meaning to do for a while anyways).
Updated by Villy Thomsen about 12 years ago
- File hdhomerun_tuner.tar.gz hdhomerun_tuner.tar.gz added
Can/do you build the userhdhomerun application yourself? If yes, then I'll commit a little snippet of code that allows you to log a lot more in a failure situation (something I've been meaning to do for a while anyways).
Seems like CVS at Sourceforge is a bit broken tonight, so attached a file here instead. Unzip the below in dvbhdhomerun/userhdhomerun directory and build a new userhdhomerun. That one will log a lot more to /var/log/dvbhdhomerun_libhdhomerun.log when you get the ffffffff above.
cd dvbhdhomerun/userhdhomerun
tar xvfz hdhomerun_tuner.tar.gz
Updated by Rene Herbrich about 12 years ago
Villy Thomsen wrote:
Interesting. Both that you can't discover the hdhomerun when the error is there and that works with only one tuner.
The symptoms sound like it could be network related - but we need a bit more log from the hdhomerun library when it happens.
Can/do you build the userhdhomerun application yourself? If yes, then I'll commit a little snippet of code that allows you to log a lot more in a failure situation (something I've been meaning to do for a while anyways).
Well, scanning for channels works most of the time with one tuner, yes, but the mapping of the channels crashes with one tuner, too.
Could be, but why are there no crashes with an older tvheadend version? By the way: all of my devices are connected via 1GB ethernet.
Yes, I had built kernel and userspace part on my own. Kernel part on a virtual machine with ubuntu and userspace part on my nas. I've used a version available on the repo, shortly before 0.0.11 was released. So yes, I'd be pleased if you could commit a version with more detailed logging.
Would it be enough to compile only userhdhomerun or do I have to compile the kernel part, too?
Updated by Villy Thomsen about 12 years ago
Would it be enough to compile only userhdhomerun or do I have to compile the kernel part, too?
Just the userhdhomerun will do (with the above "patch" applied).
Updated by Rene Herbrich about 12 years ago
Villy Thomsen wrote:
Would it be enough to compile only userhdhomerun or do I have to compile the kernel part, too?
Just the userhdhomerun will do (with the above "patch" applied).
Downloaded 0.0.11 (or does it have to be the latest code from cvs?) and applied your patch. But there no more detailed messages in my logfile:
FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 sym qual: 0 hdhomerun_device_set_tuner_channel: ffffffff hdhomerun_tuner_status_t: ffffffff FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0 sym qual: 0 hdhomerun_device_set_tuner_channel: ffffffff hdhomerun_tuner_status_t: ffffffff FE_READ_STATUS sym qual: 0 FE_READ_STATUS sym qual: 0
Just to be sure, I start userhdhomerun that way:
/opt/src/dvbhdhomerun-0.0.11/userhdhomerun/build/userhdhomerun -f -u root -g root -l "/opt/tvheadend/dvbhdhomerun.log"
Updated by Rene Herbrich about 12 years ago
Sorry I've should have read, what you had written. heres the log output:
20121201-23:47:07 Debug enabled 20121201-23:47:07 Debug enabled 20121201-23:49:24 hdhomerun_control_recv_sock: recv failed (11) 20121201-23:49:27 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:27 hdhomerun_control_send_recv: connect failed 20121201-23:49:27 hdhomerun_control_get_set: send/recv error 20121201-23:49:27 hdhomerun_control_recv_sock: recv failed (11) 20121201-23:49:30 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:30 hdhomerun_control_send_recv: connect failed 20121201-23:49:30 hdhomerun_control_get_set: send/recv error 20121201-23:49:32 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:32 hdhomerun_control_send_recv: connect failed 20121201-23:49:32 hdhomerun_control_get_set: send/recv error 20121201-23:49:33 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:49:33 hdhomerun_control_send_recv: connect failed 20121201-23:49:33 hdhomerun_control_get_set: send/recv error 20121201-23:49:33 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:49:33 hdhomerun_control_send_recv: connect failed 20121201-23:49:33 hdhomerun_control_get_set: send/recv error 20121201-23:49:36 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:36 hdhomerun_control_send_recv: connect failed 20121201-23:49:36 hdhomerun_control_get_set: send/recv error 20121201-23:49:36 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:49:36 hdhomerun_control_send_recv: connect failed 20121201-23:49:36 hdhomerun_control_get_set: send/recv error 20121201-23:49:38 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:38 hdhomerun_control_send_recv: connect failed 20121201-23:49:38 hdhomerun_control_get_set: send/recv error 20121201-23:49:40 hdhomerun_control_connect_sock: device not found 20121201-23:49:40 hdhomerun_control_send_recv: connect failed 20121201-23:49:40 hdhomerun_control_get_set: send/recv error 20121201-23:49:40 hdhomerun_control_connect_sock: device not found 20121201-23:49:40 hdhomerun_control_send_recv: connect failed 20121201-23:49:40 hdhomerun_control_get_set: send/recv error 20121201-23:49:43 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:43 hdhomerun_control_send_recv: connect failed 20121201-23:49:43 hdhomerun_control_get_set: send/recv error 20121201-23:49:43 hdhomerun_control_connect_sock: device not found 20121201-23:49:43 hdhomerun_control_send_recv: connect failed 20121201-23:49:43 hdhomerun_control_get_set: send/recv error 20121201-23:49:44 hdhomerun_control_connect_sock: device not found 20121201-23:49:44 hdhomerun_control_send_recv: connect failed 20121201-23:49:44 hdhomerun_control_get_set: send/recv error 20121201-23:49:46 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:46 hdhomerun_control_send_recv: connect failed 20121201-23:49:46 hdhomerun_control_get_set: send/recv error 20121201-23:49:47 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:49:47 hdhomerun_control_send_recv: connect failed 20121201-23:49:47 hdhomerun_control_get_set: send/recv error 20121201-23:49:47 hdhomerun_control_connect_sock: device not found 20121201-23:49:47 hdhomerun_control_send_recv: connect failed 20121201-23:49:47 hdhomerun_control_get_set: send/recv error 20121201-23:49:51 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:51 hdhomerun_control_send_recv: connect failed 20121201-23:49:51 hdhomerun_control_get_set: send/recv error 20121201-23:49:53 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:49:53 hdhomerun_control_send_recv: connect failed 20121201-23:49:53 hdhomerun_control_get_set: send/recv error 20121201-23:49:55 hdhomerun_control_connect_sock: device not found 20121201-23:49:55 hdhomerun_control_send_recv: connect failed 20121201-23:49:55 hdhomerun_control_get_set: send/recv error 20121201-23:49:55 hdhomerun_control_connect_sock: device not found 20121201-23:49:55 hdhomerun_control_send_recv: connect failed 20121201-23:49:55 hdhomerun_control_get_set: send/recv error 20121201-23:49:56 hdhomerun_control_connect_sock: device not found 20121201-23:49:56 hdhomerun_control_send_recv: connect failed 20121201-23:49:56 hdhomerun_control_get_set: send/recv error 20121201-23:49:56 hdhomerun_control_connect_sock: device not found 20121201-23:49:56 hdhomerun_control_send_recv: connect failed 20121201-23:49:56 hdhomerun_control_get_set: send/recv error 20121201-23:49:57 hdhomerun_control_connect_sock: device not found 20121201-23:49:57 hdhomerun_control_send_recv: connect failed 20121201-23:49:57 hdhomerun_control_get_set: send/recv error 20121201-23:49:57 hdhomerun_control_connect_sock: device not found 20121201-23:49:57 hdhomerun_control_send_recv: connect failed 20121201-23:49:57 hdhomerun_control_get_set: send/recv error 20121201-23:49:58 hdhomerun_control_connect_sock: device not found 20121201-23:49:58 hdhomerun_control_send_recv: connect failed 20121201-23:49:58 hdhomerun_control_get_set: send/recv error 20121201-23:49:58 hdhomerun_control_connect_sock: device not found 20121201-23:49:58 hdhomerun_control_send_recv: connect failed 20121201-23:49:58 hdhomerun_control_get_set: send/recv error 20121201-23:50:00 hdhomerun_control_connect_sock: device not found 20121201-23:50:00 hdhomerun_control_send_recv: connect failed 20121201-23:50:00 hdhomerun_control_get_set: send/recv error 20121201-23:50:00 hdhomerun_control_connect_sock: device not found 20121201-23:50:00 hdhomerun_control_send_recv: connect failed 20121201-23:50:00 hdhomerun_control_get_set: send/recv error 20121201-23:50:02 hdhomerun_control_connect_sock: device not found 20121201-23:50:02 hdhomerun_control_send_recv: connect failed 20121201-23:50:02 hdhomerun_control_get_set: send/recv error 20121201-23:50:05 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:05 hdhomerun_control_send_recv: connect failed 20121201-23:50:05 hdhomerun_control_get_set: send/recv error 20121201-23:50:05 hdhomerun_control_connect_sock: device not found 20121201-23:50:05 hdhomerun_control_send_recv: connect failed 20121201-23:50:05 hdhomerun_control_get_set: send/recv error 20121201-23:50:06 hdhomerun_control_connect_sock: device not found 20121201-23:50:06 hdhomerun_control_send_recv: connect failed 20121201-23:50:06 hdhomerun_control_get_set: send/recv error 20121201-23:50:08 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:08 hdhomerun_control_send_recv: connect failed 20121201-23:50:08 hdhomerun_control_get_set: send/recv error 20121201-23:50:09 hdhomerun_control_connect_sock: device not found 20121201-23:50:09 hdhomerun_control_send_recv: connect failed 20121201-23:50:09 hdhomerun_control_get_set: send/recv error 20121201-23:50:09 hdhomerun_control_connect_sock: device not found 20121201-23:50:09 hdhomerun_control_send_recv: connect failed 20121201-23:50:09 hdhomerun_control_get_set: send/recv error 20121201-23:50:13 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:13 hdhomerun_control_send_recv: connect failed 20121201-23:50:13 hdhomerun_control_get_set: send/recv error 20121201-23:50:15 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:15 hdhomerun_control_send_recv: connect failed 20121201-23:50:15 hdhomerun_control_get_set: send/recv error 20121201-23:50:16 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:50:16 hdhomerun_control_send_recv: connect failed 20121201-23:50:16 hdhomerun_control_get_set: send/recv error 20121201-23:50:16 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:50:16 hdhomerun_control_send_recv: connect failed 20121201-23:50:16 hdhomerun_control_get_set: send/recv error 20121201-23:50:17 hdhomerun_control_connect_sock: device not found 20121201-23:50:17 hdhomerun_control_send_recv: connect failed 20121201-23:50:17 hdhomerun_control_get_set: send/recv error 20121201-23:50:19 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:19 hdhomerun_control_send_recv: connect failed 20121201-23:50:19 hdhomerun_control_get_set: send/recv error 20121201-23:50:20 hdhomerun_control_connect_sock: device not found 20121201-23:50:20 hdhomerun_control_send_recv: connect failed 20121201-23:50:20 hdhomerun_control_get_set: send/recv error 20121201-23:50:23 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:23 hdhomerun_control_send_recv: connect failed 20121201-23:50:23 hdhomerun_control_get_set: send/recv error 20121201-23:50:25 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:25 hdhomerun_control_send_recv: connect failed 20121201-23:50:25 hdhomerun_control_get_set: send/recv error 20121201-23:50:26 hdhomerun_control_connect_sock: device not found 20121201-23:50:26 hdhomerun_control_send_recv: connect failed 20121201-23:50:26 hdhomerun_control_get_set: send/recv error 20121201-23:50:27 hdhomerun_control_connect_sock: device not found 20121201-23:50:27 hdhomerun_control_send_recv: connect failed 20121201-23:50:27 hdhomerun_control_get_set: send/recv error 20121201-23:50:28 hdhomerun_control_connect_sock: device not found 20121201-23:50:28 hdhomerun_control_send_recv: connect failed 20121201-23:50:28 hdhomerun_control_get_set: send/recv error 20121201-23:50:28 hdhomerun_control_connect_sock: device not found 20121201-23:50:28 hdhomerun_control_send_recv: connect failed 20121201-23:50:28 hdhomerun_control_get_set: send/recv error 20121201-23:50:29 hdhomerun_control_connect_sock: device not found 20121201-23:50:29 hdhomerun_control_send_recv: connect failed 20121201-23:50:29 hdhomerun_control_get_set: send/recv error 20121201-23:50:29 hdhomerun_control_connect_sock: device not found 20121201-23:50:29 hdhomerun_control_send_recv: connect failed 20121201-23:50:29 hdhomerun_control_get_set: send/recv error 20121201-23:50:32 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:32 hdhomerun_control_send_recv: connect failed 20121201-23:50:32 hdhomerun_control_get_set: send/recv error 20121201-23:50:32 hdhomerun_control_connect_sock: device not found 20121201-23:50:32 hdhomerun_control_send_recv: connect failed 20121201-23:50:32 hdhomerun_control_get_set: send/recv error 20121201-23:50:36 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:36 hdhomerun_control_send_recv: connect failed 20121201-23:50:36 hdhomerun_control_get_set: send/recv error 20121201-23:50:36 hdhomerun_control_connect_sock: device not found 20121201-23:50:36 hdhomerun_control_send_recv: connect failed 20121201-23:50:36 hdhomerun_control_get_set: send/recv error 20121201-23:50:38 hdhomerun_control_connect_sock: device not found 20121201-23:50:38 hdhomerun_control_send_recv: connect failed 20121201-23:50:38 hdhomerun_control_get_set: send/recv error 20121201-23:50:38 hdhomerun_control_connect_sock: device not found 20121201-23:50:38 hdhomerun_control_send_recv: connect failed 20121201-23:50:38 hdhomerun_control_get_set: send/recv error 20121201-23:50:39 hdhomerun_control_connect_sock: device not found 20121201-23:50:39 hdhomerun_control_send_recv: connect failed 20121201-23:50:39 hdhomerun_control_get_set: send/recv error 20121201-23:50:39 hdhomerun_control_connect_sock: device not found 20121201-23:50:39 hdhomerun_control_send_recv: connect failed 20121201-23:50:39 hdhomerun_control_get_set: send/recv error 20121201-23:50:40 hdhomerun_control_connect_sock: device not found 20121201-23:50:40 hdhomerun_control_send_recv: connect failed 20121201-23:50:40 hdhomerun_control_get_set: send/recv error 20121201-23:50:40 hdhomerun_control_connect_sock: device not found 20121201-23:50:40 hdhomerun_control_send_recv: connect failed 20121201-23:50:40 hdhomerun_control_get_set: send/recv error 20121201-23:50:43 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:43 hdhomerun_control_send_recv: connect failed 20121201-23:50:43 hdhomerun_control_get_set: send/recv error 20121201-23:50:44 hdhomerun_control_connect_sock: device not found 20121201-23:50:44 hdhomerun_control_send_recv: connect failed 20121201-23:50:44 hdhomerun_control_get_set: send/recv error 20121201-23:50:45 hdhomerun_control_connect_sock: device not found 20121201-23:50:45 hdhomerun_control_send_recv: connect failed 20121201-23:50:45 hdhomerun_control_get_set: send/recv error 20121201-23:50:46 hdhomerun_control_connect_sock: device not found 20121201-23:50:46 hdhomerun_control_send_recv: connect failed 20121201-23:50:46 hdhomerun_control_get_set: send/recv error 20121201-23:50:49 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:49 hdhomerun_control_send_recv: connect failed 20121201-23:50:49 hdhomerun_control_get_set: send/recv error 20121201-23:50:50 hdhomerun_control_connect_sock: device not found 20121201-23:50:50 hdhomerun_control_send_recv: connect failed 20121201-23:50:50 hdhomerun_control_get_set: send/recv error 20121201-23:50:51 hdhomerun_control_connect_sock: device not found 20121201-23:50:51 hdhomerun_control_send_recv: connect failed 20121201-23:50:51 hdhomerun_control_get_set: send/recv error 20121201-23:50:51 hdhomerun_control_connect_sock: device not found 20121201-23:50:51 hdhomerun_control_send_recv: connect failed 20121201-23:50:51 hdhomerun_control_get_set: send/recv error 20121201-23:50:52 hdhomerun_control_connect_sock: device not found 20121201-23:50:52 hdhomerun_control_send_recv: connect failed 20121201-23:50:52 hdhomerun_control_get_set: send/recv error 20121201-23:50:55 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:55 hdhomerun_control_send_recv: connect failed 20121201-23:50:55 hdhomerun_control_get_set: send/recv error 20121201-23:50:57 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:50:57 hdhomerun_control_send_recv: connect failed 20121201-23:50:57 hdhomerun_control_get_set: send/recv error 20121201-23:50:58 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:50:58 hdhomerun_control_send_recv: connect failed 20121201-23:50:58 hdhomerun_control_get_set: send/recv error 20121201-23:50:58 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:50:58 hdhomerun_control_send_recv: connect failed 20121201-23:50:58 hdhomerun_control_get_set: send/recv error 20121201-23:50:59 hdhomerun_control_connect_sock: device not found 20121201-23:50:59 hdhomerun_control_send_recv: connect failed 20121201-23:50:59 hdhomerun_control_get_set: send/recv error 20121201-23:51:00 hdhomerun_control_connect_sock: device not found 20121201-23:51:00 hdhomerun_control_send_recv: connect failed 20121201-23:51:00 hdhomerun_control_get_set: send/recv error 20121201-23:51:02 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:51:02 hdhomerun_control_send_recv: connect failed 20121201-23:51:02 hdhomerun_control_get_set: send/recv error 20121201-23:51:03 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:51:03 hdhomerun_control_send_recv: connect failed 20121201-23:51:03 hdhomerun_control_get_set: send/recv error 20121201-23:51:03 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:51:03 hdhomerun_control_send_recv: connect failed 20121201-23:51:03 hdhomerun_control_get_set: send/recv error 20121201-23:51:03 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:51:03 hdhomerun_control_send_recv: connect failed 20121201-23:51:03 hdhomerun_control_get_set: send/recv error 20121201-23:51:03 hdhomerun_control_connect_sock: failed to connect (111) 20121201-23:51:03 hdhomerun_control_send_recv: connect failed 20121201-23:51:03 hdhomerun_control_get_set: send/recv error 20121201-23:51:04 hdhomerun_control_connect_sock: device not found 20121201-23:51:04 hdhomerun_control_send_recv: connect failed 20121201-23:51:04 hdhomerun_control_get_set: send/recv error 20121201-23:51:05 hdhomerun_control_connect_sock: device not found 20121201-23:51:05 hdhomerun_control_send_recv: connect failed 20121201-23:51:05 hdhomerun_control_get_set: send/recv error 20121201-23:51:08 hdhomerun_control_connect_sock: failed to connect (11) 20121201-23:51:08 hdhomerun_control_send_recv: connect failed 20121201-23:51:08 hdhomerun_control_get_set: send/recv error
Updated by Rene Herbrich about 12 years ago
I've looked the errno codes up, 11 means EAGAIN = Try again and 111 means ECONNREFUSED = Connection refused.
Seems like the device is busy and is not able to respond to the requests? Maybe a stupid idea, but could the newer tvheadend version run
so fast, that it's too fast for the hdhomerun?
Updated by Rene Herbrich about 12 years ago
Here's an output of hdhomerun_config right after the crash:
DS112j> ./hdhomerun_config 1220A263 get /tuner1/debug tun: ch=auto:418000000 lock=a8qam256-6900:418000000 ss=100 snq=100 seq=100 dbg=-396/1883 dev: bps=50826176 resync=0 overflow=5193 ts: bps=50826176 ut=82 te=0 miss=1059 crc=0 flt: bps=50826176 net: pps=0 err=74364 stop=2 DS112j> ./hdhomerun_config 1220A263 get /tuner0/debug tun: ch=auto:442000000 lock=a8qam256-6900:442000000 ss=100 snq=100 seq=100 dbg=-402/8622 dev: bps=50805120 resync=0 overflow=2171 ts: bps=50805120 ut=81 te=0 miss=380 crc=0 flt: bps=50805120 net: pps=0 err=74685 stop=2
the manual explaines these values as follows:
● tun = tuner status ○ see above section ● dev = device status ● ts = transport stream ○ bps = bits per second ○ ut = utilization percentage (100% is filled to capacity) ○ te = transport error counter (uncorrectable reception error) ○ miss = missed packet counter (jump in sequence numbers) ○ crc = crc error counter ● flt = results after pid filtering ○ bps = bits per second ● net = network status ○ pps = packets per second ○ err = packets or TS frames dropped before transmission. ○ stop = reason for stopping the stream The counters are reset to zero upon a channel change, but may indicate a small number of errors caused before the tuner locks on the channel. As a result, diagnostics should be based on the change in values over time, and not the initial values.
So there is definitely a problem with sending/receiving network pakets. Looking at the overflow counter
I might be right with my assumption the device is unable to cope with the requests. What do you think?
Updated by Villy Thomsen about 12 years ago
So there is definitely a problem with sending/receiving network pakets. Looking at the overflow counter
I might be right with my assumption the device is unable to cope with the requests. What do you think?
I think the most interesting one of the values from /tuner0/debug is actually the "err" one. E.g. "Packet of TS frames dropped before transmission". Which I would guess means that the HDHomeRun dropped frames instead of sending them because the receiver e.g. userhdhomerun couldn't keep up.
One thing that pops immediately to my mind is that userhdhomerun per default is build in debug mode - that is without any optimization for performance (to make it easier to debug it). You should probably try disabling that before trying anything else.
dvbhdhomerun/userhdhomerun/CMakeLists.txt
Find the "SET" and simple remove that line. Rebuild the userhdhomerun and lets see what happens.
Perhaps have a look at what CPU usage you see before/after for userhdhomerun.
Updated by Rene Herbrich about 12 years ago
I'll have try next week.
Sorry for repeating myself, but do you have any idea, why these problems do not occur with tvheadend 3.2?
Updated by Adam Sutton about 12 years ago
Rene,
Just a thought but do you have full mux rx enabled or disabled? That is the big change from 3.2, by default we try to enable full mux RX for PCI connected devices (I've no idea how something like a HDHR which is actually Ethernet presents itself).
Enabling full mux RX (assuming it works) will greatly increase the level of traffic between the HDHR and TVH, it can also occasionally result in TVH being a bit slow on responding and cause packets to be dropped (in a normal DVB card). Is it possible some bug in the HDHR DVB wrapper or the HDHR itself causes the device to completely lock?
Having no personal experience of HDHR this is purely speculation, but its worth investigating the mux rx mode being used (its printed in the TVH debug log on startup - possibly attach a log from TVH?).
Adam
Updated by Rene Herbrich about 12 years ago
Bull's eye! Full mux rx was set to auto and according to the debug log enabled. After disabling it, I'm now able to scan and map channels without
any problem.
If someone has got a problem with tvheadend > 3.2 and a hdhomerun concerning artefacts (especially with HD channels): disable full mux rx is the solution, too.
@Villy: as far as I know you're one of the developers of dvbhdhomerun, right? Is there a chance to change the source code in a way, that tvheadend is no longer
thinking the device is capable of sending the full mux?
Updated by Villy Thomsen about 12 years ago
Just a thought but do you have full mux rx enabled or disabled? That is the big change from 3.2, by default we try to enable full mux RX for PCI connected devices (I've no idea how something like a HDHR which is actually Ethernet presents itself).
If I remember correctly the kernel part of the dvbhdhomerun driver present itself as a PCI device. I think there was only a choice between USB/PCI from the linux DVB subsystem - nobody had apparently thought about an ethernet attached tuner when the API was designed.
Enabling full mux RX (assuming it works) will greatly increase the level of traffic between the HDHR and TVH, it can also occasionally result in TVH being a bit slow on responding and cause packets to be dropped (in a normal DVB card).
Silly question, but why do you want to that from tvheadend? (To be able to capture the entire mux I presume?)
Is it possible some bug in the HDHR DVB wrapper or the HDHR itself causes the device to completely lock?
I'm thinking that the NAS in question here is simply be too slow for it - at least for a debug version of the dvbhdhomerun driver as it compiled per default.
Updated by Villy Thomsen about 12 years ago
Bull's eye! Full mux rx was set to auto and according to the debug log enabled. After disabling it, I'm now able to scan and map channels without
any problem.
When you have time, do have a go a building a none-debug version of the userhdhomerun, would be interesting to see what change that may trigger - when you run with full mux rx.
@Villy: as far as I know you're one of the developers of dvbhdhomerun, right?
Jup. The only one actually.
Is there a chance to change the source code in a way, that tvheadend is no longer
thinking the device is capable of sending the full mux?
Don't think so. Well, maybe.
Adam: what do you check for to enable full mux RX? Or is it just on as default?
Updated by Rene Herbrich about 12 years ago
I tried a channel scan with a debug disabled version of userhdhomerun, but did not make any difference. You're right saying the cpu of a nas is not the fastest, but during channel scan (full mux receive disabled, userhdhomerun with debug) my cpu load is somewhere around 30%. Most of the time it's even waiting for I/O input, so I'd say the cpu is fast enough to process the stream coming back from hdhomerun. The problem with full mux receive is, I think, the latency/bandwidth of the network. Sure, it's fast, but a pci connected card should be much faster.
Updated by Adam Sutton about 12 years ago
- Status changed from New to Rejected
This is a problem caused by inability to usr full mux rx worth hdhr, possibly because it's network connected.
Regardless its not a bug in tvh and it can be worked around by disabling full mux rx.
Adam