[omniORB] threads

Jo Skjermo Jo.Skjermo@idi.ntnu.no
Mon, 9 Apr 2001 11:53:53 +0200 (MET DST)


Hi.

I have a problems with what i "think" is threads. My smal server crashes
when 2 clients on different machines run my "stress-test", witch is
a simple program sending request for a methode that returns a sequence
(realy simeple stuff). Unfortuanly it seems that i have some problem
with threads, but i realy would like if someone could say that it's NOT
an error in omniorb.


SERVER :

incomming_message_api* smsapi_i::getMessage(const char* username,const
char* password,const char* provider_ID){
    incomming_message_api_var retur = new incomming_message_api();
    incomming_message ret;

    ret=ReceiveO->getMessage(username,password,provider_ID);
    retur->sms_id=ret.sms_id;
    retur->recipient=(const char*)ret.recipient.c_str();
    retur->sender=ret.sender.c_str();
    retur->coding_scheme=ret.coding_scheme.c_str();
    retur->udh=ret.udh.c_str();
    retur->alphanumerical_ud=ret.alphanumerical_ud.c_str();
    retur->binary_ud=ret.binary_ud.c_str();
    retur->pid=ret.pid.c_str();
    retur->SCTS=ret.SCTS.c_str();
    return retur._retn();
}


incomming_message SMSReceive::getMessage(string username,
                                         string password,
                                         string provider_ID)
{
  incomming_message message_s;

  if(checkPassword(username,password,provider_ID,"get_SMS"));
  {
    //message_s=ISMSDB->getIncommingMessageFromDB((const char *) username.c_str());

    message_s.sms_id=12345;
    message_s.recipient="recipient";
    message_s.sender="123";
    message_s.coding_scheme="coding_scheme";
    message_s.udh="udh";
    message_s.alphanumerical_ud="TEST BINARY blabla";
    message_s.binary_ud="binary_ud";
    message_s.pid="pid";
    message_s.SCTS="SCTS";
  }

  /* The returned message_s is empty if the user was not authorized */
  return message_s;
}



The clients calls getMessage as fast as they can mannage, and after some
1000's cals, the server core-crashes.

The gdb dump of the core-file :


Core was generated by `./smsapi
IOR:010000000b00000049444c3a64623a312e30000001000000000000002a00000001'.
Program terminated with signal 9, Killed.
Reading symbols from
/usr/local/omni/lib/x86_sosV_5.5/libomniORB3.so.0...done.
Reading symbols from
/usr/local/omni/lib/x86_sosV_5.5/libomniDynamic3.so.0...done.
Reading symbols from
/usr/local/omni/lib/x86_sosV_5.5/libtcpwrapGK.so.2...done.
Reading symbols from
/usr/local/omni/lib/x86_sosV_5.5/libomnithread.so.2...done.
Reading symbols from /usr/lib/libpthread.so.1...done.
Reading symbols from /usr/lib/librt.so.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/local/lib/libstdc++.so.2.8.1.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libaio.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/lib/libthread.so.1...done.
#0  replace (this=0xdee019d0, pos=0, n1=0, s=0x806e326 "coding_scheme",
n2=13)
    at ./sinst.cc:411
411     ./sinst.cc: No such file or directory.

Is this a thread error in the string library or a corba error?

Thanks
Jo Skjermo
joskj@idi.ntnu.no