Process /usr/bin/mencoder has a return code of 139

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
andymc
Posts: 6
Joined: Wed Jan 03, 2024 9:18 am

Process /usr/bin/mencoder has a return code of 139

Post by andymc »

Hi all new to UMS here and still trying to get my setup working.

Have the server running, but whenever i attempt to stream something that needs to be transcoded i get an error client side.

I looked into the journalctl logs for the service running on my ubuntu machine and saw the following.

Code: Select all

Jan 04 01:24:47 media-server UMS.sh[1837098]: INFO  01:24:47.633 [Library Scanner] Library scan completed in 3 seconds
Jan 04 01:24:59 media-server UMS.sh[1837098]: INFO  01:24:59.196 [pool-5-thread-1] Renderer PlayStation 4 has an estimated network speed of 100.35144075091084 Mb/s
Jan 04 01:24:59 media-server UMS.sh[1837098]: INFO  01:24:59.392 [pool-5-thread-2] Renderer Samsung E+ Series has an estimated network speed of 67.947086499974 Mb/s
Jan 04 01:25:00 media-server UMS.sh[1837098]: INFO  01:25:00.051 [pool-5-thread-3] Renderer Unknown renderer has an estimated network speed of 32.600577503439965 Mb/s
Jan 04 01:25:12 media-server UMS.sh[1837098]: INFO  01:25:12.837 [mencoder-72] Process /usr/bin/mencoder has a return code of 139! Maybe an error occurred... check the log file
Jan 04 01:25:15 media-server UMS.sh[1837098]: INFO  01:25:15.195 [StartPlaying Event] Started playing test.mkv on your PlayStation 4
I'm assuming the non 0 return code there is related to the error I'm seeing.

I pulled the tracelogs from the server as instructed maybe there is something going on in there about the media database?

I can't really tell.

Code: Select all

DEBUG 2024-01-04 01:14:21.856 [ffmpeg-177-2] net.pms.io.OutputTextConsumer [in#0 @ 0x754b8c0] Error opening input: Invalid data found when processing input
DEBUG 2024-01-04 01:14:21.857 [File event] net.pms.database.MediaTableFiles Could not parse the bitrate for: /home/andymc/.config/UMS/database/medias.mv.db
TRACE 2024-01-04 01:14:21.858 [File event] net.pms.formats.FormatFactory Could not match any format to "/home/andymc/.config/UMS/database/medias.mv.db"
TRACE 2024-01-04 01:14:21.858 [File event] net.pms.formats.FormatFactory Could not match any format to "/home/andymc/.config/UMS/database/medias.mv.db"
I will say that the issue seems to be related to certain clients because i am able to play the same file using my samsung TV I doubt that helps much, but thought I'd just add that.

Hope this helps I can obviously provide any additional information you need.
Attachments
ums_dbg_2024-01-04-01-14.zip
(546.21 KiB) Downloaded 36 times
User avatar
mik_s
Moderator
Posts: 1130
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Process /usr/bin/mencoder has a return code of 139

Post by mik_s »

In your shared.conf you have included the UMS installation folder "/opt/ums" and your home folder "/home/andymc" so UMS is scanning these whenever there is a file change event.
The config folder is inside the home folder and that is where the database is "/home/andymc/.config/UMS/database/medias.mv.db" so every time a file is scanned and this database is changed, it triggers another scan of itself and tries to make thumbnails with FFmpeg.
This also contains the log files which are constantly changing and triggering a scan each time too.

To fix this just remove "/opt/ums" and "/home/andymc" folders from the shared folders and add only folders that contain your media. Then restart UMS.
Did you add those folders or was it pre-populated? I have seen a similar thing when someone used the docker image.

The MEncoder is confusing me a bit. FFmpeg is what should be used as it has the higher priority.
I see it is deferring to MEncoder because of a setting to do with subtitles. This is strange as the video uses SUBRIP and FFmpeg can handle this just fine.

Try turning off the "Defer to MEncoder when transcoding problematic subtitles." option in Transcoding settings > Video files engines > FFmpeg
This is on by default but I have never seen it use MEncoder on any of my videos. Maybe there is something strange with your test file that is triggering this option.

I don't know why MEncoder is failing. Everything looks to be going well then it just stops and I see this before the error code.

Code: Select all

[mencoder-179] net.pms.io.BufferedOutputFileImpl EOF
I can only guess but maybe the file is corrupted or if you were downloading it it may not have finished. Try with a different file.

It could also be the constant scanning attempts on the database that is preventing it from working properly.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
andymc
Posts: 6
Joined: Wed Jan 03, 2024 9:18 am

Re: Process /usr/bin/mencoder has a return code of 139

Post by andymc »

As far as the segfault thing goes it does reproduce when i run the mencoder command directly from the command line. I.e mencoder just abruptly stops.

when digging around in the syslog and found this guy.

Code: Select all

Jan  4 16:14:36 media-server kernel: [43752.937994] mencoder[436972]: segfault at d5415059 ip 00007faddccee3fe sp 00007ffc389716e0 error 4 in libc.so.6[7faddcc71000+195000]
Not sure if that helps at all.
User avatar
mik_s
Moderator
Posts: 1130
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Process /usr/bin/mencoder has a return code of 139

Post by mik_s »

Sorry I don't know what segfault means or what is causing it to be any help with that. That one line may not point to the cause which may happen further up in the logs.

Did you try the other things I suggested?
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
andymc
Posts: 6
Joined: Wed Jan 03, 2024 9:18 am

Re: Process /usr/bin/mencoder has a return code of 139

Post by andymc »

Yeah I changed the shared.conf and restarted everything.

Tested quick with the iPad / VLC this morning on my way out the door. Looks like it is still crashing when i try to stream anything, but I haven't been able to look over the logs again.
User avatar
mik_s
Moderator
Posts: 1130
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Process /usr/bin/mencoder has a return code of 139

Post by mik_s »

Could you do new logs with this change. Might be helpful to test a few other videos too.
Also make sure you have turned off the "Defer to MEncoder when transcoding problematic subtitles." option.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
andymc
Posts: 6
Joined: Wed Jan 03, 2024 9:18 am

Re: Process /usr/bin/mencoder has a return code of 139

Post by andymc »

Ok was able to confirm that the issue isn't present in all files that i try to play so that is something.

However, I have been running into an issue where now I am unable to enable trace logging. Whenever the server shut down it never brings itself back up, and when i restart it manually it is no longer in trace mode.

Also disabling the "Defer to MEncoder" setting does seem to make playback more reliable. I've been able to play several files on my iPad that previously had not worked, but I'm still seeing playback issues on other clients such as my PlayStation. I am seeing different log messages for the PlayStation failure though so perhaps that is encouraging.

One of the messages i am seeing is:
Jan 05 00:18:00 media-server UMS.sh[7227]: ERROR 00:18:00.399 [Hanging External Process Stopper] External input stream instance is null... stopping process

One note about this... That file is located on a networked samba share and when i copy it to my local disk it is able to play now. Perhaps something is timing out trying to download it in higher bandwidth cases?
User avatar
mik_s
Moderator
Posts: 1130
Joined: Wed Aug 23, 2017 11:03 pm
Location: UK

Re: Process /usr/bin/mencoder has a return code of 139

Post by mik_s »

andymc wrote: Fri Jan 05, 2024 12:21 pm One of the messages i am seeing is:
Jan 05 00:18:00 media-server UMS.sh[7227]: ERROR 00:18:00.399 [Hanging External Process Stopper] External input stream instance is null... stopping process

One note about this... That file is located on a networked samba share and when i copy it to my local disk it is able to play now. Perhaps something is timing out trying to download it in higher bandwidth cases?
It could be because it is timing out but I know nothing about that sort of stuff, and very little about Linux.

I have UMS running in trace mode all the time so not sure, but I think if you follow the log instructions it only put it in trace mode one time then reverts back after they are packed.

I still don't know why UMS was choosing to use MEncoder though for those files. I'll have to mention it to the Devs so they can have a look.

Good to see that things are working better now though. For any other errors could you do more logs so I can see.
Logs are important for us to help, Please follow This Link before asking for support. Just a forum cleaner, Will help if I can but no expert.
Post Reply