Closed tshirtman closed 11 years ago
fuck :(
yeah, i've been trying to look into it, but it's very hard to find which call causes this, i was thinking about building a debug distro to use with gdb-remote, but not much time today for this.
Means... any current modules loaded with dlopen failed right now? That's a big issue. So not the one with libpymodules i guess, but the one outside it? Do you have a full log (from the first install / decompression?)
what's weird is that only my service crash, my interface works perfectly, so i think it's not all dlopen. I'll post a more complete log.
Is this a problem only when compiling with with API 18, or for people running Android 4.3?
On Mon, Jul 29, 2013 at 8:19 AM, Mathieu Virbel notifications@github.comwrote:
Means... any current modules loaded with dlopen failed right now? That's a big issue. So not the one with libpymodules i guess, but the one outside it? Do you have a full log (from the first install / decompression?)
— Reply to this email directly or view it on GitHubhttps://github.com/kivy/python-for-android/issues/141#issuecomment-21715930 .
Ben Rousch brousch@gmail.com http://clusterbleep.net/
I guess people who run android 4.3.
My current analysis is: stringprep.py line 8 refers to from unicodedata import ucd_3_2_0 as unicodedata
. unicodedata.so is imported via _PyImport_GetDynLoadFunc
. So it will rely on the call:
handle = dlopen(pathname, dlopenflags);
The dlopenflags
is initialized to 0, and set to:
dlopenflags = PyThreadState_GET()->interp->dlopenflags;
Which is set by default to:
build/hostpython/Python-2.7.2/Python/pystate.c:80: interp->dlopenflags = RTLD_NOW;
build/hostpython/Python-2.7.2/Python/pystate.c:82: interp->dlopenflags = RTLD_LAZY;
OR, set manually by sys.setdlopenflags()
.
The flags accepted by Android 4.3 are checked from this commit: https://android.googlesource.com/platform/bionic/+/e66190d%5E%21/#F1 | relevant part:
+ if ((flags & ~(RTLD_NOW|RTLD_LAZY|RTLD_LOCAL|RTLD_GLOBAL)) != 0) {
+ DL_ERR("invalid flags to dlopen: %x", flags);
+ return NULL;
+ }
Somewhere, somebody changed the flags, and set a wrong value?
my full log from uninstall/reinstall to crash http://paste.ubuntu.com/5925088/
and yeah, i found about as much, though was not sure who loaded the .so (__PyImport_GetDynLoadFunc ok), maybe the values of the declarations changed, because the constants seems to be the same.
I really hope it's not that... because it would be ÜBER SILLY
On linux:
#define RTLD_LAZY 0x00001 /* Lazy function call binding. */
#define RTLD_NOW 0x00002 /* Immediate function call binding. */
#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
#define RTLD_NOLOAD 0x00004 /* Do not load the object. */
#define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
#define RTLD_GLOBAL 0x00100
#define RTLD_LOCAL 0
#define RTLD_NODELETE 0x01000
On android:
enum {
RTLD_NOW = 0,
RTLD_LAZY = 1,
RTLD_LOCAL = 0,
RTLD_GLOBAL = 2,
};
Still, during compilation, the flags should be set to the right value.....
invalid flags to dlopen: 102
-> the value is hex, so for the linux way, it should mean:RTLD_GLOBAL | RTLD_NOW
.
Values are set manually somewhere.
e9875e4 - fixed.
when my import import sleekxmpp in my service, i get a dlopen error
this was working just last week, and there was no major change in my code, so i though it could come from my android upgrade to 4.3… and bingo, there is indeed a change about this: http://www.funkyandroid.com/aosp-JDQ39-JWR66V.html "e66190d : Check for unknown flags passed to dlopen(3)."