Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836872 - dev-libs/gjs-1.70.1: Fails to emerge on musl profile due to not passing "SpiderMonkey sanity check"
Summary: dev-libs/gjs-1.70.1: Fails to emerge on musl profile due to not passing "Spid...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2022-04-06 05:21 UTC by listout
Modified: 2022-07-23 19:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,6.57 KB, text/plain)
2022-04-06 05:26 UTC, listout
Details
meson build log for gjs (build.log,4.98 KB, text/plain)
2022-04-06 05:26 UTC, listout
Details
meson-log (meson-log.txt,29.98 KB, text/plain)
2022-04-06 05:28 UTC, listout
Details

Note You need to log in before you can comment on or make changes to this bug.
Description listout 2022-04-06 05:21:58 UTC
On musl profile gjs, which is a part of gnome-light meta package, fails to emerge due to not passing "SpiderMonkey sanity check". SpiderMonkey itself builds fine. I tried to find if there exists a SpiderMonkey in ::musl (maybe with some patches) but couldn't find any.

I'm willing to work on this bug, but I'm new and I'm confused whether the bug is with gjs or SpiderMonkey.

There was similar bug report before (bug #821694) but was closed due to insufficient info.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-libs/gjs on musl profile and musl overlay enabled.
Actual Results:  
Failed to emerge dev-libs/gjs-1.70.1

Expected Results:  
Successfully emerge dev-libs/gjs
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-06 05:24:51 UTC
Can you attach the full build.log, emerge --info, and the meson-log?
Comment 2 listout 2022-04-06 05:26:00 UTC
Created attachment 768928 [details]
emerge --info
Comment 3 listout 2022-04-06 05:26:35 UTC
Created attachment 768930 [details]
meson build log for gjs
Comment 4 listout 2022-04-06 05:28:59 UTC
Created attachment 768932 [details]
meson-log
Comment 5 listout 2022-04-06 05:31:43 UTC
Sam, sorry. I made the previous log (not the full one) obsolete. Do I need to reattact that log?
Comment 6 listout 2022-04-06 05:33:48 UTC
(In reply to Sam James from comment #1)
> Can you attach the full build.log, emerge --info, and the meson-log?

Done
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-06 05:33:56 UTC
(In reply to listout from comment #5)
> Sam, sorry. I made the previous log (not the full one) obsolete. Do I need
> to reattact that log?

No need :)

This is what happened when it tried to build a small test program against SM:
"""
Program stderr:

libsandbox:  Can't resolve mmap: Symbol not found: mmap
Redirecting call to abort() to mozalloc_abort
"""
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-06 05:36:39 UTC
This will need more debugging than I can do on mobile. For now, hints:
1. Is spidermonkey built with jemalloc for you? (I'm guessing no?)
2. Does it work without sandbox? (FEATURES="-sandbox -usersandbox", I'm guessing no, this is a workaround not a fix anyway but it'll be interesting)
Comment 9 listout 2022-04-06 05:39:58 UTC
(In reply to Sam James from comment #8)
> This will need more debugging than I can do on mobile. For now, hints:
> 1. Is spidermonkey built with jemalloc for you? (I'm guessing no?)
> 2. Does it work without sandbox? (FEATURES="-sandbox -usersandbox", I'm
> guessing no, this is a workaround not a fix anyway but it'll be interesting)

I'll try experimenting with these. Thanks for tips. 

You're correct spidermonkey is not build with jemalloc for me, I'll try the second tip and see what happens.
Comment 10 listout 2022-04-07 05:53:35 UTC
I did a little bit of research about the spidermonkey and gjs packages, especially from other distrinutions using musl. Apline seems to provdide some patches for musl and silencing sandbox violation, I'm not sure if they apply to Gentoo.

Link to the patches:

https://git.alpinelinux.org/aports/tree/community/mozjs78?h=master
Comment 11 listout 2022-04-07 05:54:28 UTC
(In reply to listout from comment #10)
> I did a little bit of research about the spidermonkey and gjs packages,
> especially from other distrinutions using musl. Apline seems to provdide
> some patches for musl and silencing sandbox violation, I'm not sure if they
> apply to Gentoo.
> 
> Link to the patches:
> 
> https://git.alpinelinux.org/aports/tree/community/mozjs78?h=master

Especially this one: https://git.alpinelinux.org/aports/tree/community/mozjs78/0001-silence-sandbox-violations.patch
Comment 12 listout 2022-07-23 18:51:54 UTC
Sam, can you please close this issue. The issues does not exists with newer versions
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-23 19:17:52 UTC
(In reply to listout from comment #12)
> Sam, can you please close this issue. The issues does not exists with newer
> versions

sure!