apologies ... very late ... will elaborate as needed tomorrow :-) i'm trying to build uWSGI on the ARM platform (Sheevaplug) and having problems with the python plugin. i don't actually need python (this instance is fastrouter to backend x86_64 instances), but i will soon.
compiling uWSGI with the python plugin embedded, any version, fails on internal bootstrap ... oddly enough, when compiled as a shared object/plugin it seems to work fine. output below shows failure and gdb backtrace for each major version. --------------------------- [2.6] python fails to initialize `BaseException`, because the macro PRE_INIT is failing the test ... if (PyType_Ready(&_PyExc_ ## TYPE) < 0) ... where TYPE == `BaseException`, the first one tried. http://svn.python.org/view/python/branches/release26-maint/Objects/exceptions.c?view=markup#l2078 --------------------------- # CFLAGS="-ggdb -O0" python2.6 uwsgiconfig.py --build # ./uwsgi --no-server --pyshell *** Starting uWSGI 1.0 (32bit) on [Sat Jan 21 04:03:34 2012] *** compiled with version: 4.4.5 on 21 January 2012 03:53:37 current working directory: /home/anthony/uwsgi/uwsgi-1.0.1 detected binary path: /home/anthony/uwsgi/uwsgi-1.0.1/uwsgi *** WARNING: you are running uWSGI without its master process manager *** your memory page size is 4096 bytes Python version: 2.6.6 (r266:84292, Dec 27 2010, 23:43:15) [GCC 4.4.5 20100902 (prerelease)] Fatal Python error: exceptions bootstrapping error. Aborted ### backtrace here ... post-abort() resulted in massive bogus list from libc? # gdb --args ./uwsgi --no-server --pyshell Breakpoint 1, Py_FatalError (msg=0x404fded0 "exceptions bootstrapping error.") at ../Python/pythonrun.c:1652 1652 ../Python/pythonrun.c: No such file or directory. in ../Python/pythonrun.c (gdb) bt #0 Py_FatalError (msg=0x404fded0 "exceptions bootstrapping error.") at ../Python/pythonrun.c:1652 #1 0x403eafec in _PyExc_Init () at ../Objects/exceptions.c:2078 #2 0x40495744 in Py_InitializeEx (install_sigs=1) at ../Python/pythonrun.c:227 #3 0x0005e7fc in uwsgi_python_init () at plugins/python/python_plugin.c:149 #4 0x0004cf2c in uwsgi_start (v_argv=0x9d2220) at uwsgi.c:2268 #5 0x0004b044 in main (argc=3, argv=0xbedc9304, envp=0xbedc9314) at uwsgi.c:1676 --------------------------- [3.1] python fails to initialize `BaseException` again, though i'm less sure what actually fails here. http://svn.python.org/view/python/branches/release31-maint/Python/errors.c?view=markup#l60 --------------------------- # CFLAGS="-ggdb -O0" python3.1 uwsgiconfig.py --build # ./uwsgi --no-server --pyshell *** Starting uWSGI 1.0 (32bit) on [Sat Jan 21 04:37:10 2012] *** compiled with version: 4.4.5 on 21 January 2012 04:31:04 current working directory: /home/anthony/uwsgi/uwsgi-1.0.1 detected binary path: /home/anthony/uwsgi/uwsgi-1.0.1/uwsgi *** WARNING: you are running uWSGI without its master process manager *** your memory page size is 4096 bytes Python version: 3.1.3 (r313:86834, Nov 28 2010, 13:39:35) [GCC 4.4.5] Segmentation fault # gdb --args ./uwsgi --no-server --pyshell Program received signal SIGSEGV, Segmentation fault. 0x4047f600 in PyErr_SetObject (exception=<unknown at remote 0x405f94b0>, value= u"type 'BaseException' participates in gc and is a base type but has inappropriate tp_free slot") at ../Python/errors.c:60 60 ../Python/errors.c: No such file or directory. in ../Python/errors.c (gdb) bt #0 0x4047f600 in PyErr_SetObject (exception=<unknown at remote 0x405f94b0>, value= u"type 'BaseException' participates in gc and is a base type but has inappropriate tp_free slot") at ../Python/errors.c:60 #1 0x4047f894 in PyErr_Format (exception=<unknown at remote 0x405f94b0>, format=0x405f2b8c "T\372$") at ../Python/errors.c:616 #2 0x4043189c in PyType_Ready (type=0x405fba34) at ../Objects/typeobject.c:3834 #3 0x403f5990 in _PyExc_Init () at ../Objects/exceptions.c:1953 #4 0x4049487c in Py_InitializeEx (install_sigs=1) at ../Python/pythonrun.c:241 #5 0x0005e9e0 in uwsgi_python_init () at plugins/python/python_plugin.c:149 #6 0x0004d058 in uwsgi_start (v_argv=0x1773220) at uwsgi.c:2268 #7 0x0004b170 in main (argc=3, argv=0xbeaa3304, envp=0xbeaa3314) at uwsgi.c:1676 --------------------------- ... i trying removing the symimporter, and all the subhandlers ... no dice. i'm in the process of learning C right now, on my own, so it's a bit hazy in places still; let me know what else you may need to debug, esp. considering this is an ARM build. it's running on a Vyatta OS build i recently ported to ARM, but 95% of the packages are vanilla, direct from Debian squeeze, it's upstream base ... i don't think it would be related at all. python itself is vanilla Debian. i mentioned it before, but if compiled as a plugin, and ran via: ### for whatever reason `--no-server` doesn't work here, uWSGI insisted i define a socket ... # ./uwsgi --plugins=python --pyshell --socket @null ... everything works fine (i get an interactive prompt at least). thanks for your time, -- C Anthony _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
