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, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@bastianbeischer in #433: Hi Simon,\r\n\r\nyes your commit fixes the problem.\r\n\r\nXrdCl::DefaultEnv::Finalize() is indeed called before XrdCl::FileStateHandler::~FileStateHandler(). In gdb I put a breakpoint on both functions:\r\n\r\n```\r\nThread 1 \"ac_producer_7.4\" hit Breakpoint 1, XrdCl::DefaultEnv::Finalize () at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClDefaultEnv.cc:689\r\n689 if( sPostMaster )\r\n(gdb) bt\r\n#0 XrdCl::DefaultEnv::Finalize () at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClDefaultEnv.cc:689\r\n#1 0x00007fffd3418be0 in EnvInitializer::~EnvInitializer (this=0x7fffd36ff042 \u003cinitializer\u003e, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClDefaultEnv.cc:841\r\n#2 0x00007fffe3b8c990 in __run_exit_handlers () from /usr/lib/libc.so.6\r\n#3 0x00007fffe3b8c9ea in exit () from /usr/lib/libc.so.6\r\n#4 0x00007fffe3b77298 in __libc_start_main () from /usr/lib/libc.so.6\r\n#5 0x000000000040eb7a in _start ()\r\n(gdb) c\r\nContinuing.\r\n[Thread 0x7fffcad85700 (LWP 1732) exited]\r\n[Thread 0x7fffc6d84700 (LWP 1733) exited]\r\n[Thread 0x7fffc2d83700 (LWP 1734) exited]\r\n[Thread 0x7fffced86700 (LWP 1731) exited]\r\n[Thread 0x7fffd2d87700 (LWP 1730) exited]\r\n\r\nThread 1 \"ac_producer_7.4\" hit Breakpoint 2, XrdCl::FileStateHandler::~FileStateHandler (this=0x2a6c160, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFileStateHandler.cc:377\r\n377 if( pReOpenHandler )\r\n(gdb) bt\r\n#0 XrdCl::FileStateHandler::~FileStateHandler (this=0x2a6c160, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFileStateHandler.cc:377\r\n#1 0x00007fffd3465e00 in XrdCl::File::~File (this=0x2a31460, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFile.cc:71\r\n#2 0x00007fffd3465e5a in XrdCl::File::~File (this=0x2a31460, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/xrootd4-debug/src/xrootd/src/XrdCl/XrdClFile.cc:73\r\n#3 0x00007fffd372ba45 in TNetXNGFile::~TNetXNGFile (this=0x2a5a0f0, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/root6-debug/src/root/net/netxng/src/TNetXNGFile.cxx:218\r\n#4 0x00007fffd372bac4 in TNetXNGFile::~TNetXNGFile (this=0x2a5a0f0, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/root6-debug/src/root/net/netxng/src/TNetXNGFile.cxx:221\r\n#5 0x00007ffff74d8b51 in TCollection::GarbageCollect (obj=0x2a5a0f0) at /home/beischer/abs/root6-debug/src/root/core/cont/src/TCollection.cxx:590\r\n#6 0x00007ffff74de53d in TList::Delete (this=0x654d80, option=0x7ffff758c923 \"slow\") at /home/beischer/abs/root6-debug/src/root/core/cont/src/TList.cxx:436\r\n#7 0x00007ffff7391e2a in TROOT::~TROOT (this=0x7ffff789efc0 \u003cROOT::Internal::GetROOT1()::alloc\u003e, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/root6-debug/src/root/core/base/src/TROOT.cxx:842\r\n#8 0x00007fffdb77ad02 in (anonymous namespace)::TCling_UnloadMarker::~TCling_UnloadMarker (this=0x7fffdde56121 \u003c(anonymous namespace)::gTClingUnloadMarker\u003e, __in_chrg=\u003coptimized out\u003e) at /home/beischer/abs/root6-debug/src/root/core/meta/src/TCling.cxx:188\r\n#9 0x00007fffe3b8ccff in __cxa_finalize () from /usr/lib/libc.so.6\r\n#10 0x00007fffdb748563 in __do_global_dtors_aux () from /opt/root/6.08.00-debug/lib/libCling.so\r\n#11 0x00007fffffffafc0 in ?? ()\r\n#12 0x00007ffff7de9aca in _dl_fini () from /lib64/ld-linux-x86-64.so.2\r\n```"}],"action":{"name":"View Issue","url":"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