Menu

#895 Fix ServiceComplete tracepoint to work for RemoteRequests

Next
closed-fixed
STAFProc (180)
5
2007-02-12
2007-02-12
No

Add the result length to the ServiceComplete tracepoint data. This may help debug some OutOfMemory issues, etc. with very large results.

<ServiceName> Service Complete (<RC>) - Client: <Endpoint>, Handle: <Handle>, Process: <HandleName>, Request: <Request>, Result Length: <ResultLength> }

Discussion

  • Sharon Lucas

    Sharon Lucas - 2007-02-12
    • labels: 361008 --> STAFProc
    • milestone: 304461 --> Next
    • summary: Add result length to ServiceComplete tracepoint data --> Fix ServiceComplete tracepoint to work for RemoteRequests
     
  • Sharon Lucas

    Sharon Lucas - 2007-02-12

    Logged In: YES
    user_id=285070
    Originator: YES

    When testing the addition of the result length to the ServiceComplete tracepoint data, discovered that the Service Complete tracepoint was being completely ignored for remote requests. It was only implemented for local requests. Fixed so that on both local and remote requests, if the ServiceComplete tracepoint is enabled (and not overridden by the ServiceResult tracepoint), a ServiceComplete tracepoint is logged.

    A ServiceResult tracepoint overrides the ServiceComplete, ServiceError, and ServiceAccessDenied tracepoints.
    A ServiceComplete tracepoint overrides the ServiceError and ServiceAccessDenied tracepoints.
    A ServiceError tracepoint overrides the ServiceAccessDenied tracepoint.

    Thus, if enable all tracepoints, the ServiceResult tracepoint (not the Service Complete nor the ServiceError, nor the ServiceAccessDenied tracepoint) will be logged.

    Updated the documentation to reflect this override order.

     
  • Sharon Lucas

    Sharon Lucas - 2007-02-12
    • status: open --> closed-fixed
     
  • Sharon Lucas

    Sharon Lucas - 2007-02-12

    Logged In: YES
    user_id=285070
    Originator: YES

    This fix will be in STAF V3.2.1.

    Here's a cvs diff of the changes:

    Index: stafproc/STAFProc.cpp

    RCS file: /cvsroot/staf/src/staf/stafproc/STAFProc.cpp,v
    retrieving revision 1.183
    diff -r1.183 STAFProc.cpp
    1992a1993,2007
    > else if (STAFTrace::doTrace(kSTAFTraceServiceComplete |
    > kSTAFTraceRemoteRequests) &&
    > STAFServiceManager::doTraceService(serviceRequest.fTargetService))
    > {
    > STAFString data("Remote ");
    >
    > data += serviceRequest.fTargetService + " Service Complete (" + rc +
    > ") - To: " + serviceRequest.fTargetMachine +
    > ", from Handle: " + STAFString(serviceRequest.fHandle) +
    > ", Process: " + serviceRequest.fHandleName +
    > ", Request: " + serviceRequest.fRequest +
    > ", Result Length: " + result.length();
    >
    > STAFTrace::trace(kSTAFTraceServiceComplete, data);
    > }

    Index: stafproc/STAFService.cpp

    RCS file: /cvsroot/staf/src/staf/stafproc/STAFService.cpp,v
    retrieving revision 1.12
    diff -r1.12 STAFService.cpp
    105c105,106
    < requestInfo.fRequest);
    ---
    > requestInfo.fRequest + ", Result Length: " +
    > result.fResult.length());
    Index: History
    ===================================================================
    RCS file: /cvsroot/staf/src/staf/History,v
    retrieving revision 1.577
    diff -r1.577 History
    57a58,59
    > - Fixed the ServiceComplete tracepoint to work with remote requests and added
    > the result length to it's message (Bug #1658349)

     
  • Sharon Lucas

    Sharon Lucas - 2007-02-12

    Logged In: YES
    user_id=285070
    Originator: YES

    And here's the cvs diff for the documentation changes:

    Index: TraceSrv.script

    RCS file: /cvsroot/staf/src/staf/docs/userguide/TraceSrv.script,v
    retrieving revision 1.16
    diff -r1.16 TraceSrv.script
    117,118c117,120
    < This tracepoint overrides the :xph.ServiceError:exph. and
    < :xph.ServiceAccessDenied:exph. tracepoints.
    ---
    > Note that the trace message will include the return code and result for the
    > service request.
    > This tracepoint overrides the :xph.ServiceComplete:exph.,
    > :xph.ServiceError:exph. and :xph.ServiceAccessDenied:exph. tracepoints.
    125,126c127,129
    < error code. This tracepoint overrides the :xph.ServiceAccessDenied:exph.
    < tracepoint.
    ---
    > error code. Note that the trace message will include the return code and
    > result for the service request.
    > This tracepoint overrides the :xph.ServiceAccessDenied:exph. tracepoint.
    192,194c195,199
    < incoming service request after it is processed by the service. Note that
    < the trace message will include the return code for the service request, but
    < will not include the service request result.
    ---
    > incoming service request after it is processed by the service.
    > Note that the trace message will include the return code and result length
    > for the service request, but not the result data.
    > This tracepoint overrides the :xph.ServiceError:exph. and
    > :xph.ServiceAccessDenied:exph. tracepoints.

     

Log in to post a comment.