Alan,

Thanks for the update. I'm glad you managed to track it down. I'd held of
delving into this as you seemed to have it under control. I'm also
slightly surprised at the linker not being more intelligent here.
Certainly something we need to be wary of.

Andrew

On Sat, Mar 21, 2015 at 11:57:20AM -0700, Alan Irwin wrote:
> Hi Andrew:
> 
> I have now (commit fa0c879) solved this release-critical regression.
> 
> The crux of the problem is redundant linking of qt_example to both
> plplot (which contained all of the code in plplotqt for this
> ENABLE_DYNDRIVERS=NO case) and plplotqt. examples/c++/qt_example had no severe
> memory management issues if I manipulated visibility so that I used
> either the plplotqt symbols from just plplot or just plplotqt.
> However, if both sets of symbols are made visible (the change that
> formally caused this regression), it caused severe memory management
> issues when the libraries were closed at plend.  The obvious fix for
> this issue has been applied which is to drop the redundant linking of
> qt_example to libplplotqt for the ENABLE_DYNDRIVERS=NO case.
> 
> There are obvious broader implications here now that we have a clear
> case of plend memory management issues caused by redundant linking to
> two sets of the identical code located in two different libraries. I
> frankly never expected this to be an issue since I thought the linker
> would choose one set or the other with no other consequences. But from
> this experience this is obviously not the case (probably due to all
> the behind-the-scenes shenanigans that go on when libraries are
> closed). Anyhow, since I have not been aware of this issue for all the
> years I have been trying to maintain correct PLplot linking, I am
> virtually positive there are similar instances of this same problem
> for other device drivers.  Note, for example, that for the
> ENABLE_DYNDRIVERS=NO case there is necessarily always two copies of
> the device driver binding code (e.g., like the libplplotqt binding
> code) to break circular linking issues.
> 
> So my current plan is to look very carefully for such issues and fix
> them (likely most of those fixes will occur post-release if there is
> not a clear regression from 5.10.0 results) in the hope this
> refinement of our linking model will ultimately resolve a substantial
> number of the plend memory management issues we have been
> encountering.
> 
> Alan
> __________________________
> Alan W. Irwin
> 
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
> 
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __________________________
> 
> Linux-powered Science
> __________________________
> 
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to