Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Server hangs if IPC-queue is full

user1821551Feb 29 2012 — edited Mar 21 2012
Hello,

I've set up a simple test system (Tuxedo 10.3/Linux) with just two servers TESTSRV and TESTSRV2. Server TESTSRV does tpcall("TESTSRV2"). Server TESTSRV2 just sleeps for 10 seconds and returns. For test purposes I've set kernel.msg* parameters so that an IPC-queue can contain only 3 messages sent by TESTSRV.

I call the server TESTSRV with ud32 simultaneously from four terminal windows or with my test client (tried both with the same results). Unsurprisingly, I get the situation when the message queue of TESTSRV is full and TESTSRV2 cannot do tpreturn even through a file transfer, because TESTSRV queue doesn't have sufficient place for file identifier.

But what surprises me (and actually causes problems in my real-world configuration) is that right after this the system becomes unusable. TESTSRV2 could not send reply with tpreturn and timed out, which is fine. But IPC-queue of TESTSRV remains full and TESTSRV does not processes requests from the queue. It doesn't time out and its status is busy in tmadmin yet nothing happens, it just hangs.

Is this a Tuxedo bug or I miss something?


/************* TEST_CLIENT ****************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <atmi.h>

#define SUCCESS (0)
#define FAIL (-1)
#define BUF_SIZE (1068)

int main(int argc, char *argv[])
{
FBFR32 buff_in = NULL, buff_out = NULL;
long olen;
int ret = SUCCESS;
char *sendbuf;
int i;

if (tpinit((TPINIT *) NULL) == -1) {
fprintf(stderr, "Tpinit failed\n");
exit(1);
}

if (SUCCESS == ret && 0 > (sendbuf = (char *)tpalloc( "STRING", NULL, BUF_SIZE)))
{
printf("Cannot allocate memory for fielded buffer - %s\n",
Fstrerror32(Ferror32));
ret = FAIL;
}

memset(sendbuf, '1', BUF_SIZE);

for (i=0; i < 4; i++)
{
if (SUCCESS == ret && 0 > tpacall("TESTSRV", (char *)sendbuf, 0,
TPNOREPLY | TPNOTRAN))
{
printf("Cannot send request to service TESTSRV - %s\n",
tpstrerror(tperrno));
ret = FAIL;
}
}

if (sendbuf != NULL)
tpfree((char *)sendbuf);

tpterm();

return ret;
}

/**************** TESTSRV *********************/
#include <stdio.h>
#include <atmi.h>
#include <userlog.h>

#define SUCCESS (0)
#define FAIL (-1)

int tpsvrinit(int argc, char** argv)
{
return SUCCESS;
}

void TESTSRV(TPSVCINFO* req)
{
char* fb = (char*)req->data;
int olen;
int ret = SUCCESS;

if (ret == SUCCESS &&
tpcall("TESTSRV2", (char*)fb, 0, (char**)&fb, &olen, TPNOTRAN) < 0)
{
userlog("tpcall %s: %s", "TESTSRV2",
tpstrerror(tperrno));
ret = FAIL;
}

userlog("********** TESTSRV finished (%s) **********",
ret == SUCCESS? "success":"FAIL");

tpreturn(ret == SUCCESS ? TPSUCCESS : TPFAIL, 0, (char*)fb, 0L, 0);
}

/**************** TESTSRV2 *********************/
#include <stdio.h>
#include <atmi.h>
#include <userlog.h>

#define SUCCESS (0)
#define FAIL (-1)

int tpsvrinit(int argc, char** argv)
{
return SUCCESS;
}

void TESTSRV2(TPSVCINFO* req)
{
char* fb = (char*)req->data;
int olen;
int ret = SUCCESS;

sleep(10);

userlog("********** TESTSRV2 finished (%s) **********",
ret == SUCCESS? "success":"FAIL");

tpreturn(ret == SUCCESS ? TPSUCCESS : TPFAIL, 0, (char*)fb, 0L, 0);
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 18 2012
Added on Feb 29 2012
8 comments
783 views