Server 1.23.2.4656 - Unable to scan movies -- Seg Fault (External)

Question to all. Is anyone using NFO files and what is the last thing in the logs?

Is it scanning movies with NFO files in them when it blows up?

I’m willing to help diagnose & get this resolved if someone can give me examples to work with / point me in a direction.

I can test more this week, but I noticed it specifically if a movie is “upgraded” to a better version, so a movie that already existed, but I converted it to a different format, and am scanning the directory again. But I do not have NFO files in the folder with the movies or anywhere if that helps. I’ll be able to get better logs later this week…maybe @farfetchd has some newer logs?

I am having the same issue trying to scan from the command line. My hunch is that it has something to do with the NEW scanner (Plex Movie) since I think I have been seeing this issue ever since my library was switched from the OLD scanner (Plex Movie Scanner). The core dumps are created ever time I try to scan a directory. Scanning from within Plex is working, and it looks like that uses the “–match” action instead of “–scan”. I’m going to mess around with that to see if match works instead of scan from the command line.

I have exactly the same problem since the new scanner

I suspected that it also had something to do with NFO files

CLI scann

Hi @ChuckPA

Thanks for the reply and willingness to diagnose.

Plex running in Docker Image (doesn’t matter which one… linuximages or official plex docker)
plex_autoscan to initiate the cli scanner.

From1.22.3.4523-d0ce30438 to any newer version results in seg fault…

I can attach cores/logs if you require.

My plex is set … to use the newest movie agent scanner, so there is no options set for NFO

I updated to latest, and issue is still happening (Movies only) TV shows are fine.

 2021-08-03 21:14:17,141 -     INFO -      PLEX [140054236223232]: Running Plex Media Scanner for: /mergerfs/movies/Bliss (1997)
 2021-08-03 21:14:18,128 -     INFO -     UTILS [140054236223232]: '****** PLEX MEDIA SCANNER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.23.6.4881-e2e58f321/PLEX MEDIA SCANNER/1465a7ee-36b6-4129-7260c592-0c3a9c13.dmp'
 2021-08-03 21:14:18,275 -     INFO -     UTILS [140054236223232]: "bash: line 1:  6332 Segmentation fault      (core dumped) /usr/lib/plexmediaserver/Plex\\ Media\\ Scanner --scan --refresh --section 1 --directory '/mergerfs/movies/Bliss (1

Dump file…
http://transfer.sh/1KSW7pV/1465a7ee-36b6-4129-7260c592-0c3a9c13.dmp

I’ve tested some more… Bashing into the docker container, and running commands refuses to scan any movie… with NFO or withour NFO

I tried to copy over the 1.22 version of the Plex Scanner… huge file size difference… 7.4MB vs 3.4MB (working vs not working).

Seems a lot of changes were made between the multiple versions, all the Python modules/libraries have changed.

I spun up another Docker Plex server… looks like calling ANY command via SLI results in SEG fault…

root@4e2ccfcd57ac:/# /usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan --refresh --section 1 
****** PLEX MEDIA SCANNER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.24.0.4897-411e7667f/PLEX MEDIA SCANNER/db136460-f849-42f8-24956aaa-a9d77830.dmp
Segmentation fault (core dumped)

@ChuckPA

Any help?

Can you create a DEBUG log set ?

DMP files only go so far.

The DEBUG files tell us what it’s doing. What I suspect is you have a piece of media which it doesn’t like. The challenge is finding it.

Sorry I didn’t see this and thanks for pinging again.

I’ll pull a new docker set and run the external command again, I hope the external commands show up in the debug logs :slight_smile:

1 Like

Hi @ChuckPa

Please see attached logs from the web app troubleshooting, as well additional logs created (I think because I used docker commands)

I looked through them, nothing of… value really… just seg faults…

Here are commands used - same when I docker exec -it plex /bin/bash and run the commands manually…

Same thing happens outside of Docker instance too (I spun up a VM and tossed Plex on and tested it as well)

docker exec -u 1000 -i plex bash -c "/usr/lib/plexmediaserver/Plex\\ Media\\ Scanner --scan --refresh --section 1 --directory '/unionfs/movies/Masquerade (2021)'"
docker exec -u 1000 -i plex bash -c "/usr/lib/plexmediaserver/Plex\\ Media\\ Scanner --scan --refresh --section 1 --directory '/unionfs/movies/The Girl Who Believes in Miracles (2021)'"
docker exec -u 1000 -i plex bash -c "/usr/lib/plexmediaserver/Plex\\ Media\\ Scanner --scan --refresh --section 1 --directory '/unionfs/movies/Joey and Ella (2021)'"
docker exec -u 1000 -i plex bash -c "/usr/lib/plexmediaserver/Plex\\ Media\\ Scanner --scan --refresh --section 1 --directory '/unionfs/movies/Rogue Hostage (2021)'"
docker exec -u 1000 -i plex bash -c "/usr/lib/plexmediaserver/Plex\\ Media\\ Scanner --scan --refresh --section 1 --directory '/unionfs/movies/The Unhealer (2021)'"
"

Plex Media Server Logs_2021-08-08_00-49-32.zip (950.5 KB)
Plex Media Server.zip (7.7 KB)

1 Like

I did not have any NFO files in the folder. I just tried the latest image and it still does not work for movies. I am scanning from Mac Plex App.

Thanks for the reply – yes I’ve tested with both NFO and without NFO.

I’ve looked at the logs between a working instance (older version) to the newer version – and it looks like the new scanner/cli scanner refuses to go past acknowledged the scan…

It’ll find the files… to scan then seg fault… unfortunately without debugging tools for the cli app I can’t diagnose further.

I guess I can test on the windows client and debug, but I doubt it’ll be replicated… I’ll wait for @ChuckPa to respond :slight_smile:

Is it possible for me to get a copy of the actual file to test here with ?

If there is a problem with the file, I’ll find it.
If there is a problem with the scanner, I’ll have what I need to give it to Engineering so they can fix it.

@ChuckPA

Would you like the MKV/Files in DIR? Or would you like the actual Plex Media Scanner executable from the docker container?

I believe the issue is with the Scanner and not the actual Files, because it scans fine on older version of the scanner/docker containers.

Is the LD_LIBRARY_PATH environment variable set? Either in the docker exec command or in the docker create/compose itself? If Plex Media Scanner is crashing immediately that may be the reason.

https://support.plex.tv/articles/201242707-plex-media-scanner-via-command-line/

Docker: Command line to scan plex media server after adding content. : PleX

Hi @Volts

Yes LD path is set, I’ve actually shelled into the docker container, and ran the commands myself… it seg faults with the scan/refresh command arguments, runs fine for tv/series just not for movies.

1 Like