[mythtv] mythbackend crashes with segmentation fault after the specific sequences of events.

Mudit Wahal mwahal at gmail.com
Fri Jun 17 03:52:26 UTC 2005


Isaac,

There was still a case when the script aborted during set channel
after it had changed to the live TV mode. The last message from
backend is successful tuning of the channel.
And then there is a message unable to write to client socket as its no
longer there.

But the mode is still set to liveTV and not released. Any subsequent
connection to the backend causes a -1 to be returned as a next
available recorder. The only way to fix is to restart the backend.

Seems like if the client (frontend) is no longer there, should mythtv
(backend) revert back to the state before the client(frontend)
connected ?

Thanks
Mudit
=============
2005-06-16 20:46:38.068 DVB#0 Service is FTA
2005-06-16 20:46:38.068 DVB#0 Successfully tuned to channel 20_1.
Unable to write to client socket, as it's no longer there <=========
2005-06-16 20:46:38.068 DVB#0 Adding pid 49 (0x31)
2005-06-16 20:46:38.069 DVB#0 Adding pid 52 (0x34)
2005-06-16 20:46:38.069 DVB#0 Data read from DMX - This is for
debugging with transform.c
2005-06-16 20:46:38.069 Transport Stream Continuity Error. PID = 65
2005-06-16 20:46:38.069 DVB#0 PID 65 _continuity_count 1 cc 12
2005-06-16 20:46:38.069 Transport Stream Continuity Error. PID = 68
2005-06-16 20:46:38.069 DVB#0 PID 68 _continuity_count 1 cc 14
2005-06-16 20:46:39.982 DVB#0 Found keyframe
2005-06-16 20:46:39.982 DVB#0 Found PUSI for PID 49
2005-06-16 20:46:40.051 DVB#0 Found PUSI for PID 52

----- subsequent connect requests ------
2005-06-16 20:47:11.404 read  <- 24 21      MYTH_PROTO_VERSION 17
2005-06-16 20:47:11.404 write -> 24 13      ACCEPT[]:[]17
2005-06-16 20:47:11.410 read  <- 24 23      ANN Playback mythtvbe 0
2005-06-16 20:47:11.410 MainServer::HandleAnnounce Playback
2005-06-16 20:47:11.410 adding: mythtvbe as a client (events: 0)
2005-06-16 20:47:11.410 write -> 24 2       OK
2005-06-16 20:47:11.416 read  <- 24 29      GET_NEXT_FREE_RECORDER[]:[]-1
2005-06-16 20:47:11.416 Getting next free recorder after : -1
-----------------------------------------------------


On 6/16/05, Mudit Wahal <mwahal at gmail.com> wrote:
> Isaac,
> 
> You were right. There was a piece of code which was open a new socket
> connection to the recorder.
> 
> Once I fixed that and changed the protocol version to 17, no more
> crashes :-) Now I can use it inside my application to change the
> backend to live TV mode, change channels and switch back to None.
> 
> I've bought the IOdata AVeL LinkPlayer 2 (LP2) which runs UPnP server
> on linux (wizd). The LP2 acts as a client to the server and can play
> any file on the server and browse any web page served by the server.
> The LP2 has its own firmware and the source code is not available.
> 
> The source for the linux wizd server is available. I'll modify the
> code so that whenever it plays a special filename "WatchLiveTV", the
> wizd will check if ringbuf.nuv is already present. If the ringbuf file
> is present, the wizd server will serve the ringbuf file to the LP2.
> 
> If the file is not present, then wizd server will connect to the
> backend, try to grab a recorder and then change to liveTV mode. Then
> it'll serve the ringbuf file to the player. I also need to figure out
> how to change the channel. Most of the keys are being trapped by the
> LP2 firmware and shown as INVALID. I need to press all the keys and
> see which ones are being send to the server. Then use two of them for
> channel up/down :-)
> 
> Thanks !!!
> 
> Mudit
> 
> On 6/16/05, Mudit Wahal <mwahal at gmail.com> wrote:
> > Isaac,
> >
> > Thanks. I'll take a look at the script and make sure that there should
> > be only one socket connection in it and not multiple. I picked up this
> > python script from a website and fixing it as per the frontend logs
> > I've captured.
> >
> > I'm running this script in a loop with a 3 second sleep. Is it
> > possible that the prior connections are still open and not closed in
> > last 3 seconds ?
> >
> > while (1)
> >     myscript
> >     sleep 3
> > end
> >
> > I'll let you know my findings.
> >
> > Thanks
> > Mudit
> >
> > On 6/16/05, Isaac Richards <ijr at case.edu> wrote:
> > > On Thursday 16 June 2005 09:04 pm, Mudit Wahal wrote:
> > > > Isaac,
> > > >
> > > > My script is based on debug output logged from the mythfrontend. I'm
> > > > modeling my script based on how the frontend is sending commands when
> > > > it switches to liveTV to when I stop watching live TV.
> > >
> > > You're missing the fact that the frontend is opening multiple connections with
> > > your logging.  There's 3 separate sockets in there, not 1.  This is also the
> > > cause of your newest crash - you're sending different things on different
> > > connections than what the frontend would, and the backend is assuming that it
> > > gets mostly proper input.
> > >
> > > Isaac
> > > _______________________________________________
> > > mythtv-dev mailing list
> > > mythtv-dev at mythtv.org
> > > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> > >
> >
>


More information about the mythtv-dev mailing list