PHP Ice_initialize() hangs

xoraxxorax Member Ivan BrykovOrganization: Opticsplanet inc
Hi,

My situation: FreeBSD 8.0; Ice-3.4.1 compiled from sources; Python binding works fine.

But in PHP any script with ICE hangs on ice_initialize() call.
No error/warning/notice messages.

I understand that FreeBSD is not supported. Nevertheless, maybe someone would have some ideas.

Thanks!

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You should attach to the PHP process with the debugger and get a stack trace of the process when it hangs. This might give you some clues on the origin of the hang.

    Cheers,
    Benoit.
  • xoraxxorax Member Ivan BrykovOrganization: Opticsplanet inc
    benoit wrote: »
    Hi,

    You should attach to the PHP process with the debugger and get a stack trace of the process when it hangs. This might give you some clues on the origin of the hang.

    Cheers,
    Benoit.

    Do you mean high-level debugger like xdebug or some low-level debugger? To use the latter my PHP and ICE have to be compiled in debug mode, as far as I understand.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    I mean a debugger such as gdb. Yes, it's best if the programs are compiled with debug information but on most platform you can also see some basic symbol information (function names) for programs compiled without debug.

    Cheers,
    Benoit.
  • xoraxxorax Member Ivan BrykovOrganization: Opticsplanet inc
    benoit wrote: »
    Hi,

    I mean a debugger such as gdb. Yes, it's best if the programs are compiled with debug information but on most platform you can also see some basic symbol information (function names) for programs compiled without debug.

    Cheers,
    Benoit.

    It seems like execution freezes on the following:
    #0  0x292d11c7 in __error () from /lib/libthr.so.3
    #1  0x292d0fdb in __error () from /lib/libthr.so.3
    #2  0x292d3ee0 in _thread_state_running () from /lib/libthr.so.3
    #3  0x00000011 in ?? ()
    #4  0x00000000 in ?? ()
    #5  0x00000000 in ?? ()
    #6  0x00000000 in ?? ()
    #7  0x00040004 in ?? ()
    #8  0x2860b358 in ?? () from /libexec/ld-elf.so.1
    #9  0x286197a0 in ?? ()
    #10 0x28dca140 in ?? ()
    #11 0x086074b4 in ?? ()
    #12 0xbfbfcbc8 in ?? ()
    #13 0x292cb7a7 in pthread_mutex_getyieldloops_np () from /lib/libthr.so.3
    #14 0x00018d5d in ?? ()
    #15 0x2861d340 in ?? ()
    #16 0x00018d5d in ?? ()
    #17 0x292dea48 in ?? () from /usr/lib/libstdc++.so.6
    #18 0x28c9fa00 in ?? ()
    #19 0x00d9dbfb in ?? ()
    #20 0x292d2b94 in ?? () from /lib/libthr.so.3
    #21 0x00000000 in ?? ()
    #22 0x28dca140 in ?? ()
    #23 0xbfbfcbe8 in ?? ()
    #24 0x292cc0cf in pthread_mutex_trylock () from /lib/libthr.so.3
    

    As far as I understand, it's about FreeBSD threads implementation. Are there any chances to workaround it?
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    I'm afraid there's isn't enough information from this stack to figure out where the problem could come from... You'll need to re-compile Ice with debug information and run the test suites to see what works and what doesn't.

    Cheers,
    Benoit.
  • grembogrembo Member Michael GmelinOrganization: Grem Equity GmbHProject: E-Commerce platform
    Hi Ivan,

    is this on i386 or on amd64 (I had similar issues in the past and could solve them somehow, can't recall exactly how right now). Also, are you using IceSSL?

    A very possible issue is that your libphp is not linked against libthread. I contributed to a thread showing that problem a while ago, see: http://www.zeroc.com/forums/help-center/4291-php5-ice-freebsd-7-1-a.html

    As a result of this thread (at least I want to think so) the php5 port has a new configuration option now.

    So you should make sure to select the LINKTHR when installing lang/php5

    (e.g. cd /usr/ports/lang/php5; make config; make install).

    See the attached screenshot (highlighted option). This should fix the issue.
Sign In or Register to comment.