Open Bug 871787 Opened 11 years ago Updated 2 years ago

Fennec/Android with DMD can't load Gecko

Categories

(Core :: DMD, defect)

ARM
Android
defect

Tracking

()

People

(Reporter: bjacob, Unassigned)

References

Details

(Whiteboard: [MemShrink:P2])

Attachments

(1 file)

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): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 12 ("Gecko")
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.
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.
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]
Unfortunately, I still get the same error.
erf, i forgot the most important: Attach the resulting logcat.
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
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
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: