Playback Error and Tuner Service hang when changing to new channel in Live TV & DVR (tuner Segmentation Violation)

I’m bumping this.
Broken for me too. PMS v1.24.5.5173

I am adding a note to the open issue with the development team

Anyone worked out with what Plex Media Server version update this issue came in?

1 Like

How can we best follow this issue? Is there a public link to the bug tracker?

One observation I have is that it seems that all of us reporting this issue are using the Hauppauge WinTV-dualHD DVR Tuner, is that correct? If so that might help the devs track it down.

1 Like

That’s the tuner I’m using and I have this issue.

Hi All.
Seem to be getting this issue as well. Not sure which version of Plex this started with but happy to provide logs etc. Running Ubuntu 20.04 with latest security updates, pretty much a clean install of Ubuntu and Plex (only installed last week).

Same symptoms, segmentation fault in logs. Also running with a WinTV-DualHD tuner. Not 100% sure what’s triggering it but always seems to happen when watching or recording TV.

Thanks
Louis

1 Like

@sa2000 , any progress with this? I continue to update to the newest public PMS release, and continue to have this issue periodically. I am the original poster of this thread, back in August 2021.

It is one of 4 DVR related issues that I have discussed with the development team recently and we have agreed that they are the priority ones to tackle next.

Could speed matters up if we establish which version of Plex Media Server brought this regression.

1 Like

I have an AVerTV Volar Hybrid Q tuner, and I am having the exact same problem

Server Version#: 1.25.2.5319
Player Version#: Plex Web Player and Android app
OS: Open Media Vault (Debian 10 base); kernel 5.10.0
DVR Tuner: Hauppauge WinTV-dualHD (EU firmware)

After time LiveTV viewing(hours):

[13257.871784] si2168 11-0064: firmware: direct-loading firmware dvb-demod-si2168-d60-01.fw
[13257.871790] si2168 11-0064: downloading firmware from file 'dvb-demod-si2168-d60-01.fw'
[13258.197992] si2168 11-0064: firmware version: D 6.0.13
[13258.201581] si2157 14-0060: found a 'Silicon Labs Si2157-A30'
[13258.223616] si2157 14-0060: firmware version: 3.0.5
[15194.763086] Plex Tuner Serv[5505]: segfault at 17 ip 00007f6587b18e3a sp 00007f6585a19fa0 error 4 in Plex Tuner Service[7f6587aec000+129000]
[15194.763100] Code: 7d d0 e8 49 aa 0f 00 80 3d a1 35 12 00 00 48 8d 35 83 35 12 00 79 07 48 8b 35 7a 35 12 00 48 8b 85 30 ff ff ff 4a 8b 54 20 28 <80> 7a 17 00 79 03 48 8b 12 48 8b 7d d0 e8 14 aa 0f 00 48 8b 85 90

A plexmediaserver service restart was needed to restore functionality

PlexTuner log extract from around that error:

Dec 21, 2021 22:33:16.155 [0x7f6585814b38] WARN - [E] http_streamer_t::handle_read: read_error: End of file (2)
Dec 21, 2021 22:33:16.156 [0x7f6585a1ab38] INFO - [I] dvb_device_factory_t::get_device_list. Id dvb#v4l#0#/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0:0, Name dualHD, Standards 3
Dec 21, 2021 22:33:16.156 [0x7f6585a1ab38] INFO - [I] dvb_device_factory_t::get_device_list. Id dvb#v4l#0#/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0:1, Name dualHD, Standards 3
Dec 21, 2021 22:33:16.159 [0x7f6585d25b38] WARN - [E] http_streamer_t: http write error
Dec 21, 2021 22:33:16.159 [0x7f6584c49b38] INFO - [I] http_streamer_t::send_thread_func: removing http client
Dec 21, 2021 22:33:16.165 [0x7f6585a1ab38] INFO - [I] device_manager_t::get_device_list. Device dualHD, id dvb#v4l#0#/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0:0, tuners 1, state 2, standards 3
Dec 21, 2021 22:33:16.165 [0x7f6585a1ab38] INFO - [I] device_manager_t::get_device_list. Device dualHD, id dvb#v4l#0#/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0:1, tuners 1, state 5, standards 3
Dec 21, 2021 22:33:16.167 [0x7f6584c49b38] INFO - [I] http_streamer_t::send_thread_func: all clients are deleted. Setting exit flag
Dec 21, 2021 22:33:16.176 [0x7f658442ab38] INFO - [I] streamer_container_t::control_thread. Removed disconnected streamer <many numbers edited out>
Dec 21, 2021 22:33:16.177 [0x7f658442ab38] INFO - [I] streamer_container_t::delete_streamer. Last streamer was deleted. Stop program streamer
Dec 21, 2021 22:33:16.177 [0x7f658442ab38] INFO - [I] dvb_program_streamer_t::stop. Stoping program streamer for channel triplet://1:233:241
Dec 21, 2021 22:33:16.177 [0x7f658442ab38] INFO - [I] transponder_streamer::stop_channel. Stop request for channel triplet://1:233:241
Dec 21, 2021 22:33:16.181 [0x7f6584618b38] INFO - [I] CTVSStreamSource::RemoveAllPids. Removing PIDs for client triplet://1:233:241
Dec 21, 2021 22:33:16.181 [0x7f658442ab38] INFO - [I] transponder_streamer::start_idle_timer
Dec 21, 2021 22:33:16.181 [0x7f6585a1ab38] ERROR - Error. Received SIGSEGV: Segmentation Violation.

~10 seconds later it tried to restart, and hanged there:

Dec 21, 2021 22:33:35.820 [0x7f803655fb38] INFO - Plex Tuner Service v1.0.0.0 - Debian GNU/Linux PC x86_64 - build:
Dec 21, 2021 22:33:35.820 [0x7f803655fb38] INFO - Linux version: 5.10.0-0.bpo.9-amd64 (#1 SMP Debian 5.10.70-1~bpo10+1 (2021-10-10)), language: en-US
Dec 21, 2021 22:33:35.820 [0x7f803655fb38] INFO - Processor        Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
Dec 21, 2021 22:33:35.820 [0x7f803655fb38] INFO - /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.25.2.5319-c43dc0277 32600
Dec 21, 2021 22:33:35.817 [0x7f8038008848] INFO - [I] broker_t::start...
Dec 21, 2021 22:33:35.832 [0x7f8038008848] INFO - [I] device_manager_t::init.
Dec 21, 2021 22:33:35.832 [0x7f8038008848] INFO - [I] device_manager_t::init. Initialize provider manager
Dec 21, 2021 22:33:35.832 [0x7f8038008848] INFO - [I] device_manager_t::init. Initialize all device auxes
Dec 21, 2021 22:33:35.832 [0x7f8038008848] INFO - [I] dvb_device_factory_t::get_aux_list
Dec 21, 2021 22:33:35.832 [0x7f8038008848] INFO - [I] tvbutler_aux_t::init
Dec 21, 2021 22:33:35.834 [0x7f8038008848] INFO - [I] web_server_t::start. Starting web server on port 32600
Dec 21, 2021 22:33:35.835 [0x7f8038008848] WARN - [E] web_server_t: bind: Address in use
Dec 21, 2021 22:33:35.835 [0x7f8038008848] WARN - [E] web_server_t: port 32600 is not available
Dec 21, 2021 22:42:46.224 [0x7f8038008848] INFO - Received SIGTERM: Software termination signal.

at timestamp 22:42:46 the plexmediaserver service was restarted

Getting the exact same issue with my Hauppage PCTV 292e. I have two of these, something interesting I have noticed is that if I scan for channels on the second I can switch channels endlessly without issues on the first one.

I’m using a keep-alive script for my linux box, from another user at Could not tune channel. Please check your tuner or antenna - #244 by prwilliams1982

Only thing to keep in mind is the full command line needs extracting for each plex version, my line now reeds:
/usr/lib/plexmediaserver/Plex\ Tuner\ Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.25.2.5319-c43dc02277 32600 &

and the 1.25.2.5319-c43dc02277 bit is a variable. To get it i did:

pidof "Plex Tuner Service"

note the number, let’s say 1234, then:
ps -p 1234 -o command

note the last bit of the command, should be the full server version and 10-ish characters. There are 10 chars after the version, if you see less then you may need a wider/longer ssh window if you access the server through putty or such. You will need to do this at every server version update, until the issue is fixed…

Then, you also need net-tools package, on debian the command is:
apt-get install net-tools

I saved the script in /scripts and I called it antifreeze.sh
Needed to make it executable with chmod +x /scripts/antifreeze.sh

Then the script is ran with with a fork to background for continued operation (until the next reboot) (also, fork is simply adding & after the command to run the script, like: bash /scripts/antifreeze.sh & . Now if segfault happens, and the script is running, after 30-50 seconds or so the tuner can then be again accessed. Handy for then you are away and cannot restart the plexmediaserver

3 Likes

hi @sa2000

I’m unable to confirm what version this was introduced, but I can tell you it has been happening since I started using the LiveTV feature of Plex back in July 2020. I soon stopped using Plex as my means to watch live TV because of it, returning over a year later to discover it’s still an issue.

I’ve been persevering with using Plex for LiveTV by restarting Plex regularly via a cron job, going to switch to @TheGeorge2’s keepalive script now.

Is there anything I can do to help expedite the fix? Happy to help debug/test. It’s been dragging on for quite a while now.

Wow – This is crasy, issue from last year that i’m experiencing as well! I literally just started using Plex LiveTV on my RHEL7 box and am getting the same segfault errors you’re seeing! Why can Plex not take a look at this further? There MUST be something wrong with the way Plex is handling this on linux…

So, I took a stab at the script and it is a bit more robust now in that it can grab the variable on its own using rpm (I run rhel, you can alter this with your version of package installer) and it has a logging mechanism to log to a file which i’ve setup on logrotate.d as well. I changed it to run every 30 seconds instead of 5.

Here it is!

#!/bin/bash
VERSION=$(rpm -q plexmediaserver | cut -c 17- | head -c -8)

exec &> >(while read line; do echo "$(date +'%h %d %H:%M:%S') $line" >> /var/log/plex_keep_alive.log; done;)

while [ 1 = 1 ]
do
        PID=$(pidof "Plex Tuner Service")

        if [ -z "$PID" ]
        then
              echo "Not Running - Starting Up"
              /usr/lib/plexmediaserver/Plex\ Tuner\ Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmedia
server/Resources/Tuner/Shared $VERSION &
              echo "Started - Sleeping for 30 seconds"
        else
              echo "Running - Checking if Listening"

              LISTENING=$(netstat -tnlp 2>/dev/null| grep :32600)

              if [ -z "$LISTENING" ]
                then
                        echo "Not Listening - Killing Process"
                        killall -9 "Plex Tuner Service"

                else
                        echo "All Good - Sleeping for 30 seconds"
                fi
        fi

sleep 30
done
1 Like

Seeing the same issue here, on latest version of plex docker (1.25.5.5492) and WinTV DualHD USB tuner.

It is expected that Plex Media Server version 1.25.8 will have a fix for the port in use in issue for Plex Tuner Service - this should reduce the impact of the problem.

1 Like

Is there any indication that this will also correct the issue of casting Live TV & DVR to a Chromecast or similar?

That is unrelated

Do you know if that issue is being addressed? There are multiple threads on the issue but I haven’t seen anyone from Plex comment. It’s been ongoing for over 4 months.

I will have an alpha build shortly of Plex Media Server 1.25.8 which addresses the issue of the tcp port not being released after a failure of the Plex Tuner Service process. This should reduce the impact of the problem - anyone wants to try this alpha build - please let know what the platform is / binary file required - I don’t think I will be able to offer an alpha build for docker or Nvidia Shield

2 Likes