読者です 読者をやめる 読者になる 読者になる

mimikakimemo

自分用メモ。

Chinachu + recfsusb2n で "can't send urb: No such file or directory" になってコケる問題

前回記事で LIVA に Chinachu を入れてみたところ、LIVA の起動直後はうまく動いていたが、しばらくすると EGP 取得や録画ができなくなった。Chinachu scheduler のログ(chinachu/log/scheduler)を見てみると、EPG 取得の途中で「recfsusb2n: can't send urb: No such file or directory」というエラーが現れている。

8 Jun 19:35:20 - [4] {"type":"GR","channel":"22","n":4}
8 Jun 19:35:20 - [4] LOCK: FSUSB2 (n=0)
8 Jun 19:35:20 - [4] SPAWN: recfsusb2n -b 22 - - (pid=20909)
8 Jun 19:35:20 - [4] STREAM: /tmp/chinachu-tmp-hw67srds.m2ts
8 Jun 19:35:20 - STATUS: { completed: 6, waiting: 5, worked: 5, running: 1 }
8 Jun 19:35:20 - [4] #recfsusb2n: recfsusb2n ver. 0.9.2 ISDB-T DTV Tuner FSUSB2N device: "/dev/bus/usb/001/005"
8 Jun 19:35:20 - STATUS: { completed: 6, waiting: 4, worked: 5, running: 1 }
8 Jun 19:35:20 - [4] #recfsusb2n: pid = 20909
8 Jun 19:35:21 - [4] #recfsusb2n: B25Decoder initialized.
8 Jun 19:36:20 - [4] UNLOCK: FSUSB2 (n=0)
8 Jun 19:36:20 - [4] EXEC: epgdump (pid=20972)
8 Jun 19:36:21 - UNLINK: /tmp/chinachu-tmp-hw67srds.m2ts
8 Jun 19:36:21 - [4] CHANNEL: GR-22 ... GR_1048 (sid=1048) (programs=214) - TBS1
8 Jun 19:36:21 - [4] CHANNEL: GR-22 ... GR_1049 (sid=1049) (programs=0) - TBS2
8 Jun 19:36:21 - [4] -- (ok)
8 Jun 19:36:22 - [5] {"type":"GR","channel":"23","n":5}
8 Jun 19:36:22 - [5] LOCK: FSUSB2 (n=0)
8 Jun 19:36:22 - [5] SPAWN: recfsusb2n -b 23 - - (pid=20974)
8 Jun 19:36:22 - [5] STREAM: /tmp/chinachu-tmp-hw67u2uw.m2ts
8 Jun 19:36:22 - STATUS: { completed: 7, waiting: 4, worked: 6, running: 1 }
8 Jun 19:36:22 - [5] #recfsusb2n: recfsusb2n ver. 0.9.2 ISDB-T DTV Tuner FSUSB2N device: "/dev/bus/usb/001/005"
8 Jun 19:36:22 - STATUS: { completed: 7, waiting: 3, worked: 6, running: 1 }
8 Jun 19:36:22 - [5] #recfsusb2n: pid = 20974
8 Jun 19:36:22 - [5] #recfsusb2n: B25Decoder initialized.
8 Jun 19:36:29 - [5] #recfsusb2n: recfsusb2n: can't send urb: No such file or directory
8 Jun 19:36:34 - [5] UNLOCK: FSUSB2 (n=0)
8 Jun 19:36:34 - [5] EXEC: epgdump (pid=20996)
8 Jun 19:36:34 - UNLINK: /tmp/chinachu-tmp-hw67u2uw.m2ts
8 Jun 19:36:34 - [5] EPG: データが空 (result.tv.channel is undefined)
8 Jun 19:36:34 - [5] -- (retrying, residue=2)
8 Jun 19:36:37 - [5] {"type":"GR","channel":"23","n":5}
8 Jun 19:36:37 - [5] LOCK: FSUSB2 (n=0)
8 Jun 19:36:37 - [5] SPAWN: recfsusb2n -b 23 - - (pid=20998)
8 Jun 19:36:37 - [5] STREAM: /tmp/chinachu-tmp-hw67uefr.m2ts
8 Jun 19:36:37 - [5] #recfsusb2n: recfsusb2n ver. 0.9.2 ISDB-T DTV Tuner FSUSB2N
8 Jun 19:36:37 - [5] #recfsusb2n: device: "/dev
8 Jun 19:36:37 - [5] #recfsusb2n: /bus/usb/001/005"
8 Jun 19:36:37 - [5] #recfsusb2n: pid = 20998
8 Jun 19:36:37 - [5] #recfsusb2n: B25Decoder initialized.
8 Jun 19:36:44 - [5] #recfsusb2n: recfsusb2n: can't send urb: No such file or directory
8 Jun 19:36:49 - [5] UNLOCK: FSUSB2 (n=0)
8 Jun 19:36:49 - [5] EXEC: epgdump (pid=21014)
8 Jun 19:36:49 - UNLINK: /tmp/chinachu-tmp-hw67uefr.m2ts
8 Jun 19:36:49 - [5] EPG: データが空 (result.tv.channel is undefined)
8 Jun 19:36:49 - [5] -- (retrying, residue=1)
8 Jun 19:36:52 - [5] {"type":"GR","channel":"23","n":5}
8 Jun 19:36:52 - [5] LOCK: FSUSB2 (n=0)
8 Jun 19:36:52 - [5] SPAWN: recfsusb2n -b 23 - - (pid=21016)
8 Jun 19:36:52 - [5] STREAM: /tmp/chinachu-tmp-hw67uq28.m2ts
8 Jun 19:36:52 - [5] #recfsusb2n: recfsusb2n ver. 0.9.2 ISDB-T DTV Tuner FSUSB2N
8 Jun 19:36:52 - [5] #recfsusb2n: device: "/dev/bus/usb/001/005"
8 Jun 19:36:52 - [5] #recfsusb2n: pid = 21016
8 Jun 19:36:52 - [5] #recfsusb2n: B25Decoder initialized.
8 Jun 19:36:59 - [5] #recfsusb2n: recfsusb2n: can't send urb: No such file or directory
8 Jun 19:37:04 - [5] UNLOCK: FSUSB2 (n=0)
8 Jun 19:37:04 - [5] EXEC: epgdump (pid=21033)
8 Jun 19:37:04 - UNLINK: /tmp/chinachu-tmp-hw67uq28.m2ts
8 Jun 19:37:04 - [5] EPG: データが空 (result.tv.channel is undefined)
8 Jun 19:37:04 - [5] -- (give up)

これ以降は、EPG 取得をしても録画をしても(さらに手動で recfdusb2n を起動しても)、同じエラーが出て失敗してしまう。マシンを再起動すれば一旦は直るが、いずれにせよ scheduler を実行しているうちに同じエラーになり、動かなくなる。

Chinachu の問題なのか recfsusb2n の問題なのか、あるいは KTV-FSUSB2 の問題なのか LIVA の問題なのか、いろいろ調べても知識不足でさっぱりわからなかったが、最終的には、chinachu/app-scheduler.js の SIGKILL を SIGTERM に変更したら良さげな感じ。

diff --git a/app-scheduler.js b/app-scheduler.js
index 59d77be..38843cf 100644
--- a/app-scheduler.js
+++ b/app-scheduler.js
@@ -935,7 +935,7 @@ function getEpg() {
 
                                // プロセスタイムアウト
                                execRecCmd(function() {
-                                       recProc.kill('SIGKILL');
+                                       recProc.kill('SIGTERM');
                                }, 1000 * (config.schedulerEpgRecordTime || 60), '[' + i + '] KILLWAIT');
 
                                // キャンセル時
@@ -943,7 +943,7 @@ function getEpg() {
                                var onCancel = function () {
 
                                        isCancelled = true;
-                                       recProc.kill('SIGKILL');
+                                       recProc.kill('SIGTERM');
                                };
 
                                removeListeners = function () {

とりあえず、しばらくこれで様子を見てみたい。

KEIAN USB地デジ&ワンセグチューナー KTV-FSUSB2/V3

KEIAN USB地デジ&ワンセグチューナー KTV-FSUSB2/V3