Print

Print


@ljanyst the scenario is a bit confusing with a user plugin for XrdCl and NetxNG (wrapping XrdCl) being a plugin for root itself, thanks for clarifying, I think now I see the bigger picture.

If the garbage collector is invoked after NetxNGl is unloaded there's indeed nothing that can be done, but to be honest there is a good chance we would see a segfault already when the first symbol from the lib has been invoked (although not necessary). 

Also, note what JK reported:

>The problem is, that the XrdCl::DefaultEnv is "finalized" [including dlclose() on the plug-in through its plug-in manager ] before the file object is(/are) deleted.

>The following call to the TNetXNGFile destructor finally tries to use the pPlugin's IsOpen() method which fails, because the plug-in library has already been unloaded.

>Strangely, in root 6 everything works fine, because the cxa__finalize_ does not try to finalize DefaultEnv first.

You have to admit it sounds suspiciously like static deinitialization order fiasco ;-)


@pcanal and @ljanyst are you guys 100% positive that NetxNG has been been unload before the garbage collector has been invoked? In the end the way the DefaultEnv is finalized is fishy (it might be worth changing it anyway).



---
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/issues/338#issuecomment-229610983

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