[SOLVED] Plex Transcoder segfault

Server Version#: 1.30.0.6359
Player Version#: Mac, Version 1.57.1.3358-5fd2a504

Please let me know if there’s a core file (and location) to pass to you? Or any other logs you need?

[Nov12 00:09] Plex Transcoder[16605]: segfault at 7f779b3e4000 ip 00007f779e7e1204 sp 00007f779ad7f948 error 4 in ld-musl-x86_64.so.1[7f779e79c000+53000]

You turned DEBUG logging off.

As such, it’s really hard to see what really happened and why.

One thing I can already tell you is that you have more directories to monitor than DSM allows by default.

DSM 7 allows up to 65536 directories to be monitored by default.

If you have a lot of media directories, which happens really quickly with music and photos, you’ll overflow the table.

That becomes a problem when the transcoder runs because it needs two slots… two slots in that table which is already full.

You get a failure just like this:

Nov 12, 2022 10:11:09.341 [0x7eff7cc46b38] INFO - CodecManager: starting EAE at "/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp/pms-378e30af-81e7-47b3-a96f-ac21e482aaae/EasyAudioEncoder"
Nov 12, 2022 10:11:12.000 [0x7eff7ca43b38] ERROR - [Req#6dd4/Transcode/0004600f-442d-404b-8c9c-9da2293cb646/b01b1a5d-e795-447d-8570-2bfdf3d3020d] [eac3_eae @ 0x7fcac47f7600] EAE timeout! EAE not running, or wrong folder? Could not read '/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp/pms-378e30af-81e7-47b3-a96f-ac21e482aaae/EasyAudioEncoder/Convert to WAV (to 8ch or less)/0004600f-442d-404b-8c9c-9da2293cb646_18446-0-0.wav'
Nov 12, 2022 10:11:12.001 [0x7eff7c43ab38] ERROR - [Req#6de7/Transcode/0004600f-442d-404b-8c9c-9da2293cb646/b01b1a5d-e795-447d-8570-2bfdf3d3020d] [eac3_eae @ 0x7fcac47f7600] error reading output: -5 (I/O error)
Nov 12, 2022 10:11:12.002 [0x7eff7e064b38] ERROR - [Req#6de8/Transcode/0004600f-442d-404b-8c9c-9da2293cb646/b01b1a5d-e795-447d-8570-2bfdf3d3020d] Error while decoding stream #0:1: I/O error
Nov 12, 2022 10:11:15.000 [0x7eff7c43ab38] ERROR - [Req#6de9/Transcode/0004600f-442d-404b-8c9c-9da2293cb646/b01b1a5d-e795-447d-8570-2bfdf3d3020d] [eac3_eae @ 0x7fcac47f7600] EAE timeout! EAE not running, or wrong folder? Could not read '/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp/pms-378e30af-81e7-47b3-a96f-ac21e482aaae/EasyAudioEncoder/Convert to WAV (to 8ch or less)/0004600f-442d-404b-8c9c-9da2293cb646_18446-0-1.wav'
Nov 12, 2022 10:11:15.001 [0x7eff7e064b38] ERROR - [Req#6df9/Transcode/0004600f-442d-404b-8c9c-9da2293cb646/b01b1a5d-e795-447d-8570-2bfdf3d3020d] [eac3_eae @ 0x7fcac47f7600] error reading output: -5 (I/O error)
Nov 12, 2022 10:11:15.002 [0x7eff7e56ab38] ERROR - [Req#6dfa/Transcode/0004600f-442d-404b-8c9c-9da2293cb646/b01b1a5d-e795-447d-8570-2bfdf3d3020d] Error while decoding stream #0:1: I/O error
Nov 12, 2022 10:11:20.163 [0x7eff80081b38] INFO - Library section 7 (Cartoons) will be updated because of a change in "/volume1/Entertainment/Cartoons/Star Trek Prodigy (2021)/Star Trek Prodigy - S01E04 - .mkv"

In order to figure out what’s happening,

  1. Please turn DEBUG logging back on and SAVE that

  2. Restart Plex

  3. If you have a lot of music, give Plex a few minutes (3-4-5 minutes is normal for PMS to scan the file system and find all the media to monitor)

  4. Now recreate the failures as best you can and download the logs ZIP file again when done.

  5. Attach that here and we’ll take another look.

Thanks @ChuckPa,

I’ll keep it in mind and turn on Debug, in case it happens again. It’s one off so far. Sorry about that. I’ve mixed Debug and Verbose in terms of which I shouldn’t have on when uploading files…

As for the directories, this is very interesting. I know for a fact that I have far less than that. My Plex server only has TV shows, Movies, and Documentaries at the moment - music isn’t added.

With those 3, I have just under 800 directories in total.

$ find . -type d | wc -l
767

Even if my music was included, that would add another ~4700 directories.

I’d be interested to troubleshoot why Plex thinks I have over 65k directories… Maybe there’s some corruption or issue ?

Anything you can advise me on how/where to look?

Thanks.

Seeing you don’t have that. The next question I ask is

“Where is the transcoder temp directory pointed to?”

How it works is:

  1. You select a video to play
  2. PMS sees that it contains Dolby audio.
  3. It makes the directories for the EAE (EasyAccessEncoder – from Dolby) and sets a watch point (inotify)
  4. As the transcoder runs, and the EAE runs (independently), PMS & the transcoder & EAE all stay in sync through inotify.
  5. When it’s time (PMS notified both video and audio blocks are done), it muxes them together to send out

The failure comes when the video arrives but there’s no audio file
This happens when
– sync with EAE is lost due to inotify failure
– EAE couldn’t write the WAV audio out for PMS to read.

Edit: Ok I just realised the EAE part is regarding the failure you posted.

As for the transcoder temp directory, good question… I guess it’s the default directory to where it’s supposed to point to in Synology NAS.

But I’m presuming that EAE error is separate than what caused the transcoder to crash right? 10hrs apart.

Edit: for what it’s worth, that S01E04 episode plays with audio. I did copy in these episodes around the time that failure error occurred.

I couldn’t tell what was going on from the ERROR/WARN logs.

Those errors only show up at the end.
DEBUG logging allows me to track what it’s attempting (which is usually 90% of the battle)

No worries, I’ll see if I can replicate the above.

Which log is that EAE failure in? So I can keep an eye out for it. Was it the Plex Media Server log ?

Yes. The failure I found is in PlexMediaSerfer.log (current active at that time)

Your failures look like mine here No thumbnails since Version 1.29.1.6316? Not deleting older recordings? - #13 by e10kstarfire

Thanks! That’s interesting. I wonder if it’ll trigger another thumbnail creation attempt at some point and hit this. I have DEBUG enabled and will keep an eye out.

@ChuckPa,

Segfault happened again around the same time at midnight. This time with debug logs enabled.

[Nov13 00:18] Plex Transcoder[22525]: segfault at 7fc90d47a000 ip 00007fc9101cd204 sp 00007fc90c65a948 error 4 in ld-musl-x86_64.so.1[7fc910188000+53000]

It looks like it did crash when generating video preview thumbnails

Nov 13, 2022 00:18:36.900 [0x7ff6fa001b38] DEBUG - [Req#1280/Transcode/bif/921b1032-1cbb-4e84-a57a-68f2bec11476] Activity: updated activity 921b1032-1cbb-4e84-a57a-68f2bec11476 - completed 56.5% - Generating video preview thumbnails
Nov 13, 2022 00:18:37.400 [0x7ff6fa001b38] DEBUG - [Req#1281/Transcode/bif/921b1032-1cbb-4e84-a57a-68f2bec11476] Activity: updated activity 921b1032-1cbb-4e84-a57a-68f2bec11476 - completed 59.6% - Generating video preview thumbnails
Nov 13, 2022 00:18:38.165 [0x7ff6fef3bb38] DEBUG - Jobs: '/volume1/@appstore/PlexMediaServer/Plex Transcoder' exit code for process 22506 is -11 (signal: Segmentation fault)
Nov 13, 2022 00:18:38.165 [0x7ff6fb989b38] ERROR - BaseIndexFrameFileManager: transcoder exited abnormally

The relevant log lines:
job-crash.txt (46.8 KB)

Am I right in saying this is for The Lucky One (2012).avi ?

If so, if it helps,

General
Complete name :
The Lucky One (2012).avi
Format :
AVI
Format/Info :
Audio Video Interleave
File size :
1.37 GiB
Duration :
1 h 40 min
Overall bit rate :
1 943 kb/s
Video
ID :
0
Format :
MPEG-4 Visual
Codec ID :
XVID
Codec ID/Hint :
XviD
Duration :
1 h 40 min
Bit rate :
1 473 kb/s
Width :
720 pixels
Height :
304 pixels
Display aspect ratio :
2.35:1
Frame rate :
23.976 (24000/1001) FPS
Color space :
YUV
Chroma subsampling :
4:2:0
Compression mode :
Lossy
Bits/(Pixel*Frame) :
0.281
Stream size :
1.04 GiB (76%)
Audio
ID :
1
Format :
AC-3
Format/Info :
Audio Coding 3
Codec ID :
2000
Duration :
1 h 40 min
Bit rate :
384 kb/s
Channel(s) :
6 channels
Sampling rate :
48.0 kHz
Compression mode :
Lossy
Stream size :
277 MiB (20%)
Alignment :
Aligned on interleaves

@Sam_AU

Does 1.29.2 have the same problem?

I don’t believe so. I didn’t notice any segfaults in dmesg until yesterday.

I can downgrade and check if you need me to, provided there aren’t any major risks to downgrade, and … if I can find that version (Synology DSM 7), but yea dmesg looks clean until I upgraded PMS ~2 days ago.

Edit: No rush btw. I know it’s the weekend :slight_smile:

Please check the other thread I mention, happens on 1.29.1 and 1.29.2 for us

I opened the .avi in VLC, and it looks totally corrupt/messed up.

I’m not sure if there’s something else the transcoder can do instead of segfault. If not, then yea we can close this off… If yes, I have a 5 minute snippet done via ffmpeg. A lot of missing VOL header errors, but I guess that’s expected.

 ffmpeg -i IN.avi -ss 00:10:00.0 -to 00:15:00.0 -c copy OUT.avi

Edit: I did not test if this out.avi replicates the issue above. I can do that tomorrow.

If the video is that badly mangled, there’s nothing which can be done.

WYSIWYG … True?

Yep, I agree.

And deleting that .avi stopped the daily segfaults.

I just kept this open in case you thought there’s a need to add some checks to the transcoder, so that it would gracefully stop or error out when it gets such a mangled video, instead of segfaulting.

But yea, otherwise I can close this off.

Thanks for your help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.