Closed Bug 1592232 Opened 6 years ago Closed 6 years ago

Fenix crashes loading libglean_ffi.so on old Android because `stderr` can't be found

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: janerik)

Details

(Whiteboard: [telemetry:glean-rs:m?])

Attachments

(2 files)

See https://sentry.prod.mozaws.net/operations/fenix-nightly/issues/6530359/?query=is:unresolved%20glean

UnsatisfiedLinkError

Unable to load library 'glean_ffi':
dlopen failed: cannot locate symbol "stderr" referenced by "libglean_ffi.so"...
dlopen failed: cannot locate symbol "stderr" referenced by "libglean_ffi.so"...
dlopen failed: cannot locate symbol "stderr" referenced by "/data/app/org.mozilla.fenix.nightly-1/lib/arm64/libglean_ffi.so"...
Native library (android-aarch64/libglean_ffi.so) not found in resource path (.)

    com.sun.jna.NativeLibrary in loadLibrary at line 69

I tracked this down by reducing our source code bit by bit.
Turns out: lmdb (as compiled by lmdb-rkv-sys) is the culprit by writing to stderr on asserts: https://github.com/mozilla/lmdb/blob/b7df2cac50fb41e8bd16aab4cc5fd167be9e032a/libraries/liblmdb/mdb.c#L1532-L1540

This can be fixed by compiling with NDEBUG

Attached file GitHub Pull Request

This compiles lmdb through lmdb-rkv-sys with NDEBUG

Attached file Glean PR

We ended up fixing this in our build environment for now

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: