If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Fennec/Android with DMD can't load Gecko




4 years ago
4 years ago


(Reporter: bjacob, Unassigned)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [MemShrink:P2])


(1 attachment)

I just made a build of Fennec/Android with DMD and it can't load Gecko.

E/GeckoLibLoad( 6272): Couldn't get a handle to libxul!
E/GeckoLibLoad( 6272): Throw
W/dalvikvm( 6272): threadid=10: thread exiting with uncaught exception (group=0x40015560)
E/GeckoAppShell( 6272): java.lang.Exception: Error loading gecko libraries
E/GeckoAppShell( 6272):         at org.mozilla.gecko.mozglue.GeckoLoader.loadGeckoLibsNative(Native Method)
E/GeckoAppShell( 6272):         at org.mozilla.gecko.mozglue.GeckoLoader.loadGeckoLibs(GeckoLoader.java:251)
E/GeckoAppShell( 6272):         at org.mozilla.gecko.GeckoThread.initGeckoEnvironment(GeckoThread.java:65)
E/GeckoAppShell( 6272):         at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:94)

I just followed instructions on the wiki. I tried both a non-opt debug and a non-debug opt build. Both were clobber builds.

DMD would be very nice to investigate bug 869076.
Whiteboard: [MemShrink]
What does about:memory look like?  Is there actually high heap-unclassified?  kats is probably your best source of information about looking at Android memory usage, but it looks like he's away at the moment.

Comment 2

4 years ago
In the present bug, I can't even load Gecko at all, so in particular I don't have an about:memory. I'll try that on bug 869076 though.
My guess is that loading libdmd off /sdcard (which you fail to mention in this bug but i saw mentioned on irc) doesn't work because /sdcard is mounted noexec, which prevents libraries to be loaded from there. And since libxul depends on libdmd, failing to load libdmd means you can't load libxul.

Comment 4

4 years ago
I also tried with libdmd.so in /data/local with same results. (This is where gdbserver is, so it's got to be executable).
Add DEFINES += -DMOZ_DEBUG_LINKER=1 to mozglue/linker/Makefile.in, rebuild objdir/mozglue/linker and try again.
Whiteboard: [MemShrink] → [MemShrink:P2]

Comment 6

4 years ago
Unfortunately, I still get the same error.
erf, i forgot the most important: Attach the resulting logcat.

Comment 8

4 years ago
Created attachment 750587 [details]
logcat with MOZ_DEBUG_LINKER

Oh right, sorry :-) here is the resulting log.

My command line was:

adb shell am start -n org.mozilla.fennec_bjacob/.App --es  env0 MOZ_REPLACE_MALLOC_LIB=/data/local/libdmd.so --es env1 DMD=1

Comment 9

4 years ago
It says "couldn't find libdmd.so", yet my above am start command line has MOZ_REPLACE_MALLOC_LIB=/data/local/libdmd.so and there is a /data/local/libdmd.so on my device (with x permissions).
(In reply to Benoit Jacob [:bjacob] from comment #9)
> It says "couldn't find libdmd.so", yet my above am start command line has
> MOZ_REPLACE_MALLOC_LIB=/data/local/libdmd.so and there is a
> /data/local/libdmd.so on my device (with x permissions).

You should add some debugging log to replace_malloc_init_funcs to see if it
- it is run at all
- it loads libdmd.so successfully
You need to log in before you can comment on or make changes to this bug.