Print

Print


This was introduced in #1316 and now TPC::State::Flush/Write is called for both PUSH and PULL operations. This leads to an error (at least in EOS) since in the PUSH mode the file is opened in read only mode and the write operation will fail.

Doing the following in the TPC::State::Flush method should be enough to avoid this issue:

int State::Flush() {
    if (m_push) {
      return 0;
    }

    int retval = m_stream->Write(m_start_offset + m_offset, 0, 0, true);
    ....

Below is a stacktrace to better understand where this happens:

(gdb) bt
#0  XrdMgmOfsFile::write (this=0x7f6c5e657000, offset=0, buff=0x0, blen=0) at ../mgm/XrdMgmOfsFile.cc:3058
#1  0x00007f6bef31517a in TPC::Stream::Write (this=0x7f6be664dd30, offset=0, buf=buf@entry=0x0, size=size@entry=0, force=force@entry=true) at /usr/src/debug/xrootd/xrootd/src/XrdTpc/XrdTpcStream.cc:80
#2  0x00007f6bef312984 in TPC::State::Flush (this=this@entry=0x7f6be664dd80) at /usr/src/debug/xrootd/xrootd/src/XrdTpc/XrdTpcState.cc:203
#3  0x00007f6bef31ddd1 in TPC::TPCHandler::RunCurlWithUpdates (this=this@entry=0x7f6c54d94e00, curl=curl@entry=0x7f6c5e630d40, req=..., state=..., rec=...)
    at /usr/src/debug/xrootd/xrootd/src/XrdTpc/XrdTpcTPC.cc:491
#4  0x00007f6bef320cff in TPC::TPCHandler::ProcessPushReq (this=this@entry=0x7f6c54d94e00, resource=": https://esdss000.cern.ch:9000/eos/dev/replica/zero1.dat", req=...)
    at /usr/src/debug/xrootd/xrootd/src/XrdTpc/XrdTpcTPC.cc:648
#5  0x00007f6bef322f4c in TPC::TPCHandler::ProcessReq (this=0x7f6c54d94e00, req=...) at /usr/src/debug/xrootd/xrootd/src/XrdTpc/XrdTpcTPC.cc:132
#6  0x00007f6ca6c1501c in XrdHttpReq::ProcessHTTPReq (this=this@entry=0x7f6c62ffc4a0) at /usr/src/debug/xrootd/xrootd/src/XrdHttp/XrdHttpReq.cc:987
#7  0x00007f6ca6c0d55d in XrdHttpProtocol::Process (this=0x7f6c62ffc380, lp=<optimized out>) at /usr/src/debug/xrootd/xrootd/src/XrdHttp/XrdHttpProtocol.cc:843
#8  0x00007f6cab677e49 in XrdLink::DoIt (this=0x7f6c6263b028) at /usr/src/debug/xrootd/xrootd/src/Xrd/XrdLink.cc:441
#9  0x00007f6cab67b1df in XrdScheduler::Run (this=0x610e58 <XrdMain::Config+440>) at /usr/src/debug/xrootd/xrootd/src/Xrd/XrdScheduler.cc:357
#10 0x00007f6cab67b329 in XrdStartWorking (carg=<optimized out>) at /usr/src/debug/xrootd/xrootd/src/Xrd/XrdScheduler.cc:87
#11 0x00007f6cab640be7 in XrdSysThread_Xeq (myargs=0x7f6c5f1c6200) at /usr/src/debug/xrootd/xrootd/src/XrdSys/XrdSysPthread.cc:86
#12 0x00007f6cab1f4ea5 in start_thread (arg=0x7f6be6650700) at pthread_create.c:307
#13 0x00007f6caa4f68dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

I guess this is of interest for @bbockelm. Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/1373", "url": "https://github.com/xrootd/xrootd/issues/1373", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

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