Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Open

Sandboxing problems when running under a parallel-installed glibc?

RJVB

I run Firefox on a retro Linux system that is currently running a personal "Frankenbuntu". Basically, Kubuntu 14.04 LTS with lots of components updated either "in-tree" or via a pkgsrc-like collection of "ports" installed under /opt/local that includes GTk3, Mesa, VAAPI plugins etc. I use that tree with a combination of built-in rpath settings (for apps installed under /opt/local) and wrapper scripts setting LD_LIBRARY_PATH, so as to maintain the possibility to run system apps independently, in particular while booting. (Sounds complicated, but it's also a rewarding fun project for me, allowing me to keep using an old and familiar DE with modern features on 2017 hardware,)

I have never yet dared to update my glibc from the stock 2.19, so with every Firefox update I fear to run into problems with that. I do have a 2.27 build but that is installed in another parallel prefix (/opt/glibc/2) because one cannot simply use LD_LIBRARY_PATH to use a newer glibc (I think because the ELF interpreter, ld-linux.so, has to match).

I already use patchelf with success to change the ELF interpreter to the 2.27 one, for instance with Ferdium, a Node/Electron application. This works and as far as I can tell, it will load all Mesa and DRI components from my /opt/local tree so hw-accelerated video works as it should.

But when I try this with Firefox, I get what appears to be a sandboxing issue when attempts are made to load Mesa DRI libraries: ``` libva info: VA-API version 1.24.0 libva info: Trying to open /opt/local/lib/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_23 [GFX1-]: VideoBridgeParent receives IPC close with reason=AbnormalShutdown MESA-LOADER: failed to open iris: libsensors.so.4: cannot open shared object file: Permission denied (search paths /opt/local/lib/dri, suffix _dri) failed to load driver: iris MESA-LOADER: failed to open kms_swrast: libsensors.so.4: cannot open shared object file: Permission denied (search paths /opt/local/lib/dri, suffix _dri) failed to load driver: kms_swrast MESA-LOADER: failed to open swrast: libsensors.so.4: cannot open shared object file: Permission denied (search paths /opt/local/lib/dri, suffix _dri) failed to load swrast driver libva info: VA-API version 1.24.0 libva info: Trying to open /opt/local/lib/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_23 [GFX1-]: VideoBridgeParent receives IPC close with reason=AbnormalShutdown ``` Copying libsensors into /opt/local/lib turns the above error into the same one about the next library available in the system (/lib/x86_64-linux-gnu/libtinfo.so.5). The DRI module I actually need (iHD) does load but I still get the GFX abnormal shutdown error. I've tried the interpreter change in other applications using libva and don't see the issue.

I do see this in the syslog: ``` Aug 31 15:18:47 Bmbl kernel: [2043645.959690] MediaSu~isor #1[17692]: segfault at 290 ip 00007f2b0815b284 sp 00007f2ad913e990 e rror 4 in ld-2.29.so[7f2b0814f000+21000] Aug 31 15:18:47 Bmbl kernel: [2043645.959702] Code: 04 49 83 fc 06 44 0f 44 c8 81 e6 ff 7f 00 00 45 89 8f 08 04 00 00 48 8d 04 76 4d 89 b7 00 04 00 00 4c 8d 04 c7 4d 85 c0 74 0f <41> 8b 48 08 b8 00 00 00 00 85 c9 4c 0f 44 c0 41 8b 3e 6a 00 48 8d Aug 31 15:18:47 Bmbl kernel: [2043646.080407] MediaSu~isor #1[17732]: segfault at 290 ip 00007f2b0815b284 sp 00007f2ad913e990 e rror 4 in ld-2.29.so[7f2b0814f000+21000] ```

Any idea why this is, and what can be done to prevent this, beyond actually updating my system glibc? I'd have no problems disabling sandboxing.

I run Firefox on a retro Linux system that is currently running a personal "Frankenbuntu". Basically, Kubuntu 14.04 LTS with lots of components updated either "in-tree" or via a pkgsrc-like collection of "ports" installed under /opt/local that includes GTk3, Mesa, VAAPI plugins etc. I use that tree with a combination of built-in rpath settings (for apps installed under /opt/local) and wrapper scripts setting LD_LIBRARY_PATH, so as to maintain the possibility to run system apps independently, in particular while booting. (Sounds complicated, but it's also a rewarding fun project for me, allowing me to keep using an old and familiar DE with modern features on 2017 hardware,) I have never yet dared to update my glibc from the stock 2.19, so with every Firefox update I fear to run into problems with that. I do have a 2.27 build but that is installed in another parallel prefix (/opt/glibc/2) because one cannot simply use LD_LIBRARY_PATH to use a newer glibc (I think because the ELF interpreter, ld-linux.so, has to match). I already use patchelf with success to change the ELF interpreter to the 2.27 one, for instance with Ferdium, a Node/Electron application. This works and as far as I can tell, it will load all Mesa and DRI components from my /opt/local tree so hw-accelerated video works as it should. But when I try this with Firefox, I get what appears to be a sandboxing issue when attempts are made to load Mesa DRI libraries: ``` libva info: VA-API version 1.24.0 libva info: Trying to open /opt/local/lib/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_23 [GFX1-]: VideoBridgeParent receives IPC close with reason=AbnormalShutdown MESA-LOADER: failed to open iris: libsensors.so.4: cannot open shared object file: Permission denied (search paths /opt/local/lib/dri, suffix _dri) failed to load driver: iris MESA-LOADER: failed to open kms_swrast: libsensors.so.4: cannot open shared object file: Permission denied (search paths /opt/local/lib/dri, suffix _dri) failed to load driver: kms_swrast MESA-LOADER: failed to open swrast: libsensors.so.4: cannot open shared object file: Permission denied (search paths /opt/local/lib/dri, suffix _dri) failed to load swrast driver libva info: VA-API version 1.24.0 libva info: Trying to open /opt/local/lib/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_23 [GFX1-]: VideoBridgeParent receives IPC close with reason=AbnormalShutdown ``` Copying libsensors into /opt/local/lib turns the above error into the same one about the next library available in the system (/lib/x86_64-linux-gnu/libtinfo.so.5). The DRI module I actually need (iHD) does load but I still get the GFX abnormal shutdown error. I've tried the interpreter change in other applications using libva and don't see the issue. I do see this in the syslog: ``` Aug 31 15:18:47 Bmbl kernel: [2043645.959690] MediaSu~isor #1[17692]: segfault at 290 ip 00007f2b0815b284 sp 00007f2ad913e990 e rror 4 in ld-2.29.so[7f2b0814f000+21000] Aug 31 15:18:47 Bmbl kernel: [2043645.959702] Code: 04 49 83 fc 06 44 0f 44 c8 81 e6 ff 7f 00 00 45 89 8f 08 04 00 00 48 8d 04 76 4d 89 b7 00 04 00 00 4c 8d 04 c7 4d 85 c0 74 0f <41> 8b 48 08 b8 00 00 00 00 85 c9 4c 0f 44 c0 41 8b 3e 6a 00 48 8d Aug 31 15:18:47 Bmbl kernel: [2043646.080407] MediaSu~isor #1[17732]: segfault at 290 ip 00007f2b0815b284 sp 00007f2ad913e990 e rror 4 in ld-2.29.so[7f2b0814f000+21000] ``` Any idea why this is, and what can be done to prevent this, beyond actually updating my system glibc? I'd have no problems disabling sandboxing.

All Replies (3)

On x86 the stock 2.19 is sufficient. The requirement is 2.17 and up, with 2.2x only required for arm64: firefox.com/firefox/150.0/system-requirements/

jbr said

On x86 the stock 2.19 is sufficient. The requirement is 2.17 and up

Yes, for now ... I like to have contingencies in place, but also to understand what's going wrong here.

According to those syslog entries something is actually crashing in my glibc build. It seems unlikely that that's the cause of the EPERM reported by Mozilla/Mesa, but also like something that shouldn't happen either way (esp. not if ever I update my system glibc).

(FWIW: I took the glibc sources from an official Ubuntu package, with their patches.)

Modified by RJVB

The issue seems to disappear when I set `MOZ_DISABLE_RDD_SANDBOX=1`, i.e. disable the data recorder sandbox. No more errors on the calling terminal, and no crash reports in the syslog either.

Somehow that still leaves an effect on playback of A'zon Prime videos ("limited to standard resolution" because not all requirements are met?!), but I suppose that's still better than nothing when sh*t starts to hit the fan.

EDIT: it's enough also to set `media.ffmpeg.vaapi.enabled=false` but at least in that case I no longer get audio on A'zon Prime.

FWIW, I can provoke a similar segfault in the system ld-linux.so when I add my newer glibc install path to `LD_LIBRARY_PATH`. I suppose it stands to reason that the same happens when my new ld-linux.so is forced to work with the older system libc .But why would that happen, is there code that loads libc.so.6 explicitly/dynamically?

Modified by RJVB

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.