On 2010-02-06 11:40-0500 Hazen Babcock wrote: > > A new problem on OS-X Snow Leopard and the Aquaterm driver has been > pointed out to me: > > It is described here: > http://thread.gmane.org/gmane.lisp.openmcl.devel/5447 > > The gist of it is this statement: > "if the CoreFoundation library's being initialized - perhaps as a result > of that library being loaded as a dependent of some other library - and > the current thread is not the initial thread, waste everyone's time by > executing a breakpoint instruction." > > So, if you try to use Plplot with the Aquaterm driver, which in turn > will try to load the CoreFoundation library, in a threaded environment > your process will crash. Perhaps the onus is on us to somehow figure out > if the CoreFoundation library has already been loaded and avoid > reloading it? Or maybe that is just not possible?
You forgot the AquaTerm library/environment in your summary above which, of course, if quite distinct from the aqt device driver. Also, whenever "load" is mentioned above it is unclear whether run-time or dynamic loading is being discussed. Would you agree this is how everything fits together? PLplot dynamically loads the aqt device driver which run-time loads the AquaTerm library/environment which (dynamically, I assume) loads the CoreFoundation library. To my mind, there are two key questions about the aqt device driver. (1) Is there any error in how it is linked? You should be able to answer that question with the otool command. I am assuming otool has some equivalent to the -r option for ldd so you can see if there are any unresolved symbols when aqt.so is run-time loaded by otool. Of course, such analyses tell you if not enough libraries are mentioned during linking, but it does not tell you if too many libraries are mentioned. To make sure of that, you should capture the linking of aqt.so that the PLplot build system does, and repeat the command from the command line. Then systematically remove libraries from that link command and analyze the result with otool to see if those linked libraries are really necessary. (2) Is the aqt device driver code reentrant? Example 14 tests reentrancy to a certain extent, and my understanding from http://en.wikipedia.org/wiki/Reentrant_(subroutine) is reentrancy implies thread safety. If otool and your command-line experiments show no errors in how our build system links aqt.so, and example 14 and your code review give the aqt device driver a clean bill of health with regard to reentrancy, then my guess is the issue you discussed originates in the AquaTerm library/environment. What is the status of the AquaTerm project? According to http://sourceforge.net/project/memberlist.php?group_id=39915 the developers of the AquaTerm project are Marius Amado-Alves, Per Persson, and you. The website has no recent news, and the last release was more than 3 years ago. Also, Per Persson historically participated quite a bit on this list with regard to Mac OS X linking issues, but it has been quite a while since we have heard from him. 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); PLplot scientific plotting software package (plplot.org); 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 __________________________ ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel