Ubuntu 18.04.2 LTS - Plex Server Crashes - Double free or corruption (!prev)

Thanks to everyone for the help in getting logs that i can match to uploaded crash reports. We have not yet been able to reproduce these crashes in a debug development environment

I have been asked to see if any of you would be able to get a core dump of the crash - preferably on the latest beta. I understand would need to enable core dumps on the system? There is some generic info here: https://linux-audit.com/understand-and-configure-core-dumps-work-on-linux/amp/

Linking another forum topic for same issue - i am leaving it separate for now

I’ve enabled the apport service on my system and I believe I’m on the latest beta release. If not I’m only a revision behind at most. I think I only need to grab the files from /var/crash after a crash has occurred now that the service is running but I just started using Linux about 5-6 months ago so if there is something else that needs to be done please let me know.

Edit: I believe I’m on 1.15.2.793-782228f99

I have enabled core dumps to /var/crash and tested it works correctly. Currently waiting for the PMS to crash again. I’m currently running version 1.15.2.793.

Do I need to do anything other than just enable the apport service?

@g4m3r7ag Have crashes stopped? Last i can see uploaded was for 16 March 09:51 am GMT
and for @kburk1 05:29am GMT for 16 March

No crashes here since I updated to 1.15.2.793.

may be they are less frequent.
The last crashes from @g4m3r7ag that I saw were on 1.15.2.793 on 16 March

Yea my crash on 03/15 and 03/16 were both on 1.15.2.793 I believe. That was the first time it had happened two days in a row. I feel like some specific cause may be in play and maybe that just hasn’t occurred in a couple days. Something along the lines of a specific type of transcode or something and maybe that user hasn’t watched anything in a couple days I’m not sure, I do know there has been times where it went 3-5 days without a crash though. We’re on day 3 so hopefully there will be one soon.

Hey guys,
I just started having this issue. Exactly as described above. Server stops responding, but systemctl still thinks its running:

rhys@odin:~$ sudo systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
   Active: deactivating (stop-sigterm) since Wed 2019-03-20 13:48:20 EDT; 29s ago
  Process: 19439 ExecStart=/bin/sh -c  PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )"  PLEX_MEDIA_SERVER_INFO_DEVI
 Main PID: 19439 (code=killed, signal=TERM)
    Tasks: 117 (limit: 4915)
   CGroup: /system.slice/plexmediaserver.service
           ├─ 2404 Plex EAE Service
           ├─19453 /usr/lib/plexmediaserver/Plex Media Server
           ├─19490 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-782228f99/Framework.bundle/Contents/Resources/Versions/2/Python/boots
           └─19548 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.15.2

Mar 20 11:06:57 odin sh[19439]: Got nothing for: New Station, New Ships
Mar 20 11:06:57 odin sh[19439]: Got nothing for: Quark's Story
Mar 20 11:31:08 odin sh[19439]: Got nothing for: Alien Artifacts Season OneConnection to 172.104.211.219 closed by remote host.
Mar 20 11:48:39 odin sh[19439]: Connection to 45.79.168.253 closed by remote host.
Mar 20 11:57:57 odin sh[19439]: Connection to 45.79.168.253 closed by remote host.
Mar 20 12:15:03 odin sh[19439]: Connection to 45.79.168.253 closed by remote host.
Mar 20 12:35:16 odin sh[19439]: Connection to 97.107.133.152 closed by remote host.
Mar 20 12:47:35 odin sh[19439]: Connection to 45.79.168.253 closed by remote host.
Mar 20 13:04:27 odin sh[19439]: double free or corruption (!prev)
Mar 20 13:04:27 odin sh[19439]: ****** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Crash R

Logs attached. Seen it a couple of times.
Plex Version: 1.15.2.793
Ubuntu Server 18.04.2 LTS - No VM etc.Plex Media Server Logs_2019-03-20_13-52-22.zip (3.0 MB)

Unfortunately my whole server had a CPU panic this morning. First time that has happened so my PMS service has had a restart now before crashing again.

@sa2000 My server just crashed. Here are the crash dump and logs. I’ll try to get the core dumps enabled for next time.

Plex Media Server Logs_2019-03-20_18-54-58.zip (4.3 MB)
1.15.2.793-782228f99.zip (146.0 KB)

Thanks - yes similar. Server continued to run crippled after the crash until it deadlocked.

If you could also look into getting core dump that would be good

Thanks - the crashes are following memory corruption. Will wait for core dumps and of course the devs are running systems hoping to get the same crashes in the debug environment - still waiting for a crash

My server crashed again today before I was able to get the core dumps set up. I have made the changes and tested to be sure I will be able to capture the core dump for the next crash. Thanks for the guide you posted earlier.

Thank you - please get logs with debug logging enabled + the core dumps

I have enabled core dumps and verbose logging enabled. I’m just waiting for a crash like everyone else.

I am getting these crashes as well, ever since upgrading to the latest version ( 1.14 version was fine, I’ve been having these issues since 1.15 release, reverting to 1.14 fixes it ). They are occurring during a media scan. I am using NFS and have a very large library. I have also tried repairing the plex database by recreating it but this did not resolve the crashing issue.

AMD Ryzen Threadripper 1950X 16-Core Processor
NVIDIA Quadro P2000
24GB of ram
112TB storage ~60k media files
Ubuntu 18.04.2 LTS

[Wed Mar 20 09:39:53 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Wed Mar 20 09:39:53 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Wed Mar 20 22:19:48 2019] Plex Media Serv[122425]: segfault at 35 ip 00007f8f663a6e20 sp 00007f8f5effc1b8 error 4 in libc-2.27.so[7f8f66238000+1e7000]
[Wed Mar 20 22:23:40 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Wed Mar 20 22:23:40 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Wed Mar 20 22:24:21 2019] Plex Media Serv[47305]: segfault at 3 ip 00007fa2ffd7b500 sp 00007fa2fcfad1b8 error 4 in libc-2.27.so[7fa2ffc0d000+1e7000]
[Wed Mar 20 22:25:55 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Wed Mar 20 22:25:55 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Wed Mar 20 22:26:10 2019] Plex Media Serv[47895]: segfault at 22 ip 00007fee71e4d500 sp 00007fee63ffe1b8 error 4 in libc-2.27.so[7fee71cdf000+1e7000]
[Wed Mar 20 22:27:23 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Wed Mar 20 22:27:23 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Wed Mar 20 22:27:49 2019] Plex Media Serv[48473]: segfault at 28 ip 00007f20f051ff13 sp 00007f2059ffa8b0 error 4 in libssl.so.1.0.0[7f20f04dd000+62000]
[Wed Mar 20 22:27:49 2019] Plex Media Serv[48390]: segfault at 30 ip 00007f20f051de00 sp 00007f20e9f93838 error 4 in libssl.so.1.0.0[7f20f04dd000+62000]
[Wed Mar 20 22:30:57 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Wed Mar 20 22:30:57 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Thu Mar 21 02:17:53 2019] Plex Media Scan[61394]: segfault at 300000010 ip 00007f7d8d212097 sp 00007f7d7dd2b190 error 4 in libcrypto.so.1.0.0[7f7d8d101000+204000]
[Thu Mar 21 10:53:01 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Thu Mar 21 10:53:01 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Thu Mar 21 11:22:07 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Thu Mar 21 11:22:07 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Fri Mar 22 02:12:56 2019] Plex Media Scan[126713]: segfault at d1 ip 00007ff068388097 sp 00007ff058e8e0a0 error 4 in libcrypto.so.1.0.0[7ff068277000+204000]
[Fri Mar 22 02:29:53 2019] Plex Media Scan[129771]: segfault at 300000010 ip 00007f53adad0097 sp 00007f539e5f10a0 error 4 in libcrypto.so.1.0.0[7f53ad9bf000+204000]
[Fri Mar 22 10:36:27 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Fri Mar 22 10:36:27 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs
[Fri Mar 22 10:37:15 2019] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[Fri Mar 22 10:37:15 2019] caller os_map_kernel_space.part.7+0xda/0x120 [nvidia] mapping multiple BARs

Mar 22 05:12:40 media.abe.cx sh[79973]: Connection to 104.237.141.231 closed by remote host.
Mar 22 06:46:15 media.abe.cx sh[79973]: Connection to 104.237.138.32 closed by remote host.
Mar 22 06:54:57 media.abe.cx sh[79973]: Connection to 72.14.186.199 closed by remote host.
Mar 22 07:36:38 media.abe.cx sh[79973]: Connection to 72.14.186.199 closed by remote host.
Mar 22 07:56:30 media.abe.cx sh[79973]: Connection to 45.56.124.90 closed by remote host.
Mar 22 08:04:26 media.abe.cx sh[79973]: Connection to 45.56.124.90 closed by remote host.
Mar 22 08:52:43 media.abe.cx sh[79973]: Connection to 139.162.158.15 closed by remote host.
Mar 22 09:01:04 media.abe.cx sh[79973]: double free or corruption (!prev)
Mar 22 09:01:05 media.abe.cx sh[79973]: ****** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Crash Reports/1.15.2.793-782228f99/PLEX MEDIA```

I can see crash reports that are for the same issue that were for crashes at 09:01:05 am 22 March and 3 between 22:19 and 22:26 on 20th march.

As you can see from the earlier posts we are waiting development team to hit the crash in debug environment and also a number of users here enabled core dumps and we will see if the core dump with logs will identify the problem

I also can see loads of Plex Scanner crashes on your system - all within sqlite3 module - may be that was before database repair

You mention NFS - it would be ok to use for the media but if you have your Application Support directories and database on NFS then you will get serious issues and lockouts and corruptions - an environment that is not supported

I am also using NFS for media with a large library. Could be the common factor? Have they tried that in the dev environment?

Also still waiting on a crash