Plex Crashing frequently for the past few months

@thompry said:
I have attached the logs for this crash below. Plex Media Server.exe crashed then I ended the other plex processes manually before grabbing this log.

Logs Below:

Thank you. Appears to be when handling a request for a movie that does not appear to have a video stream.
You can get me the media info xml either by attaching here or by private message and it should be obvious to you from that as to which file it is and you can test the file with other players and see if it is corrupt

you can put this request in a browser on the server to get the media info xml
http://127.0.0.1:32400/library/metadata/21402?checkFiles=1&includeChapters=1&includeConcerts=1&includeExtras=1&X-Plex-Token=xxxxxxxxxxxxx
Please post or send me the media info xml
See this support article for how to find the server X-Plex-Token string which is needed for the request
https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

I have referred the crash report and associated log to the development team

@thompry said:
sa2000: Are you saying that the crashes from all of my previous logs were fixed in this latest version of Plex Media Server? Most of the replies I received on those logs states that they couldn’t really see a reason for the crash in them.

I need to check - but the most prevailing crashes to do with automatic quality adjustment on iOS and tvOS and library lockouts which both have been reported by many users have been addressed

Looking at our crash reporting system - the previous crash from this server was 11th January on version 1.9.2 of Plex Media Server. I think we should go forward and address any new crashes you have on 1.11.1 or later

sa2000 - I have sent a PM to you with the requested information. That video file is indeed corrupt.

@thompry said:
sa2000 - I have sent a PM to you with the requested information. That video file is indeed corrupt.

Thanks - I think the crash was because there was no video stream in the mkv. I have added the media info xml to the evidence already passed to the development team

@thompry said:
Here you go:

  1. Batch file to kill the EasyAudioEncoder.exe process (I have this scheduled to run every 3 hours):

TASKKILL /F /IM “EasyAudioEncoder.exe”

  1. Powershell script to remove transcode files older than 6 hours. (I have this script scheduled to run hourly):

Get-ChildItem -path “C:\Users\Administrator\AppData\Local\Plex Media Server\Cache\Transcode\Sessions” | where {$_.Lastwritetime -lt (date).addhours(-6)} | remove-item -force -recurse

NOTE: I’m now on day 6 without a crash after setting this up.

could you share your script with others?

@chillumsen he did in the post you quoted. Under each item is the commands that are executed in his batch file and Powershell script.

@chillumsen said:

@thompry said:
Here you go:

  1. Batch file to kill the EasyAudioEncoder.exe process (I have this scheduled to run every 3 hours):

TASKKILL /F /IM “EasyAudioEncoder.exe”

  1. Powershell script to remove transcode files older than 6 hours. (I have this script scheduled to run hourly):

Get-ChildItem -path “C:\Users\Administrator\AppData\Local\Plex Media Server\Cache\Transcode\Sessions” | where {$_.Lastwritetime -lt (date).addhours(-6)} | remove-item -force -recurse

NOTE: I’m now on day 6 without a crash after setting this up.

could you share your script with others?

It would be better to provide diagnostics (logs with debug logging enabled) captured after the crash rather than hide the crash by auto restarting.

Have you inhibited crash reporting ? The last crash report from a server on your account is from 25th March and appears to relate to Hardware Acceleration crashing the Nvidia driver nvcuvid.dll

Once you provide diagnostics for a crash then you can consider auto restarts until the issue is fixed. Without diagnostics you are not giving a chance for the issues to be fixed

@sa2000 said:

@chillumsen said:

@thompry said:
Here you go:

  1. Batch file to kill the EasyAudioEncoder.exe process (I have this scheduled to run every 3 hours):

TASKKILL /F /IM “EasyAudioEncoder.exe”

  1. Powershell script to remove transcode files older than 6 hours. (I have this script scheduled to run hourly):

Get-ChildItem -path “C:\Users\Administrator\AppData\Local\Plex Media Server\Cache\Transcode\Sessions” | where {$_.Lastwritetime -lt (date).addhours(-6)} | remove-item -force -recurse

NOTE: I’m now on day 6 without a crash after setting this up.

could you share your script with others?

It would be better to provide diagnostics (logs with debug logging enabled) captured after the crash rather than hide the crash by auto restarting.

Have you inhibited crash reporting ? The last crash report from a server on your account is from 25th March and appears to relate to Hardware Acceleration crashing the Nvidia driver nvcuvid.dll

Once you provide diagnostics for a crash then you can consider auto restarts until the issue is fixed. Without diagnostics you are not giving a chance for the issues to be fixed

I attacthed my latest crash files.
My latest crash is 2018-04-14 14:29:07

Coult you take a look at it some time :slight_smile:

Regards

@chillumsen said:

@sa2000 said:

@chillumsen said:

@thompry said:
Here you go:

  1. Batch file to kill the EasyAudioEncoder.exe process (I have this scheduled to run every 3 hours):

TASKKILL /F /IM “EasyAudioEncoder.exe”

  1. Powershell script to remove transcode files older than 6 hours. (I have this script scheduled to run hourly):

Get-ChildItem -path “C:\Users\Administrator\AppData\Local\Plex Media Server\Cache\Transcode\Sessions” | where {$_.Lastwritetime -lt (date).addhours(-6)} | remove-item -force -recurse

NOTE: I’m now on day 6 without a crash after setting this up.

could you share your script with others?

It would be better to provide diagnostics (logs with debug logging enabled) captured after the crash rather than hide the crash by auto restarting.

Have you inhibited crash reporting ? The last crash report from a server on your account is from 25th March and appears to relate to Hardware Acceleration crashing the Nvidia driver nvcuvid.dll

Once you provide diagnostics for a crash then you can consider auto restarts until the issue is fixed. Without diagnostics you are not giving a chance for the issues to be fixed

I attacthed my latest crash files.
My latest crash is 2018-04-14 14:29:07

Coult you take a look at it some time :slight_smile:

Regards

It is the Nvidia driver for hardware acceleration / transcoding

Suggest you approach Nvidia Tech Support

Crash Summary

0:112> .ecxr
eax=00000000 ebx=6c671e0c ecx=03045503 edx=01d52000 esi=104cfeb0 edi=0b828380
eip=6111ebdc esp=12b4d2b0 ebp=12b4d2dc iopl=0         nv up ei pl nz na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010206
nvcuvid+0xcebdc:
6111ebdc 8b01            mov     eax,dword ptr [ecx]  ds:002b:03045503=????????

FAULTING_IP: 
nvcuvid+cebdc
6111ebdc 8b01            mov     eax,dword ptr [ecx]

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 6111ebdc (nvcuvid+0x000cebdc)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 03045503
Attempt to read from address 03045503

DEFAULT_BUCKET_ID:  INVALID_POINTER_READ

STACK_TEXT:  
12b4d2dc 6112176c 105e2020 0b828380 12b4d2f8 nvcuvid+0xcebdc
12b4d2ec 62c92b59 0b828380 12b4e0c0 65e3c4aa nvcuvid+0xd176c
12b4d2f8 65e3c4aa 10bba0f8 0b828380 61c867b0 nvEncodeAPI+0x22b59
12b4e0c0 00000000 00000000 65e6baa0 00000000 avcodec_57+0x1dc4aa

This is similar to crashes on this forum thread
http://forums.plex.tv/discussion/312993/pms-daily-crash-after-a-full-server-reinstall-from-backup

I can provide the dmp file if Nvidia support need it

By the way, you captured hours after the crash - so apart from the crash reporting upload information, the logs did not cover the time of the crash - oldest log line at 16:1. Not an issue for this crash, because the crash point was very clear and is known about and not within Plex - for other crashes, please make sure logs captured after restart and not hours later

Suggest you disable Hardware Acceleration until you find a solution to these crashes

@sa2000 said:
Suggest you disable Hardware Acceleration until you find a solution to these crashes

Thanks for you time. I try to get newere logs next time
Regards

@chillumsen said:

@sa2000 said:
Suggest you disable Hardware Acceleration until you find a solution to these crashes

Thanks for you time. I try to get newere logs next time
Regards

here are the new crash reports
the time for the crash is 15.45.01
and another crash at 16.18.44

@chillumsen said:

@chillumsen said:

@sa2000 said:
Suggest you disable Hardware Acceleration until you find a solution to these crashes

Thanks for you time. I try to get newere logs next time
Regards

here are the new crash reports
the time for the crash is 15.45.01
and another crash at 16.18.44

Thanks for the logs

There is no evidence of a crash - however there may have been a lockout / deadlock
But I am thinking that there is also the possibility of overload and server running out of process threads

The server does appear to have a very high load with the queue of requests climbing very high within 2 to 3 seconds after relaunch

Diagnostics for lockouts and deadlocks are a bit involved but hopefully the steps are clear to follow which I will outline here

Diagnostics for a deadlock / lockout (Windows)

  1. Prepare yourself by finding the server security token string as it will be needed for the connections list request. To find the token string, see this support article https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/
  2. When the problem occurs (and please wait for sufficient time before capturing diagnostics or restarting eg 10 minutes of requests to the server not getting through) , get the output from a specific browser request on the server. In a browser, go to this url http://localhost:32400/connections?X-Plex-Token=xxxxxxxxxxxxxxxxxxxxx where you put the server token string instead of the xxxxxxxxxxxxxxxx. Copy the displayed output to a text file and save
  3. Next is to force a process dump for the Plex Media Server.exe process. We can do this with Windows Task Manager - but on a 64-bit windows and with Plex Media Server.exe being a 32-bit application, you would need to load the 32-bit x86 version of windows task manager. So load this program instead of the default task manager C:\Windows\SysWow64\Taskmgr.exe
  4. Using this 32-bit Taskmgr.exe find the Plex Media Server.exe process, select it and right click on it and choose Create Dump
  5. Check that the dmp file has been created
  6. Adding a new step because of recent deadlock investigations into one recent case, wait another 2 minutes and confirm that requests to the server home page (http://127.0.0.1:32400/web) do not get through and then repeat steps 2 to 5 (so we have 2 sets to compare)
  7. Restart the server and capture the zipped logs
  8. Zip the dmp files and upload to dropbox or similar service
  9. send me by private message link to the zipped dmp files and send the saved /connections output text files and the zipped logs

Thanks

@chillumsen said:

@sa2000 said:
Suggest you disable Hardware Acceleration until you find a solution to these crashes

Thanks for you time. I try to get newere logs next time
Regards

Have the hardware transcoding crashes stopped or still happening - crashing in the nvidia driver

If they are continuing could you see if beta 1.13.0.5003 makes any difference

Please get me fresh logs if it still crashes

And any feedback from Nvidia ?

@chillumsen said:

@sa2000 said:
Suggest you disable Hardware Acceleration until you find a solution to these crashes

Thanks for you time. I try to get newere logs next time
Regards

Have the hardware transcoding crashes stopped or still happening - crashing in the nvidia driver

If they are continuing could you see if beta 1.13.0.5003 makes any difference

Please get me fresh logs if it still crashes

And any feedback from Nvidia ?

@sa2000 said:

@chillumsen said:

@sa2000 said:
Suggest you disable Hardware Acceleration until you find a solution to these crashes

Thanks for you time. I try to get newere logs next time
Regards

Have the hardware transcoding crashes stopped or still happening - crashing in the nvidia driver

If they are continuing could you see if beta 1.13.0.5003 makes any difference

Please get me fresh logs if it still crashes

And any feedback from Nvidia ?

Hello mate.
no the hardware transcoding has not stopped the crash
im running version 1.13.0.5023 - still crashing
i wrote nvidia, but thet havent wrote me back yet.
here is a frest crash log. last crash is at time 08.12.22
really hope you can find the bug :slight_smile:

regards

HI @thompry … did you can fix this problem??

@chillumsen

Thank you for getting me the process dumps and logs for the lockout that occurred at 16:35 on May 28th 2018

The evidence is good and has now been referred to the development team

@sa2000 said:
@chillumsen

Thank you for getting me the process dumps and logs for the lockout that occurred at 16:35 on May 28th 2018

The evidence is good and has now been referred to the development team

The issue causing the deadlock has been identified and a fix will be worked on
Linking to other forum thread where the deadlock was caused by the same issue
http://forums.plex.tv/discussion/comment/1681503/#Comment_1681503

@sa2000 said:

@sa2000 said:
@chillumsen

Thank you for getting me the process dumps and logs for the lockout that occurred at 16:35 on May 28th 2018

The evidence is good and has now been referred to the development team

The issue causing the deadlock has been identified and a fix will be worked on
Linking to other forum thread where the deadlock was caused by the same issue
http://forums.plex.tv/discussion/comment/1681503/#Comment_1681503

Hello

Thanks for taking care of my log/dmp files.

My questions is - what is it that causing the deadlok ?
you say that the issue has been identified…

Regards.

@chillumsen said:

@sa2000 said:

@sa2000 said:
@chillumsen

Thank you for getting me the process dumps and logs for the lockout that occurred at 16:35 on May 28th 2018

The evidence is good and has now been referred to the development team

The issue causing the deadlock has been identified and a fix will be worked on
Linking to other forum thread where the deadlock was caused by the same issue
http://forums.plex.tv/discussion/comment/1681503/#Comment_1681503

Hello

Thanks for taking care of my log/dmp files.

My questions is - what is it that causing the deadlok ?
you say that the issue has been identified…

Regards.

It is a bug. A timing bug. Plex Media Server process is multi-threaded and the issue here was that two threads (relating to transcoding) end up locking each other out and all requests after that get queued up