Media scanner crashes almost every night.

scanner-agent-dev

#1

Recently the Media Scanner has been crashing during the night and I cant figure out why. What should i bee looking for in the logs?
I can see that I have some crashdumps for the last three nights but they all seem to be binary data and are unreadable to me.


#2

Please paste "Plex Media Scanner.log" to begin with.
Are you using a third party scanner ? is Plex up to date? Under which OS?
https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files


#3

Okay so here is what i have found.

This crash happens almost every night at the same time around 02:11 during the night. I get this in the windows server 2016 event log:

Timestamp: 2017-12-20 02:11:53
Faulting application name: Plex Media Scanner.exe, version: 1.10.1.4602, time stamp: 0x5a3121fd
Faulting module name: Plex Media Scanner.exe, version: 1.10.1.4602, time stamp: 0x5a3121fd
Exception code: 0xc0000005
Fault offset: 0x0023b4c2
Faulting process id: 0xee0
Faulting application start time: 0x01d3792f8148bb34
Faulting application path: C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe
Faulting module path: C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe
Report Id: 6ceee36a-b62f-4d07-8364-24d8e0a11571
Faulting package full name: 
Faulting package-relative application ID:

Looking through the Media Scanner logs the log starts at 02:23 but the crash occurred 02:11.

The problems seems to be with Deep Analysis. I found this in the Deep Analysis log:

Dec 20, 2017 02:11:46.996 [3616] DEBUG - [MI] Opening input file: [REDACTED].ape
Dec 20, 2017 02:11:46.997 [3616] DEBUG - [FFMPEG] - Setting default whitelist 'file,crypto'
Dec 20, 2017 02:11:46.999 [3616] DEBUG - [FFMPEG] - Format ape probed with size=2048 and score=100
Dec 20, 2017 02:11:46.999 [3616] DEBUG - [FFMPEG] - Before avformat_find_stream_info() pos: 0 bytes read:32960 seeks:3 nb_streams:1
Dec 20, 2017 02:11:47.019 [3616] DEBUG - [FFMPEG] - All info found
Dec 20, 2017 02:11:47.019 [3616] DEBUG - [FFMPEG] - After avformat_find_stream_info() pos: 496600 bytes read:529560 seeks:3 frames:1
Dec 20, 2017 02:11:51.347 [3144] WARN - Crash: Crash reporting disabled
Dec 20, 2017 02:11:51.348 [3144] WARN - Crash: Crash reporting disabled
Dec 20, 2017 02:11:51.349 [3144] WARN - Crash: Crash reporting disabled
Dec 20, 2017 02:11:51.350 [3144] WARN - Crash: Crash reporting disabled

Yes I have crash reporting off as I am paranoid af. :'(

In the Plex Media Server.log i found this, not sure if it is relevant:

Dec 20, 2017 02:11:46.331 [8300] DEBUG - Butler: Scheduling loudness analysis for album 13631.
Dec 20, 2017 02:11:46.331 [8300] DEBUG - Job running: EAE_ROOT='\\?\D:\TMP-plex\Transcode\Sessions\EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='\\\\?\\C\:\\Users\\Dolan\\AppData\\Local\\Plex\ Media\ Server\\Codecs\\b077134-1269-windows-i386\\' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe --analyze-loudness --force --item 13631 --log-file-suffix " Deep Analysis" 
Dec 20, 2017 02:11:50.306 [7480] DEBUG - Butler: Starting delayed task RefreshPeriodicMetadata.
Dec 20, 2017 02:11:51.493 [6792] DEBUG - Auth: authenticated user 1 as supergregg
Dec 20, 2017 02:11:51.493 [7080] DEBUG - Request: [[REDACTED]:65107 (Subnet)] GET /status/sessions (7 live) TLS Signed-in Token (supergregg)
Dec 20, 2017 02:11:51.494 [7080] DEBUG - [Now] Adding 0 sessions.
Dec 20, 2017 02:11:51.495 [6764] DEBUG - Completed: [[REDACTED]:65107] 200 GET /status/sessions (7 live) TLS 2ms 292 bytes (pipelined: 1)
Dec 20, 2017 02:11:51.499 [6764] DEBUG - Auth: authenticated user 1 as supergregg
Dec 20, 2017 02:11:51.500 [7136] DEBUG - Request: [[REDACTED]:65108 (Subnet)] GET /status/sessions (6 live) TLS Signed-in Token (supergregg)
Dec 20, 2017 02:11:51.500 [7136] DEBUG - [Now] Adding 0 sessions.
Dec 20, 2017 02:11:51.504 [6792] DEBUG - Completed: [[REDACTED]:65108] 200 GET /status/sessions (6 live) TLS 3ms 292 bytes (pipelined: 1)

These are the only things happening during this time period in the logs. Everything else is after 02:23.
I can send the memory dump if it will help.


#4

When running on Windows, the following operating system versions are supported:

Windows 7 SP1 / Windows Server 2008 R2 SP1
Windows 8 / Windows Server 2012
Windows 8.1 (with Update) / Windows Server 2012 R2 (with Update)
Windows 10

Windows 2016 is not in the supported OS list and the app crashed so app logs are irrelevant...
Microsoft Visual C++ Runtime Libraries are missing possibly
also put .net in case


#5

Well it has been working fine for a year, I don't see why it would suddenly start crashing unless something in the application has changed or there is something wrong with the media it is scanning. A windows patch might have changes something, but i doubt it. Everything else works as expected, the media scanner works like it should except during the night at about the same time, every night.
I might have narrowed it down to an album in .ape format. Ill try to remove it from the library and see what happens tonight.


#6

Plex update might need new runtimes
Windows update likelly too...
Try in command line 'sfc /scannow' in case of slight os corruption


#7

Nope, not a problem with the system. My guess is there is the problem with the scanner and the probably damaged .ape files.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection did not find any integrity violations.

Plex found an update and its is installing now. Tomorrow we will know.


#8

scanner written in python, shouldn't crash main Plex's exe but analysing corrupted files might...
Good luck. Tricky one to solve but maybe you can narrow down a library then file impacted...