Print

Print


pSessionID is a number starting at 0 and going to 64K-1, it just 
identifies that particular session.

Andy

On Thu, 2 Jul 2015, John Gates wrote:

> I got a segmentation fault on a auto_ptr to a message object.  I added the 
> offending function (fails on return) below after the backtrace. This could 
> well have something to with the expecting message size x, got 0 bytes 
> problem. The core dump is too big to attach. If you want to see it, let me 
> know where I can copy it.
>
> On a side note, why is Message::pSessionId always 1 or 0?
>
> -John
>
>
> #0  0x00007f29009c4ca6 in std::auto_ptr<XrdCl::Message>::~auto_ptr 
> (this=0x7f28e2ffc9b0, __in_chrg=<optimized out>) at 
> /usr/include/c++/4.8.2/backward/auto_ptr.h:170
> No locals.
> #1  0x00007f29009bd72e in XrdCl::XRootDMsgHandler::Process 
> (this=0x7f28cc0046c0, msg=0x7f28dc000d30) at 
> /afs/in2p3.fr/home/j/jgates/working/xrootd/src/XrdCl/XrdClXRootDMsgHandler.cc:297
>        embededMsg = 0x7f28d4024eb0
>        msgPtr = {_M_ptr = 0x7f28dc000d30}
>        embRsp = 0x7f28d40165d0
>        rsp = 0x7f28dc001950
>        qryResult = {pHolder = 0x7f28e2ffcb58, pTypeInfo = 0x7f28e2ffcd00, 
> pOwn = true}
>        qryResponse = 0x7f28e2ffcb00
>        log = 0x25d1c60
>        req = 0x7f28cc03af00
>        st = {status = 58336, code = 2483, errNo = 32553}
> #2  0x00007f29009acce5 in XrdCl::InQueue::AddMessage (this=0x7f28d8010380, 
> msg=0x7f28dc000d30) at 
> /afs/in2p3.fr/home/j/jgates/working/xrootd/src/XrdCl/XrdClInQueue.cc:65
>        log = 0x25d1c60
>        it = {first = , second = 1435863656}
>        action = 5
>        handler = 0x7f28cc0046c0
> #3  0x00007f2900999afd in XrdCl::Stream::QueueIncMsgJob::Run 
> (this=0x7f28d800a520, arg=0x7f28dc000d30) at 
> /afs/in2p3.fr/home/j/jgates/working/xrootd/src/./XrdCl/XrdClStream.hh:267
>        msg = 0x7f28dc000d30
> #4  0x00007f29009f986a in XrdCl::JobManager::RunJobs (this=0x7f28e400e470) at 
> /afs/in2p3.fr/home/j/jgates/working/xrootd/src/XrdCl/XrdClJobManager.cc:148
>        h = {job = 0x7f28d800a520, arg = 0x7f28dc000d30}
> #5  0x00007f29009f93e4 in RunRunnerThread (arg=0x7f28e400e470) at 
> /afs/in2p3.fr/home/j/jgates/working/xrootd/src/XrdCl/XrdClJobManager.cc:33
>        mgr = 0x7f28e400e470
> #6  0x00007f2912c46df3 in start_thread () from /lib64/libpthread.so.0
> ---Type <return> to continue, or q <return> to quit---
> No symbol table info available.
> #7  0x00007f291226b1ed in clone () from /lib64/libc.so.6
> No symbol table info available.
>
>
>
>
>  void XRootDMsgHandler::Process( Message *msg )
>  {
>    Log *log = DefaultEnv::GetLog();
>
>    ServerResponse *rsp = (ServerResponse *)msg->GetBuffer();
>    ClientRequest  *req = (ClientRequest *)pRequest->GetBuffer();
>
> //--------------------------------------------------------------------------
>    // We got an async message
> //--------------------------------------------------------------------------
>    if( rsp->hdr.status == kXR_attn )
>    {
>      log->Dump( XRootDMsg, "[%s] Got an async response to message %s %s, "
>                 "processing it", pUrl.GetHostId().c_str(),
>                 msg->dump().c_str(), pRequest->GetDescription().c_str() );
>      Message *embededMsg = new Message( rsp->hdr.dlen-8 );
>      embededMsg->Append( msg->GetBuffer( 16 ), rsp->hdr.dlen-8 );
>      XRDCL_SMART_PTR_T<Message> msgPtr( msg );
>      pResponse = embededMsg; // this can never happen for oksofars
>
>      // we need to unmarshall the header by hand
>      XRootDTransport::UnMarshallHeader( embededMsg );
>
> //------------------------------------------------------------------------
>      // Check if the dlen field of the embedded message is consistent with
>      // the dlen value of the original message
> //------------------------------------------------------------------------
>      ServerResponse *embRsp = (ServerResponse *)embededMsg->GetBuffer();
>      if( embRsp->hdr.dlen != rsp->hdr.dlen-16 )
>      {
>        log->Error( XRootDMsg, "[%s] Sizes of the async response to %s and 
> the "
>                    "embedded message are inconsistent. Expected %d, got 
> %d.",
>                    pUrl.GetHostId().c_str(), 
> pRequest->GetDescription().c_str(),
>                    rsp->hdr.dlen-16, embRsp->hdr.dlen);
>
>        pStatus = Status( stFatal, errInvalidMessage );
>        HandleResponse();
>        return;
>      }
>
>      log->Dump( XRootDMsg, "[%s] async response to message %s -> Process",
>                 pUrl.GetHostId().c_str(), embededMsg->dump().c_str());
>      Process( embededMsg );
>      return;
>    }
>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1