Home Bug Reports

CtrlCHandler hanging

garrygarry Member
I’m using Ice 2.1.0 on SusSE 9, AMD64. My application extends Ice::Application. When I specify wrong name in –Ice.Config= option it prints “syscall exception: No such file or directory” and hangs. I found that CtrlCHandler destructor is blocked in pthread_join(). After updating Application.app with adding


if(_ctrlCHandler.get() != 0) {
ignoreInterrupt();
_ctrlCHandler.reset();
}


after last catch(…) and commenting out those strings under

if(_communicator)
{


everyting works fine

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    I tried to reproduce this problem using Ice 2.1.2 on RedHat Linux, but no hang occurred when I specified an invalid filename for --Ice.Config.

    Do you have a small example that we can use to reproduce this behavior?

    Take care,
    - Mark
  • garrygarry Member
    No, it's combination of linking with JVM and Oracle's OCI and from my current experience sometimes RedHat/32 != SuSE/64 in signal handling. Anyway, why don't you keep symmetry in working with _ctrlCHandler? You can create it without _communicator being initialized. Nevertheless you destroy it only having valid _communicator pointer.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Garry,

    This is indeed a bug: the Application::main() function must clean up its CtrlCHander in all circumstances.

    On Linux and Unix, the CtrlCHandler starts a thread (waiting on sigwait); it's good to stop and join this thread before static destruction.

    Thanks for the bug report; it will be fixed in the next Ice release.

    Bernard
Sign In or Register to comment.