Page 1 of 2 1 2 LastLast
Results 1 to 15 of 18

Thread: Apache crash with Ice/PHP

  1. #1
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11

    Apache crash with Ice/PHP

    Hi,

    I'm experiencing a problem under Windows using Ice+PHP where Apache is crashing after the following sequence of calls

    $proxy = $ICE->stringToProxy($proxyString);
    if ($proxy)
    {
    $proxy->ice_ping(); // Crashes here
    }

    but only if the server that the proxy string refers to has died and been restarted and hence no longer contains the servant that the proxy refers to - if the server is running then there is no problem with this at all.

    The actual Apache crash happens in php5ts.dll having been called from php_ice.dll. I've also tried replacing the ice_ping() call with an ice_checkedCast() call and that gives exactly the same problem.

    Any thoughts?

    - Nigel Tyler.

  2. #2
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Could you perhaps copy/paste the stack trace of the crash?

    Cheers,
    Benoit.

  3. #3
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11

    Stack trace

    The stack trace from Apache is

    > php5ts.dll!019250b8()
    [Frames below may be incorrect and/or missing, no symbols loaded for php5ts.dll]
    php5ts.dll!019251b6()
    php_ice.dll!01e75758()
    php_ice.dll!01e76270()
    msvcrt.dll!75eb3525()
    msvcrt.dll!75eb34ef()
    msvcrt.dll!75eb3695()
    msvcrt.dll!75eb3ac5()
    msvcrt.dll!75eb3a56()
    msvcrt.dll!75eb390b()
    msvcrt.dll!75eb3881()
    ntdll.dll!775c5f79()
    ntdll.dll!775c5f4b()
    ntdll.dll!77599812()
    ntdll.dll!775c5dd7()
    kernel32.dll!75c4fbae()
    kernel32.dll!75c4fbae()
    kernel32.dll!75c4fbae()
    msvcrt.dll!75eb32ff()
    msvcrt.dll!75eb51ba()
    msvcrt.dll!75eb390b()
    msvcrt.dll!75eb3881()
    ntdll.dll!775c5f79()
    ntdll.dll!775c5f4b()
    ntdll.dll!77599812()
    ntdll.dll!775c5dd7()
    kernel32.dll!75c4fbae()
    kernel32.dll!75c4fbae()
    kernel32.dll!75c4fbae()
    ice33.dll!022f1b5c()
    ice33.dll!02339725()
    ice33.dll!0233df7c()
    stlport_vc646.dll!02018dc2()
    stlport_vc646.dll!020074fe()
    msvcrt.dll!75eb3525()
    msvcrt.dll!75eb34ef()
    msvcrt.dll!75eb3695()
    msvcrt.dll!75eb3ac5()
    msvcrt.dll!75eb3a56()
    msvcrt.dll!75eb390b()
    msvcrt.dll!75eb3881()
    ntdll.dll!775c5f79()
    ntdll.dll!775c5f4b()
    ntdll.dll!77599812()
    ntdll.dll!775c5620()
    kernel32.dll!75c59884()
    ntdll.dll!775c4810()
    mswsock.dll!75172a52()
    kernel32.dll!75c4fbae()
    kernel32.dll!75c4fbae()
    kernel32.dll!75c4fbae()
    libhttpd.dll!6ff22bbd()
    libhttpd.dll!6ff09786()
    libhttpd.dll!6ff0412f()
    libhttpd.dll!6ff04382()
    libhttpd.dll!6ff1c2ba()
    msvcrt.dll!75eb2599()
    msvcrt.dll!75eb26b3()
    kernel32.dll!75c5d0e9()
    ntdll.dll!775a19bb()
    ntdll.dll!775a198e()

    The actual error reported is

    The thread 'Win32 Thread' (0x3964) has exited with code 0 (0x0).
    Unhandled exception at 0x019250b8 in Apache.exe: 0xC0000005: Access violation reading location 0x00000018.

    Just as an experiment, I tried killing off the (Ice) server and refreshing the web page, which produced the expected communications exception. I then restarted the server and refreshed the page again - I was wondering if having detected a communication exception then a cache or whatever might have been flushed - but the exact same Apache crash happened again.

    Hope this helps!

    - Nigel.

  4. #4
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11

    A bit more information...

    I've been playing around a bit and have discovered that I get exactly the same symptoms (ie Apache crashes) if I deactivate the servant that the proxy refers to, so the problem doesn't seem to be only when the Ice server dies and is restarted...

    - Nigel.

  5. #5
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Which Ice version do you use? Did you check the note in the top-level README.txt file of your Ice binary distribution about the default apache stack size? A small stack size could explain these crashes.

    Cheers,
    Benoit.

  6. #6
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11
    I did indeed change the stack size, the report I currently get from dumpbin is

    100000 size of stack reserve
    1000 size of stack commit

    One difference is that for my version of apache (Apache/2.0.63, built Jan 17 2008 22:58:29) the executable is called "apache.exe" rather than "httpd.exe" - I hope this reflects nothing other a change of naming convention?

    - Nigel.

  7. #7
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11
    Benoit,

    I forgot to mention that I'm using Ice-3.3.1-VC60.

    - Nigel.

  8. #8
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11
    Hi Benoit,

    And yet one further thing: I have just tried a simple standalone command line PHP client (ie. no Apache involved) and get exactly the same problem...

    - Nigel.

  9. #9
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi Nigel,

    I tried to reproduce this situation in the following environment:
    • Windows XP
    • PHP 5.2.6
    • Ice 3.3.1 binary distribution for VC60
    I used the client in demophp/Ice/value for my tests and everything worked as I expected it to: the client receives ObjectNotExistException if the server is running but the servant is not active, and the client receives ConnectionRefusedException if the server is not running.

    For us to look into this issue any further, we would need a detailed description of your environment (i.e., versions of Windows and PHP), along with a small, self-contained example that reproduces the problem.

    Regards,
    Mark

  10. #10
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11
    Hi Marc,

    It does seem like it must be some sort of environmental issue. I'm running

    • Windows Vista (with all the latest service packs etc)
    • PHP-5.2.10 (binary distribution)
    • Ice 3.3.1 binary distribution for VC60

    The most significant difference would, on the face of it, seem to be the version of PHP (my 5.2.10 vs. your 5.2.6) but if the latter is still available from the PHP website then it's no longer a supported version. I don't suppose you have a version of ICE compiled for a later version of PHP do you?

    In the meantime I'll see if I can put together a small example than demonstrates the problem.

    Cheers,
    - Nigel.

  11. #11
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi,

    Although the PHP extension in the Ice 3.3.1 installer was compiled against PHP 5.2.6, it should be binary-compatible with subsequent PHP 5.2.x releases. I've just replaced PHP 5.2.6 with 5.2.10 in my test environment and it also works without problems.

    Regards,
    Mark

  12. #12
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    I also don't have any problems using Vista with the same software configuration (Ice 3.3.1 VC6 + PHP 5.2.10).

    Mark

  13. #13
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11
    Hi Mark,

    Thanks for that - I am now investigating by stripping everything down to basics!

    - Nigel.

  14. #14
    ntyler is offline Registered User
    Name: Nigel Tyler
    Organization: OCSL
    Project: Gateway to MIS system
    Join Date
    Aug 2009
    Posts
    11
    Mark,

    I really am a lost to explain this at the moment - I've been through and checked my PC's environment etc to try and remove anything that might be spurious, but to no avail.

    I'm going to have to get some sleep and think about this more!

    However, I do attach the minimal test system I've been using to reproduce the problem. It should be self explanatory, the server is implemented in Python (server.py), there is a client also written in Python (client.py) which acts as a sanity check, and there is a standalone PHP client which crashes if the "free()" call is left in.

    Cheers,
    - Nigel.
    Attached Files Attached Files

  15. #15
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Nigel,

    Your example worked correctly for me. Here's the output from the PHP client:

    Code:
    > php -c php.ini -f demo.php
    Bob The Builder
    Fatal error: Uncaught Ice_ObjectNotExistException
       identity: e3377c0f-a90a-490d-b464-c6c7bd7a559b
          facet:
      operation: getName
      thrown in demo.php on line 14
    I'm afraid I don't have an explanation for the behavior you're seeing either.

    Regards,
    Mark

Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. IcePHP on Apache 2 problem
    By supasteevo in forum Help Center
    Replies: 1
    Last Post: 04-23-2009, 02:52 AM
  2. silverlight and apache
    By fengshengheli in forum Help Center
    Replies: 1
    Last Post: 03-09-2009, 12:33 PM
  3. Ice Client + apache + Ice Server
    By fd98444 in forum Help Center
    Replies: 1
    Last Post: 02-21-2009, 04:22 PM
  4. how can construct apache +ice +mysql?
    By karlwu in forum Help Center
    Replies: 4
    Last Post: 08-21-2008, 07:55 AM
  5. Apache 2.0 License compatibility
    By aka50 in forum Comments
    Replies: 5
    Last Post: 11-17-2006, 08:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •