Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9866 closed Bug Report - General (Invalid)

Watch Live TV attempting to use tuner device already in use recording a show

Reported by: brad@… Owned by:
Priority: critical Milestone: unknown
Component: MythTV - General Version: 0.24-fixes
Severity: high Keywords: live recording device hangs
Cc: Ticket locked: no

Description

I have 2 HD tuners and one analog device with 2 inputs (coax & composite). The analog coax input was recording a scheduled show. Chose to watch Live TV in the frontend and instead of it falling back to the first available device (in this case, one of the HD tuner inputs) it tried to use the analog tuner, which temporarily interrupted the in-progress recording. When it couldn't, as the device was busy, the frontend got lost and hung, forcing me to manually kill it.

This feature had always worked in prior versions. I'm now running 0.24.1-20-fixes. The frontend log shows this repeated:

2011-06-24 07:56:51.070 RemoteEncoder::Setup(): Failed to connect to backend 2011-06-24 07:56:51.070 RemoteEncoder::SendReceiveStringList?(): Failed to reconnect with backend. 2011-06-24 07:56:51.318 TV: Attempting to change from None to None 2011-06-24 07:56:51.318 MythCoreContext?: Connecting to backend server: 192.168.7.210:6543 (try 1 of 1) 2011-06-24 07:56:51.318 Connection to master server timed out.

Either the server is down or the master server settings in mythtv-settings does not contain the proper IP address

The backend log shows this, also repeated while the frontend is trying:

2011-06-24 07:40:51.019 MythSocket?(9cfa790:46): writeStringList: Error, No data written on writeBlock (940 errors) 2011-06-24 07:41:01.022 MythSocket?(9cfa790:46): writeStringList: Error, No data written on writeBlock (940 errors) 2011-06-24 07:41:11.025 MythSocket?(9cfa790:46): writeStringList: Error, No data written on writeBlock (939 errors) 2011-06-24 07:41:14.650 MainServer::ANN Playback 2011-06-24 07:41:14.740 adding: mythbox as a client (events: 0) 2011-06-24 07:41:14.777 TVRec(4): Changing from None to WatchingLiveTV 2011-06-24 07:41:14.850 TVRec(4): HW Tuner: 4->4 2011-06-24 07:41:14.884 LoadFromScheduler?(): Error, called from backend. 2011-06-24 07:41:14.888 AutoExpire?: CalcParams?(): Max required Free Space: 3.0 GB w/freq: 15 min 2011-06-24 07:41:16.022 MythSocket?(9cfa790:46): writeStringList: Error, No data written on writeBlock (938 errors) 2011-06-24 07:41:16.891 Finished recording Unknown: channel 9999 2011-06-24 07:41:16.932 scheduler: Finished recording: Unknown: channel 9999 2011-06-24 07:41:16.976 LoadFromScheduler?(): Error, called from backend. 2011-06-24 07:41:17.066 MythSocket?(9cfa790:46): writeStringList: Error, No data written on writeBlock (935 errors) 2011-06-24 07:41:17.514 Finished recording Unknown: channel 9999 2011-06-24 07:41:17.643 DevRdB(/dev/video2) Error: Problem reading fd(55)

eno: Device or resource busy (16)

2011-06-24 07:41:17.672 DevRdB(/dev/video2) Error: Problem reading fd(55)

eno: Device or resource busy (16)

2011-06-24 07:41:17.706 DevRdB(/dev/video2) Error: Problem reading fd(55)

eno: Device or resource busy (16)

2011-06-24 07:41:17.739 DevRdB(/dev/video2) Error: Problem reading fd(55)

eno: Device or resource busy (16)

2011-06-24 07:41:17.772 DevRdB(/dev/video2) Error: Problem reading fd(55)

eno: Device or resource busy (16)

2011-06-24 07:41:17.814 DevRdB(/dev/video2) Error: Problem reading fd(55)

eno: Device or resource busy (16)

2011-06-24 07:41:17.876 MPEGRec(/dev/video2) Error: Device error detected 2011-06-24 07:41:17.905 DevRdB(/dev/video2): Stop(): Not running.

Change History (6)

comment:1 Changed 8 years ago by robertm

Status: newinfoneeded_new

Have you properly configured the two analog inputs to be in the same, non-default input group?

comment:2 Changed 8 years ago by brad@…

I guess not. This used to work without this. Did this requirement change in 0.24? For validation, here are the table values in mysql:

mysql> select * from cardinput; +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ | cardinputid | cardid | sourceid | inputname | externalcommand | tunechan | startchan | displayname | dishnet_eit | recpriority | quicktune | +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ | 1 | 1 | 3 | MPEG2TS | NULL | NULL | 704 | HD QAM 1 | 0 | 0 | 2 | | 2 | 2 | 3 | MPEG2TS | NULL | NULL | 11.2 | HD QAM 2 | 0 | 0 | 2 | | 4 | 3 | 1 | television | NULL | NULL | 33 | Analog Cable | 0 | 0 | 0 | | 3 | 4 | 4 | composite | /bin/true | NULL | 999 | Aux | 0 | 0 | 0 | +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ 4 rows in set (0.00 sec)

mysql> select * from inputgroup; Empty set (0.00 sec)

Please advise on how I do this, and if it is really not a bug, I apologize for creating a ticket.

comment:3 Changed 8 years ago by robertm

Resolution: Invalid
Status: infoneeded_newclosed

Brad,

Input groups are covered in the following section of the manual:

http://www.mythtv.org/docs/mythtv-HOWTO-12.html

This has always been required, it's possible you just "set it and forgot it," though.

If you need any further assistance, please seek help on the users list and we can give you greater detail. In short, though, create an input group with a unique name, and assign both inputs to the same one (not "default").

comment:4 Changed 8 years ago by brad@…

I have been running MythTV since 0.20 and have never set up an input group beyond Default and it has always just worked even using multiple inputs on the same PVR-150 card, until upgrading to 0.24.

I had read the link provided but re-read it again now to make sure I didn't miss something. On the contrary, it seems to confirm my bug report.

Under the http://www.mythtv.org/docs/mythtv-HOWTO.html#toc12.6 section:

"Inputs 2 and 3 are automatically mutually exclusive because they are on the same card so there is no need to create an Input Group for these inputs."

comment:5 Changed 8 years ago by brad@…

Maybe there is a problem here in my database? There are 2 /dev/video2 cards; one for each input to use. Is this how it should be or did something go awry?

mysql> select * from cardinput; +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ | cardinputid | cardid | sourceid | inputname | externalcommand | tunechan | startchan | displayname | dishnet_eit | recpriority | quicktune | +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ | 1 | 1 | 3 | MPEG2TS | NULL | NULL | 704 | HD QAM 1 | 0 | 0 | 2 | | 2 | 2 | 3 | MPEG2TS | NULL | NULL | 11.2 | HD QAM 2 | 0 | 0 | 2 | | 4 | 3 | 1 | television | NULL | NULL | 33 | Analog Cable | 0 | 0 | 0 | | 3 | 4 | 4 | composite | /bin/true | NULL | 999 | Aux | 0 | 0 | 0 | +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ 4 rows in set (0.00 sec)

mysql> select * from capturecard; +--------+-------------+--------------+-----------+-----------+--------------+----------------+----------+--------------+--------------+-----------------------+-------------+---------------+-----------------+----------------+----------------+---------------------+----------------+-----------------+------------------+----------+------------+--------+-----+----------+-------------+ | cardid | videodevice | audiodevice | vbidevice | cardtype | defaultinput | audioratelimit | hostname | dvb_swfilter | dvb_sat_type | dvb_wait_for_seqstart | skipbtaudio | dvb_on_demand | dvb_diseqc_type | firewire_speed | firewire_model | firewire_connection | signal_timeout | channel_timeout | dvb_tuning_delay | contrast | brightness | colour | hue | diseqcid | dvb_eitscan | +--------+-------------+--------------+-----------+-----------+--------------+----------------+----------+--------------+--------------+-----------------------+-------------+---------------+-----------------+----------------+----------------+---------------------+----------------+-----------------+------------------+----------+------------+--------+-----+----------+-------------+ | 1 | 1017F365-0 | NULL | NULL | HDHOMERUN | MPEG2TS | NULL | mythbox | 0 | 0 | 1 | 0 | 0 | NULL | 0 | NULL | 0 | 1000 | 3000 | 0 | 0 | 0 | 0 | 0 | NULL | 1 | | 2 | 1017F365-1 | NULL | NULL | HDHOMERUN | MPEG2TS | NULL | mythbox | 0 | 0 | 1 | 0 | 0 | NULL | 0 | NULL | 0 | 1000 | 3000 | 0 | 0 | 0 | 0 | 0 | NULL | 1 | | 3 | /dev/video2 | ALSA:default | NULL | MPEG | television | 0 | mythbox | 0 | 0 | 1 | 0 | 0 | NULL | 0 | NULL | 0 | 1000 | 3000 | 0 | 0 | 0 | 0 | 0 | NULL | 1 | | 4 | /dev/video2 | ALSA:default | NULL | MPEG | composite | 0 | mythbox | 0 | 0 | 1 | 0 | 0 | NULL | 0 | NULL | 0 | 1000 | 3000 | 0 | 0 | 0 | 0 | 0 | NULL | 1 | +--------+-------------+--------------+-----------+-----------+--------------+----------------+----------+--------------+--------------+-----------------------+-------------+---------------+-----------------+----------------+----------------+---------------------+----------------+-----------------+------------------+----------+------------+--------+-----+----------+-------------+ 4 rows in set (0.00 sec)

comment:6 Changed 8 years ago by brad@…

Okay, I added an input group as suggested and added both inputs to it. This did resolve my issue. Thanks for the tip, and maybe the documentation needs revisiting as the fact that both inputs were on one capture card did not automatically make them exclusive?

The new affected tables:

mysql> select * from cardinput; +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ | cardinputid | cardid | sourceid | inputname | externalcommand | tunechan | startchan | displayname | dishnet_eit | recpriority | quicktune | +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ | 1 | 1 | 3 | MPEG2TS | NULL | NULL | 704 | HD QAM 1 | 0 | 0 | 2 | | 2 | 2 | 3 | MPEG2TS | NULL | NULL | 715 | HD QAM 2 | 0 | 0 | 2 | | 4 | 3 | 1 | television | NULL | NULL | 51 | Analog Cable | 0 | 0 | 0 | | 3 | 4 | 4 | composite | /bin/true | NULL | 999 | Aux | 0 | 0 | 0 | +-------------+--------+----------+------------+-----------------+----------+-----------+--------------+-------------+-------------+-----------+ 4 rows in set (0.00 sec)

mysql> select * from inputgroup; +-------------+--------------+----------------+ | cardinputid | inputgroupid | inputgroupname | +-------------+--------------+----------------+ | 3 | 1 | Analog | | 4 | 1 | Analog | +-------------+--------------+----------------+ 2 rows in set (0.00 sec)

Note: See TracTickets for help on using tickets.