Print

Print


URL:
  <http://savannah.cern.ch/bugs/?93616>

                 Summary: XrdOucCache pre-read hangs in XrdPosixXrootd::Close
                 Project: XROOTD
            Submitted by: apeters
            Submitted on: 2012-04-12 09:59
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
      Fixed by commit(s): 

    _______________________________________________________

Details:

With a certain probability the POSIX close function hangs, if pre-read is
enabled in XrdOucCache.

The main thread is waiting

(gdb) where
#0  0x0000003da6a0cd21 in sem_wait () from /lib64/libpthread.so.0
#1  0x0000003b50420f16 in Wait (this=0xef0f8b0) at
/usr/src/debug/xrootd/xrootd/src/XrdSys/XrdSysPthread.hh:315
#2  XrdOucCacheData::Detach (this=0xef0f8b0) at
/usr/src/debug/xrootd/xrootd/src/XrdOuc/XrdOucCacheData.cc:117
#3  0x0000003b50c08d3c in XrdPosixFile::~XrdPosixFile (this=0xef08150,
__in_chrg=<value optimized out>) at
/usr/src/debug/xrootd/xrootd/src/XrdPosix/XrdPosixXrootd.cc:393
#4  0x0000003b50c06534 in XrdPosixXrootd::Close (fildes=<value optimized
out>, Stream=0) at
/usr/src/debug/xrootd/xrootd/src/XrdPosix/XrdPosixXrootd.cc:566
#5  0x0000000000400fde in main (argc=2, argv=0x7fff45479408) at
/root/eos-3.1.0/eos/test/XrdCpPosixCache.cc:69

because the pre-read threads do not terminate:
(gdb) where
#0  0x0000003da6a0cd21 in sem_wait () from /lib64/libpthread.so.0
#1  0x0000003b50423822 in Wait (this=0xeefda90) at
/usr/src/debug/xrootd/xrootd/src/XrdSys/XrdSysPthread.hh:315
#2  XrdOucCacheReal::PreRead (this=0xeefda90) at
/usr/src/debug/xrootd/xrootd/src/XrdOuc/XrdOucCacheReal.cc:444
#3  0x0000003b50423999 in XrdOucCacheRealPRXeq (parg=0xeefdc58) at
/usr/src/debug/xrootd/xrootd/src/XrdOuc/XrdOucCacheReal.cc:34
#4  0x0000003b5041be7f in XrdSysThread_Xeq (myargs=<value optimized out>) at
/usr/src/debug/xrootd/xrootd/src/XrdSys/XrdSysPthread.cc:67
#5  0x0000003da6a0673d in start_thread () from /lib64/libpthread.so.0
#6  0x0000003da62d44bd in clone () from /lib64/libc.so.6

Two pre-read threads are waiting for prReady, the third pre-read thread is
waiting in some locking function for a semaphore:

(gdb) where
#0  0x0000003da6a0cd21 in sem_wait () from /lib64/libpthread.so.0
#1  0x0000003b5041c662 in Wait (this=0xef0f920, usage=xs_Exclusive) at
/usr/src/debug/xrootd/xrootd/src/XrdSys/XrdSysPthread.hh:315
#2  XrdSysXSLock::Lock (this=0xef0f920, usage=xs_Exclusive) at
/usr/src/debug/xrootd/xrootd/src/XrdSys/XrdSysXSLock.cc:60
#3  0x0000003b50420676 in MrSw (this=0xef0f8b0) at
/usr/src/debug/xrootd/xrootd/src/XrdOuc/XrdOucCacheData.hh:71
#4  XrdOucCacheData::Preread (this=0xef0f8b0) at
/usr/src/debug/xrootd/xrootd/src/XrdOuc/XrdOucCacheData.cc:157
#5  0x0000003b5042386c in XrdOucCacheReal::PreRead (this=0xeefda90) at
/usr/src/debug/xrootd/xrootd/src/XrdOuc/XrdOucCacheReal.cc:450
#6  0x0000003b50423999 in XrdOucCacheRealPRXeq (parg=0xef0f980) at
/usr/src/debug/xrootd/xrootd/src/XrdOuc/XrdOucCacheReal.cc:34
#7  0x0000003b5041be7f in XrdSysThread_Xeq (myargs=<value optimized out>) at
/usr/src/debug/xrootd/xrootd/src/XrdSys/XrdSysPthread.cc:67
#8  0x0000003da6a0673d in start_thread () from /lib64/libpthread.so.0
#9  0x0000003da62d44bd in clone () from /lib64/libc.so.6

The pre-read queue is empty:
prFirst = 0


A core file + all RPMs and the executable can be downloaded here:

http://eos.cern.ch/rpms/core/








    _______________________________________________________

Reply to this item at:

  <http://savannah.cern.ch/bugs/?93616>

_______________________________________________
  Message sent via/by LCG Savannah
  http://savannah.cern.ch/

########################################################################
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