On Sat, Mar 3, 2012 at 9:52 PM, Charles <[email protected]> wrote:
> On Sat, Mar 3, 2012 at 9:38 PM, Roberto De Ioris <[email protected]> wrote:
>>
>>> On Sat, Mar 3, 2012 at 7:48 PM, Roberto De Ioris <[email protected]> wrote:
>>>>
>>>> Il giorno 03/mar/2012, alle ore 12:19, Charles ha scritto:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have just compiled uwsgi and its php plugin from git source with PHP
>>>>> 5.4 (I need to replace function_entry with zend_function_entry to make
>>>>> it compile successfully), and then I tried to run a simple script
>>>>> showing phpinfo().
>>>>> The info page was being displayed (got Server API = uWSGI/php
>>>>> displayed in the page) but uwsgi got segmentation fault. Here are the
>>>>> log lines
>>>>>
>>>>> !!! uWSGI process 21330 got Segmentation Fault !!!
>>>>> *** backtrace of 21330 ***
>>>>> /opt/uwsgi/bin/uwsgi(uwsgi_backtrace+0x28) [0x8078778]
>>>>> /opt/uwsgi/bin/uwsgi(uwsgi_segfault+0x2a) [0x807886a]
>>>>> [0xb7778400]
>>>>> /opt/uwsgi/plugins/php_plugin.so(uwsgi_php_after_request+0x1b)
>>>>> [0xb7772a5b]
>>>>> /opt/uwsgi/bin/uwsgi(uwsgi_close_request+0x136) [0x80572f6]
>>>>> /opt/uwsgi/bin/uwsgi(simple_loop+0x155) [0x8073cd5]
>>>>> /opt/uwsgi/bin/uwsgi(uwsgi_ignition+0x16a) [0x8078caa]
>>>>> /opt/uwsgi/bin/uwsgi(uwsgi_start+0x2899) [0x807be29]
>>>>> /opt/uwsgi/bin/uwsgi(main+0x1008) [0x8056388]
>>>>> /lib/libc.so.6(__libc_start_main+0xf3) [0xb7383483]
>>>>> /opt/uwsgi/bin/uwsgi() [0x8056461]
>>>>> *** end of backtrace ***
>>>>>
>>>>>
>>>>
>>>> Be sure to run a make clean, before building the core and the plugin:
>>>>
>>>> make clean
>>>> make
>>>> python uwsgiconfig.py --plugin plugins/php
>>>
>>> I did. By the way, when compiling the plugin, the uwsgiconfig.py
>>> script always pick the default buildconf, not the one I use when
>>> compiling the core, even when I have put the env in the command line.
>>> Would that cause a problem?
>>
>>
>> Can you paste the full sequence of commands ?
>>
>> If you use a different profile for plugins, crashes will come all over the
>> place.
>
> Here are the commands I use when compiling uwsgi
>
> python2 uwsgiconfig.py --clean
> CFLAGS='' UWSGI_PROFILE=hitachi python2 uwsgiconfig.py --build
> CFLAGS='' UWSGI_PROFILE=hitachi UWSGICONFIG_PHPDIR=/opt/php54
> UWSGICONFIG_PHPPATH=/opt/php54/bin/php-config python2 uwsgiconfig.py
> --plugin plugins/php
>
> A little note, archlinux uses python 3 as default python version, so I
> need to use python2 explicitly.
>
> The output from the last command
>
> using profile: buildconf/default.ini
> detected include path:
> ['/usr/lib/gcc/i686-pc-linux-gnu/4.6.2/include', '/usr/local/include',
> '/usr/lib/gcc/i686-pc-linux-gnu/4.6.2/include-fixed', '/usr/include']
> *** uWSGI building and linking plugin plugins/php ***
> [gcc -pthread] ./php_plugin.so
> *** php plugin built and available in ./php_plugin.so ***
>
> So I look a bit into uwsgiconfig.py and found in line 948-949
>
> elif cmd == '--plugin':
>        bconf = 'default.ini'
>
> So it seems the profile is indeed being hardcoded when building plugin.

Hi,

I have just recompiled uwsgi and the problem is gone. Here are the
commands I use

# python2 uwsgiconfig.py --clean
# UWSGI_PROFILE=hitachi.ini python2 uwsgiconfig.py --build
# UWSGI_PROFILE=hitachi.ini UWSGICONFIG_PHPDIR=/opt/php54
UWSGICONFIG_PHPPATH=/opt/php54/bin/php-config python2 uwsgiconfig.py
--plugin plugins/php

I have edited uwsgiconfig.py to pick the profile name from the env.
And I have added .ini extension to the env (UWSGI_PROFILE=hitachi.ini,
previously it was only UWSGI_PROFILE=hitachi). So I suppose the
problem is indeed caused by mismatched profile.

Thanks a lot for your help.
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to