-
Notifications
You must be signed in to change notification settings - Fork 1
chromium build issues #10
Comments
http://www.openwall.com/lists/musl/2014/08/08/11 As far as I know, musl still doesn't support alternative malloc implementations, so you have to disable tcmalloc. ... which is why i didn't look into a patch to fix it. |
Appreciate the link; that explains everything. I naively thought it would build out of the box like firefox. Go ahead and close this issue out if you like. Great patches by the way. I hope some of this work eventually drifts all the way upstream. |
They're actually mostly the same as what voidlinux and alpinelinux have in their patchsets -- I haven't started opening issues on the chromium side because I can't get chromium to run yet. There's some kind of segmentation fault going on which I think is still related to threading. |
Okay thanks for the tip. I might install Alpine just to take a look at what they've done. I gather chromium runs (to some reasonable degree) on Alpine, including whatever dependent packages they might have patched differently? Or when you say "open issues on the chromium side" are you implying the thread related problem is (or could be) more fundamental? Chromium is typically statically linked, so with possible exception of some externalities like dbus and namespaces in kernel for sandbox, it shouldn't much care what musl distro it's running on. Is that about right? |
I'm assuming that chromium runs on Voidlinux and Alpinelinux, but I'm also not 100% sure -- the main reason for that being that I'm using a similar patchset and it doesn't work, and they only recently added a patch (https://github.com/lluixhi/musl-extras/blob/master/www-client/chromium/files/musl/06_all_fix-stack.patch#L1-L12) that's critical in order to keep chromium from crashing after loading any page. (They added it as of chromium 53, but it has been an issue for a much longer period of time -- at least since chromium 45, probably earlier) The above problem is because musl makes the default thread stack size 80KiB (which is a good default in 99% of cases), while glibc sets the default thread stack size to 1MiB, which appears to be convention in solaris, OSX, and other libc implementations, but because chromium (as well as webkit) assumes the 1MiB restriction, we run out of stack space on new threads. This is also a problem in webkit, where i have a patch which prevents JavascriptCore from crashing, but neither Alpine nor Void have picked it up yet, so I can only assume that it's broken on their end.. (https://github.com/lluixhi/musl-extras/blob/master/dev-qt/qtwebkit/files/qtwebkit-5.5.1-fix-stack-size-musl.patch) Anyway, I think the issue exists somewhere between chromium 45 and 49, because qtwebengine-5.6.x (based off of chromium 45) works but qtwebengine-5.7.x (based off of chromium 49) does not. What i mean by opening issues on the chromium side is that I'm not comfortable submitting patches upstream to the chromium project if they don't work. I also need to build chromium with the patchset on glibc to make sure I don't break anything there. Then there's the issue that GN, the new build system for chromium that replaces GYP in chromium 54+, needs to be patched because they use a memory allocator hack that's incompatible with musl. And yes, because it's statically linked, chromium should run about the same on different musl-based linux distros. Alpine will probably be a better test because they also use grsecurity patches in their kernel. |
IIRC @ncopa has great experience with solving Chromium issues on Alpine (musl), let's ask him. |
I've got Alpine up and their binary seems stable enough in a short test. YouTube videos play anyway, They are on 53.0.2785.143 currently. The thread stack problem has a small patch, and 53 is still on GYP. I'll look out for your sandbox issue and much appreciate the heads up. |
Alright, so the current segmentation fault in qtwebengine is because of a SIGILL ILLOPN. I wonder whether this could be fixed by using an older version of sys-devel/gcc (I'm using gcc-6.2.0 right now, and there might be some kind of codegen bug.) |
@lluixhi If you're still trapped in chromium's segfault, i'm sure that you need this to get it worked(maybe qtwebengine need this, too): I'm running chromium(53.0.2785.143) well with your patches, with this patch and stack_size patch.(compiled by gcc620) EDIT: There's a dirty fix patch for ppapi plugins: https://raw.githubusercontent.com/xhebox/noname-linux/master/ports/chromium/musl-ppapi-nosandbox-and-fixdlopen.patch. I first made it because i want to use ppapi flash under musl. Then i found that all ppapi plugins(which need to use dlopen to load) will be blocked by sandbox. The fisrt part of this patch(before 'flash' appeared) should solve this, the second part is for closed source flash not for this issue. |
@xhebox Thanks! |
Alright, seems not everything is quite right, at least in qtwebengine. Im still getting segmentation faults on some web pages. For instance, when trying to open the chat on GMail/Hangouts, and in some other cases. I think that this is possibly a JavaScript issue. |
Did you apply this? I mean this cflag.
|
Locally, yes. That's an issue that's not musl specific, though. |
When using chromium, i got segfaults, either. But no effects to use.
Also i get these two:
|
@xhebox |
@lluixhi I'll take a look on it, and good news, i got 540 compiled and worked. The main changes are:
Detailed build file here |
Thanks! Some comments:
|
UPDATE: CONFIRMED
I've got the segfaults clearly, chromium failed to launch GPU process. Syscall trace there, it tried to open /run/shm, but it's not in the whitelist of sandbox. I've made a patch, testing. I want to know if your chromium open /run/shm, too? This could be a portability-patch for systems that let chromium open /run instead of /dev.
|
Found ffmpeg error in three bug reports in chromium, but seems it did not attract developer's attention. Maybe this is an 'excepted' error for chromium? |
About the ffmpeg bug: I fixed it with https://github.com/lluixhi/gentoo/blob/5a2e2775c6ebcab54d8cb88700bc585eed7853f1/dev-qt/qtwebengine/files/qtwebengine-5.7.0-fix-system-ffmpeg.patch I don't appear to have the /dev/shm /run/shm issue you're mentioning. I'm going to try chromium without a hardened kernel next to see if PaX is disabling something that is not covered by paxmarking. |
Strange, i'm using the same patch for ffmpeg....Maybe it's because of init's bug i solved yesterday. And thx for your feedbacks about shm, configure.ac said that xorg-server fallbacks by default to /run when building without specific configure. |
Can you please give chromium a revbump? I would like to give it another try :) |
@stefson @lluixhi chromium needs a fix patch with sandbox on 60 version:
if who needs patches and configurations that could pass the build directly: https://github.com/xhebox/noname-linux/blob/master/ports/chromium/Pkgfile be careful
|
to fix tab crashes, use patch from lluixhi/musl-extras#10 (comment) use various patches from fedora
Trying out the chromium patches, in the tcmalloc third party library I hit some usual
sys/types.h
silliness, followed by ammap()
redefinition. I can fix things up easy enough, but I am thinking I have probably dropped a stitch along the way in getting the environment right. I am using musl-1.1.15-r2.ebuild from the overlay. Any guesses on what I might have missed is appreciated.[edit] It looks like I have something set up wrong for sure, because HAVE_SYS_CDEFS_H is ending up defined somehow, and of course cdefs.h which doesn't exist on musl also fails.
The text was updated successfully, but these errors were encountered: