>  There's something funny going on in the socket that we used for IPC
> communications with our rxapi daemon that can result in a performance
> problem, but I have no clue as to why it is sometimes painfully slow.

gdb on NetBSD shows the problem code - I had plenty of time to issue a
STOP signal while in the debugger.  The output below shows the problem
is a long timeout in connect(), trying to access the apimanager at
"localhost", port=43332.  I assume it's failed to recognise localhost,
although /etc/hosts and /etc/nsswitch.conf are OK, and is therefore
trying to find a machine somewhere on the internet - that would
explain the long timeout.  I may get more info from a packet trace,
which I can do on my local machine.

gdb trace of slow function at end of message.

Cheers
Mike


11 *-* If RxFuncQuery('SockDropFuncs')
       >L>   "SockDropFuncs"
       >A>   "SockDropFuncs"
^Z
Program received signal SIGTSTP, Stopped (user).
0xbb84d317 in connect () from /usr/lib/libc.so.12
(gdb) where
#0  0xbb84d317 in connect () from /usr/lib/libc.so.12
#1  0xbba1f151 in connect () from /usr/lib/libpthread.so.0
#2  0xbba3da17 in SysClientStream::open (this=0x804ade0,
    host=0xbba406b4 "localhost", port=43332)
    at ./rexxapi/common/platform/unix/SysCSStream.cpp:351
#3  0xbba350d1 in LocalAPIManager::getConnection (this=0x8453000)
    at ./rexxapi/client/LocalAPIManager.cpp:245
#4  0xbba34abc in ClientMessage::send (this=0xbfbfc5fc)
    at ./rexxapi/client/ClientMessage.cpp:54
#5  0xbba352d0 in LocalAPIManager::establishServerConnection (this=0x8453000)
    at ./rexxapi/client/LocalAPIManager.cpp:205
#6  0xbba354c7 in LocalAPIManager::initProcess (this=0x8453000)
    at ./rexxapi/client/LocalAPIManager.cpp:156
#7  0xbba3579d in LocalAPIManager::getInstance ()
    at ./rexxapi/client/LocalAPIManager.cpp:62
#8  0xbba34c82 in LocalAPIContext::getAPIManager (this=0xbfbfc8e4)
    at ./rexxapi/client/LocalAPIContext.cpp:54
#9  0xbba3b895 in RexxQueryFunction (name=0x8164b4c "SOCKDROPFUNCS")
    at ./rexxapi/client/RegistrationAPI.cpp:518
#10 0xbbb4ae7f in PackageManager::queryRegisteredRoutine (name=0x8164b28)
    at ./interpreter/package/PackageManager.cpp:595
#11 0xbbb54e14 in builtin_function_RXFUNCQUERY (context=0x812d880, argcount=1,
    stack=0x812d93c) at ./interpreter/expression/BuiltinFunctions.cpp:2570
#12 0xbbb5bf6c in RexxExpressionFunction::evaluate (this=0x8134ab8,
    context=0x812d880, stack=0x812d93c)
    at ./interpreter/expression/ExpressionFunction.cpp:217
#13 0xbbb67a4c in RexxInstructionIf::execute (this=0x8134ad8,
    context=0x812d880, stack=0x812d93c)
    at ./interpreter/instructions/IfInstruction.cpp:122
#14 0xbbb264a4 in RexxActivation::run (this=0x812d880, _receiver=0x0,
    msgname=0x8125a28, _arglist=0x81322d0, _argcount=1, start=0x0,
    resulto...@0xbfbfcb3c) at ./interpreter/execution/RexxActivation.cpp:506
#15 0xbbb2a14c in RexxCode::call (this=0x8136500, activity=0x8130d08,
    routine=0x8132360, msgname=0x8125a28, argPtr=0x81322d0, argcount=1,
    calltype=0x80c24c8, environment=0x812fda0, context=16, resu...@0xbfbfcb3c)
    at ./interpreter/execution/RexxCode.cpp:115
#16 0xbbaf2f3e in RoutineClass::runProgram (this=0x8132360,
    activity=0x8130d08, calltype=0x80c24c8, environment=0x812fda0,
    arguments=0x81322d0, argCount=1, resu...@0xbfbfcb3c)
    at ./interpreter/classes/RoutineClass.cpp:305
#17 0xbbb543d0 in RexxStartDispatcher::run (this=0xbfbfcc7c)
    at ./interpreter/concurrency/RexxStartDispatcher.cpp:138
#18 0xbbb2d10d in RexxNativeActivation::run (this=0x8132178,
    dispatch...@0xbfbfcc7c)
    at ./interpreter/execution/RexxNativeActivation.cpp:1532
#19 0xbbb5324f in RexxActivity::run (this=0x8130d08, targ...@0xbfbfcc7c)
    at ./interpreter/concurrency/RexxActivity.cpp:2932
#20 0xbbb4beaa in ActivityDispatcher::invoke (this=0xbfbfcc7c, exits=0x0,
    env=0x8048d8f "bash")
    at ./interpreter/concurrency/ActivityDispatcher.cpp:121
#21 0xbbb0fa6d in RexxStart (argcount=1, arglist=0xbfbfed4c,
    programname=0xbfbfee91 "/home/mike/sw/swi.rexx", instore=0x0,
    envname=0x8048d8f "bash", calltype=0, exits=0x0, retcode=0xbfbfed4a,
    result=0x0) at ./interpreter/api/InterpreterAPI.cpp:163
#22 0x08048c51 in main (argc=4, argv=0xbfbfedd0)
    at ./utilities/rexx/platform/unix/rexx.cpp:169
(gdb) step
Single stepping until exit from function connect,
which has no line number information.
0xbb84d2f8 in execve () from /usr/lib/libc.so.12
(gdb)
Single stepping until exit from function execve,
which has no line number information.
0xbb8ea81c in __cerror () from /usr/lib/libc.so.12
(gdb)
Single stepping until exit from function __cerror,
which has no line number information.
0xbba1f151 in connect () from /usr/lib/libpthread.so.0
(gdb)
Single stepping until exit from function connect,
which has no line number information.
SysClientStream::open (this=0x804ade0, host=0xbba406b4 "localhost", port=43332)
    at ./rexxapi/common/platform/unix/SysCSStream.cpp:353
353             errcode = CSERROR_OPEN_FAILED;
(gdb)
354             close();
(gdb)
SysClientStream::close (this=0x804ade0)
    at ./rexxapi/common/platform/unix/SysCSStream.cpp:370
370         if (c != -1)
(gdb)
372             ::close(c);
(gdb)
379         c = -1;
(gdb)
380         errcode = CSERROR_OK;
(gdb)
381         return true;
(gdb)
382     }
(gdb)
SysClientStream::open (this=0x804ade0, host=0xbba406b4 "localhost", port=43332)
    at ./rexxapi/common/platform/unix/SysCSStream.cpp:355
355             return false;
(gdb)
360     }
(gdb)
LocalAPIManager::getConnection (this=0x8453000)
    at ./rexxapi/client/LocalAPIManager.cpp:247
247             throw new ServiceException(SERVER_FAILURE, "Failure
connecting to rxapi server");
(gdb)
ServiceException (this=0x804b8c0, c=SERVER_FAILURE,
    m=0xbba406c0 "Failure connecting to rxapi server")
    at ./rexxapi/common/ServiceException.hpp:72
72              errCode = c;
(gdb)
74              message = m;
(gdb)
75          }
(gdb)
       >F>   RXFUNCQUERY => "1"
       >>>   "1"

------------------------------------------------------------------------------
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to