php/lsapi crash since 5.2.9

Discussion in 'Bug Reports' started by jrmarino, Jan 17, 2010.

  1. jrmarino

    jrmarino Well-Known Member

    Hi, my solaris 10 and openSolaris (nevada) servers have been running php 5.2.8 for a year using lsapi 4.8.

    Today I attempted to upgrade php to 5.2.12. I also tried to upgrade to lsapi 5.0. The php file runs fine in "cli" mode, but it crashes when spawned. I'd seen this before, it was caused by one of the extensions and I just removed it. But I need all the extensions, so I need to know how to figure out what's causing this lsapi crash. I don't know what logs to look at.

    I built all the releases, here are the results:

    php 5.2.8 with lsapi 4.8 -- works
    php 5.2.8 with lsapi 5.0 -- works
    php 5.2.9 with lsapi 5.0 -- works
    php 5.2.10 with lsapi 5.0 -- crashes
    php 5.2.11 with lsapi 5.0 -- crashes
    php 5.2.12 with lsapi 4.8 -- crashes
    php 5.2.12 with lsapi 5.0 -- crashes

    Please help. This has been a fairly frequent issue with the php executable that I compile, and I'd like to be able to upgrade to the latest version of php.
  2. mistwang

    mistwang LiteSpeed Staff

  3. jrmarino

    jrmarino Well-Known Member

    mistwang, I'd like to try this, but the instructions in post 18063 don't seem to apply to me.

    I'm compiling PHP from scratch, using the PHP source code and putting the "litespeed" directory in the sapi directory of PHP, and compiling "--with-litespeed". I have never used lsws for building PHP.

    Given that, I don't know how to turn on version 5.1 during compilation since I don't use the "" file.
  4. NiteWave

    NiteWave Administrator

    for manual build, if sapi/litespeed is lsapi 5.1, that's OK. is used by lsws web admin console to build php.
  5. jrmarino

    jrmarino Well-Known Member

    Well, I don't have the source code for LSAPI 5.1.

    Where can I download it?
  6. jrmarino

    jrmarino Well-Known Member

    Oh, I see the downloads page was updated yesterday with version 5.1. It wasn't there in the morning.

    That was my confusion -- you were talking about 5.1 when it didn't seem to be generally available!
  7. jrmarino

    jrmarino Well-Known Member

    Okay, I compiled 5.2.12 with LSAPI 5.1

    No luck.
    When I spawn lsapi, the lsphp process stays up. But as soon as I start the webserver, the lsphp process crashes. I'm using LSWS 3.3.23
  8. mistwang

    mistwang LiteSpeed Staff

    Do you use any opcode cache like eaccelerator? you may need to disable it with 5.2.12 .
  9. jrmarino

    jrmarino Well-Known Member

    I use APC with solaris 10, but the opensolaris server (my dev server) doesn't have any accelerator. So while APC may cause a crash, it's not causing this one because it's not on the server.

    Is there any way to narrow down which extension is causing the crash (other than compiling dozens of times by removing extensions)? Is there any way to turn on any kind of logging or dump that could help you out?
  10. mistwang

    mistwang LiteSpeed Staff

    If you can make lsphp5 dump a core file, it will help.
    You need to add LSAPI_ALLOW_CORE_DUMP in lsphp5 env.

    ulimit -c should be high enough, the user that PHP run as should be able to write to that directory. And use "coreadm" command to manage core dump.
  11. jrmarino

    jrmarino Well-Known Member

    Sorry, I can't get it to dump.
    It crashes before it gets to running a PHP script.
    If I start spawning first, it runs until I start litespeed. If I start litespeed first, and then spawn, it appears to crash immediately.
  12. jrmarino

    jrmarino Well-Known Member

    FYI, I got these messages during the "make install" process:

    I don't recall these coming up yesterday.
  13. mistwang

    mistwang LiteSpeed Staff

    We tried PHP 5.2.12 + LSAPI 5.1 in our Solaris 10u2 VM, with option "--disable-all", seems working fine, phpinfo() page load fine.
  14. jrmarino

    jrmarino Well-Known Member

    I don't have such luck.

    That's the command line output of ./lsphp -i, but it won't run inside litespeed.
    Maybe there's a library difference causing this? Are you aware of any increased requirements between 5.2.9 (the last version that works for me) and later versions of php?
  15. mistwang

    mistwang LiteSpeed Staff

    change configuration of lsphp5 to "Run on start up". so, when LSWS starts it will run lsphp5 immediately without sending any request.
    Then you can "strace" or "truss" the process to find out what happened. You can need to add option to follow child process.
  16. jrmarino

    jrmarino Well-Known Member

    Do you mean to turn off the spawning and have litespeed control lsphp?
    I'm not very familiar with strace or truss, you're starting to get outside my realm of capability unfortunately...
  17. mistwang

    mistwang LiteSpeed Staff

    If you use a third party FCGI spawner, then that's fine. you can strace/truss the running lsphp5 process, make sure to add parameter to follow child process in command line.
    strace/truss just show the system call made by the process, nothing fancy.
  18. piper

    piper Well-Known Member

    Experience the same thing, XCACHE, SUHOSIN, 5.3.1, LSAPI 5.1

    Load usually stays around 1.x to 2.x, but since upgrade it goes up to 4.x to 6.x

    Switch back to PHP 5.2.9 and LSAPI 5.1, XCACHE, SUHOSIN, load dropped again to 1.x and 2.x

    Litespeed crashed randomly using PHP 5.3.1
  19. mistwang

    mistwang LiteSpeed Staff

    I think PHP 5.3.1 is too new to be as stable. No something really wrong in LiteSpeed.
  20. jrmarino

    jrmarino Well-Known Member

    Hi Mistwang, I tried "Truss" on opensolaris with -f child follow option. This output doesn't tell me anything, how about you? It was polling the spawned process fine until I started LSWS and tried to access a php page.


Share This Page