Segmentation fault on Arch Linux
Segmentation fault on Arch Linux
Hello,
Since upgrading glibc to 2.36, makemkv dies with a segmentation fault soon after startup. Seems to be happening to everyone on Arch Linux: see https://aur.archlinux.org/packages/makemkv.
Anything I can do to help debug this?
Since upgrading glibc to 2.36, makemkv dies with a segmentation fault soon after startup. Seems to be happening to everyone on Arch Linux: see https://aur.archlinux.org/packages/makemkv.
Anything I can do to help debug this?
-
- Posts: 20
- Joined: Wed Aug 01, 2018 7:13 pm
Re: Segmentation fault on Arch Linux
I can confirm this. Workaround with snap (or flatpak) is an option, but only for running the GUI or makemkvcon. This bug also breaks direct disc playback with libmmbd, so there is a lot of secondary breakage that is harder to workaround.
Master of Thyme and Spice
Registered User
Registered User
Re: Segmentation fault on Arch Linux
Also confirming this on Arch Linux. I was able to get a gdb trace.log file, but I'm certainly not getting a lot of information from it.
- Attachments
-
- trace.log
- (2.63 KiB) Downloaded 504 times
Re: Segmentation fault on Arch Linux
This appears to have broken after the update to glibc to 2.36 in Arch. When I downgraded to 2.35, the software was functional again.
Re: Segmentation fault on Arch Linux
Probably helps if I re-read the thread when replying again... My bad.
Re: Segmentation fault on Arch Linux
It wreaks havoc for me when inserting a disc, as there is some mechanism that starts makemkvcon in the background when a new disc is inserted or a new drive is mounted to seek for BDMV structures, see here: https://aur.archlinux.org/packages/make ... ent-850099
It forcefully unmounts/breaks my local RAIDs for me when inserting a disc as it takes down something with it it seems.
Will uninstall this for now before it causes data corruption.
It forcefully unmounts/breaks my local RAIDs for me when inserting a disc as it takes down something with it it seems.
Will uninstall this for now before it causes data corruption.
Re: Segmentation fault on Arch Linux
The segfault seems to be related to append_utf8, strlen and GetAppString calls. LibC changed the behaviour when providing a NULL string in hardware accelerated code.
One patch which resolved some of the issues is:
This basically adds a NULL check which then returns the original string pd. This fix solved the issues I were having with bd_info. After applying the patch, bd_info printed the correct information.
But there is still a further issue: the function GetAppString of the class CApClient returns NULL when the first argument of the shared memory (I'm guessing here) is 0. This causes a crash (segfault) when this function is called with the argument AP_vastr_KeyType (Line 133 in libmmbd/src/mmconn.cpp). I did not fix this issue as it was getting late and I was tired of hunting these issues.
The obvious fix is to not use any NULL strings and instead use empty "" strings. This requires a fix from the devs across the whole codebase.
One patch which resolved some of the issues is:
Code: Select all
--- a/libmmbd/src/mmconn.cpp
+++ b/libmmbd/src/mmconn.cpp
@@ -74,9 +74,10 @@ CMMBDConn::~CMMBDConn()
static char* append_utf8(char* pd,char* pe,const char* p)
{
- size_t len;
-
- len = strlen(p);
+ if (p == NULL) {
+ return pd;
+ }
+ size_t len = strlen(p);
if (len>=((size_t)(pe-pd))) return pd;
But there is still a further issue: the function GetAppString of the class CApClient returns NULL when the first argument of the shared memory (I'm guessing here) is 0. This causes a crash (segfault) when this function is called with the argument AP_vastr_KeyType (Line 133 in libmmbd/src/mmconn.cpp). I did not fix this issue as it was getting late and I was tired of hunting these issues.
The obvious fix is to not use any NULL strings and instead use empty "" strings. This requires a fix from the devs across the whole codebase.
-
- Posts: 20
- Joined: Wed Aug 01, 2018 7:13 pm
Re: Segmentation fault on Arch Linux
The analysis you posted is great. Thanks very much for that.
I would say that this issue points to a wider problem with the project, which is that it seems to be a one person show, and while it wears the robes of openness, ultimately the project isn't very open.
There is no real dialog between the developer and the community.
There is no real roadmap for the project.
It is a pain in the bum to integrate this project into any libraries because it all boils down to parsing the output of --robot.
I appreciate the value of this project, but it seems to me it could be so much better if a few things were changed.
As a paid contributor, I can say I am very disappointed with what my contribution has brought.
Time to step it up a bit, in my humble opinion.
I would say that this issue points to a wider problem with the project, which is that it seems to be a one person show, and while it wears the robes of openness, ultimately the project isn't very open.
There is no real dialog between the developer and the community.
There is no real roadmap for the project.
It is a pain in the bum to integrate this project into any libraries because it all boils down to parsing the output of --robot.
I appreciate the value of this project, but it seems to me it could be so much better if a few things were changed.
As a paid contributor, I can say I am very disappointed with what my contribution has brought.
Time to step it up a bit, in my humble opinion.
Master of Thyme and Spice
Registered User
Registered User
-
- Posts: 4
- Joined: Wed Mar 06, 2013 8:03 pm
Re: Segmentation fault on Arch Linux
I've the same issue - hope this gets fixed fast because currently I can't use the program at all...
Re: Segmentation fault on Arch Linux
My workaround was to create a chroot with the old glibc and such inside of it.
Re: Segmentation fault on Arch Linux
Same issue on Manjaro with glib 2.36-1. I really hope that this can be fixed in a timely manner, just bought a bag of DVD's off a second hand store
Re: Segmentation fault on Arch Linux
Same problem here
any funtional patch for fix this until devs fix it in upstream? downgrade glibc is not a option
greetings
any funtional patch for fix this until devs fix it in upstream? downgrade glibc is not a option
greetings
Re: Segmentation fault on Arch Linux
If you're only ripping DVDs, why not use one of the numerous other projects that do that?
Re: Segmentation fault on Arch Linux
Probably a matter of laziness and principle. I have a lovely way of doing it (MakeMKV) and have been doing it for years, and also I've paid for it (hence principle).mikewilzn wrote: ↑Wed Aug 17, 2022 7:14 pmIf you're only ripping DVDs, why not use one of the numerous other projects that do that?
Sure, if I was in a rush I'd probably use another tool for this operation but for now it doesn't really matter enough in order to learn a new way of doing things. Great link though! Might help others in a bit more pressed situation than me.
(Btw, issue still in glibc 2.36-2.)