Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12558 closed Bug Report - General (Upstream Bug)

Ceton RTP Packets Cutoff

Reported by: bmlong137@… Owned by: JYA
Priority: major Milestone: unknown
Component: MythTV - Recording Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I am having an issue that appeared to have been introduced by upgrading from Ubuntu 15.04 to 15.10. I went back to the kernel used in 15.04 and the issue persists. In 15.04 and 15.10, I used the 0.28_fixes repository, the MythTV version was very similar (maybe a week gap).

In the mythbackend.log with verbose "record" set, I get the following after a random amount of time recording. Sometimes it happens in 2 minutes, sometimes 8-9 minutes, and other times 50 minutes. Sometimes it records the show in full (60 minutes), although rare. If two are recording at the same time, both streams do NOT stop at the same time.

There is a keep alive output every so often. As you can see in the log, it stopped recording after just 2 minutes. 58 minutes later it ends the recording and figures out that only 2 minutes were recorded. It then deems it a failure. I have NEVER had this happen with the Ceton InfiniTV 4 recorder until the upgrade. Now I can't stop it or even find the root cause. There is nothing in the syslog/dmesg that happens at that moment in time.

One other change I made beside the upgrade was a reconfiguration of disks. At first, I tried raid1 btrfs. Thinking it might be the issue, I tried raid1 mdadm/ext4. No change in results.

I saw that 15.10 was relentless in using ipv6. So I disabled that too. Still not change in results. I did notice the network adapter changed from ctn0 to enp1s0.

Attachments (1)

mythbackend-truncated.log (60.9 KB) - added by bmlong137@… 4 years ago.

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by bmlong137@…

Attachment: mythbackend-truncated.log added

comment:1 Changed 4 years ago by Nicolas Riendeau

Status: newinfoneeded_new

Hi!

There is no such thing as 0.28_fixes, do you mean master or fixes/0.27?

Thank you!

Nicolas

comment:2 Changed 4 years ago by bmlong137@…

It is master 0.28. I always get mixed up on the naming conventions.

http://www.ubuntuupdates.org/ppa/mythtv_0.28?dist=wily

I sense that this might be outside of control of MythTV. However, I would like to document the situation and see if there are any hints as to what is happening. I am willing to produce a fix on my end if no one else can reproduce it. I just need to know how these timer events are triggered...

comment:3 Changed 4 years ago by Nicolas Riendeau

Status: infoneeded_newnew

Thank you for reporting back!

Nicolas

comment:4 Changed 4 years ago by bmlong137@…

I enabled full debug today after it happened again (in about 8 minutes). After enabling, I tried recording again. The recording stopped after about 16:38 this time. Nothing special shows in the all:debug output. It abruptly stops outputting anything related to the recorder. Below are the last several lines that are output.

I am thinking this has something to do with a dependent library that was introduced in Ubuntu 15.10. I still have the problem with kernel 3.19, which worked before in Ubuntu 15.04. I am also using a very similar MythTV (master), although the version probably differed by 1 or 2 weeks.

Could a network device be falling asleep now?

Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 20116 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 20304 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler recorders/iptvstreamhandler.cpp:506 (timerEvent) Processing RTP packet(seq:37748 ts:2422145280)
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 20492 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 20680 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 20868 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 21056 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 21244 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 21432 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 21620 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler recorders/iptvstreamhandler.cpp:506 (timerEvent) Processing RTP packet(seq:37749 ts:2422145280)
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 21808 cnt 1
Dec 14 21:08:31 localhost mythbackend: mythbackend[5551]: D CetonStreamHandler threadedfilewriter.cpp:303 (Write) TFW(/mnt/largedisk/mythtv/recordings/9570_20151215015152.ts:72): Write(*,  188) total 21996 cnt 1

Interesting that "ip link show" displays the state as UNKNOWN.

mythclient@mythserver:/var/log/mythtv$ ip link show enp1s0
5: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 88:01:14:1c:11:f0 brd ff:ff:ff:ff:ff:ff

comment:5 Changed 4 years ago by bmlong137@…

Another note. When a recording stops, mythtv thinks it is still recording and the Ceton tuner web interface is still tuned to the proper channel.

When I delete or stop the seemingly active recording, the tuner resets to program "0" like all inactive tuners.

So doesn't this mean the tuner should still be sending packets and maybe the kernel or mythtv stopped listening?

comment:6 Changed 4 years ago by bmlong137@…

If I tune to a channel using the web interface and do the following, it never seems to cut out:

cat /dev/ctn91xx_mpeg0_0 > test.ts

I assume that this device is just a handle that uses the network streaming API. If that is true, then the issue must be application related. I will have to figure out what is firing the timer events and why it is stopping.

comment:7 Changed 4 years ago by bmlong137@…

I checked out "master" and went back to commit 7292e21. I then added some debug logging statements, did some builds, and replaced the libmythtv.so file in my working system. Rinse and repeat. I found the following:

IPTVStreamHandlerReadHelper::ReadPending?() is eventually not getting called, which prevents IPTVStreamHandlerWriteHelper::timerEvent() from reading any packets. The timer events are still being fired though, so my initial thought was invalid.

ReadPending?() is continuously called and eventually it just stops. It looks like this all hinges on QUdpSocket in QT5, which could be the big difference between Ubuntu 15.04 and 15.10. That is a switch from QT 5.4.1 to 5.4.2.

The MThread::exec() never returns when this happens. So it is still acting like things are ok...just ReadPending?() is never being called anymore.

comment:8 Changed 4 years ago by bmlong137@…

HA!

Root cause: https://bugreports.qt.io/browse/QTBUG-46552

I will try to verify.

comment:9 Changed 4 years ago by bmlong137@…

An upgrade from Qt 5.4.2 to 5.5.1 solved the problem. According to the bug, you could also downgrade to 5.4.1.

This will impact anyone using an IPTV recorder in Ubuntu 15.10.

Please close as "not a bug".

comment:10 in reply to:  9 Changed 4 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Replying to bmlong137@…:

Please close as "not a bug".

Actually, should probably be closed as "upstream bug".

comment:11 Changed 4 years ago by Stuart Auchterlonie

Resolution: Upstream Bug
Status: newclosed

Qt5 bug

comment:12 Changed 4 years ago by Peter Bennett <pgbennett@…>

FYI - a method for installing qt 5.5.1 on wily is as follows. This solves the problem:

Add PPA canonical-qt5-edgers/backup-qt551 (https://launchpad.net/~canonical-qt5-edgers/+archive/ubuntu/backup-qt551). to your system. Install package qt5-default from there.

Note: See TracTickets for help on using tickets.