Print

Print


Hi Simon,

yes your commit fixes the problem.

XrdCl::DefaultEnv::Finalize() is indeed called before XrdCl::FileStateHandler::~FileStateHandler(). In gdb I put a breakpoint on both functions:

```
Thread 1 "ac_producer_7.4" hit Breakpoint 1, XrdCl::DefaultEnv::Finalize () at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClDefaultEnv.cc:689
689         if( sPostMaster )
(gdb) bt
#0  XrdCl::DefaultEnv::Finalize () at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClDefaultEnv.cc:689
#1  0x00007fffd3418be0 in EnvInitializer::~EnvInitializer (this=0x7fffd36ff042 <initializer>, __in_chrg=<optimized out>) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClDefaultEnv.cc:841
#2  0x00007fffe3b8c990 in __run_exit_handlers () from /usr/lib/libc.so.6
#3  0x00007fffe3b8c9ea in exit () from /usr/lib/libc.so.6
#4  0x00007fffe3b77298 in __libc_start_main () from /usr/lib/libc.so.6
#5  0x000000000040eb7a in _start ()
(gdb) c
Continuing.
[Thread 0x7fffcad85700 (LWP 1732) exited]
[Thread 0x7fffc6d84700 (LWP 1733) exited]
[Thread 0x7fffc2d83700 (LWP 1734) exited]
[Thread 0x7fffced86700 (LWP 1731) exited]
[Thread 0x7fffd2d87700 (LWP 1730) exited]

Thread 1 "ac_producer_7.4" hit Breakpoint 2, XrdCl::FileStateHandler::~FileStateHandler (this=0x2a6c160, __in_chrg=<optimized out>) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFileStateHandler.cc:377
377         if( pReOpenHandler )
(gdb) bt
#0  XrdCl::FileStateHandler::~FileStateHandler (this=0x2a6c160, __in_chrg=<optimized out>) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFileStateHandler.cc:377
#1  0x00007fffd3465e00 in XrdCl::File::~File (this=0x2a31460, __in_chrg=<optimized out>) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFile.cc:71
#2  0x00007fffd3465e5a in XrdCl::File::~File (this=0x2a31460, __in_chrg=<optimized out>) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFile.cc:73
#3  0x00007fffd372ba45 in TNetXNGFile::~TNetXNGFile (this=0x2a5a0f0, __in_chrg=<optimized out>) at /home/beischer/abs/root6-debug/src/root/net/netxng/src/TNetXNGFile.cxx:218
#4  0x00007fffd372bac4 in TNetXNGFile::~TNetXNGFile (this=0x2a5a0f0, __in_chrg=<optimized out>) at /home/beischer/abs/root6-debug/src/root/net/netxng/src/TNetXNGFile.cxx:221
#5  0x00007ffff74d8b51 in TCollection::GarbageCollect (obj=0x2a5a0f0) at /home/beischer/abs/root6-debug/src/root/core/cont/src/TCollection.cxx:590
#6  0x00007ffff74de53d in TList::Delete (this=0x654d80, option=0x7ffff758c923 "slow") at /home/beischer/abs/root6-debug/src/root/core/cont/src/TList.cxx:436
#7  0x00007ffff7391e2a in TROOT::~TROOT (this=0x7ffff789efc0 <ROOT::Internal::GetROOT1()::alloc>, __in_chrg=<optimized out>) at /home/beischer/abs/root6-debug/src/root/core/base/src/TROOT.cxx:842
#8  0x00007fffdb77ad02 in (anonymous namespace)::TCling_UnloadMarker::~TCling_UnloadMarker (this=0x7fffdde56121 <(anonymous namespace)::gTClingUnloadMarker>, __in_chrg=<optimized out>) at /home/beischer/abs/root6-debug/src/root/core/meta/src/TCling.cxx:188
#9  0x00007fffe3b8ccff in __cxa_finalize () from /usr/lib/libc.so.6
#10 0x00007fffdb748563 in __do_global_dtors_aux () from /opt/root/6.08.00-debug/lib/libCling.so
#11 0x00007fffffffafc0 in ?? ()
#12 0x00007ffff7de9aca in _dl_fini () from /lib64/ld-linux-x86-64.so.2
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/433#issuecomment-259732243

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