-
Notifications
You must be signed in to change notification settings - Fork 578
dl_unload_all_files() revisited #1718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @AlanBurlisonMy current understanding is that this patch broke DBD::Oracle on Linux - I (respectfully!) disagree with Sarathay's assertion that dlclosing() I'd like to get the dlclose stuff into a state where it on by default, I'd like some informed suggestions of the best way of doing this Alan Burlison |
From @timbunceOn Sun, Apr 02, 2000 at 11:05:41AM +0100, Alan Burlison wrote:
I'll happily help as far as I can if you send me details. (Oracle does very weird things with it's libraries, and then does
I think Sarathy meant it's an 'unnecessary overhead' when _not_ embedding.
When embedding, yes.
Do dl_unload_all_files() if Perl_destruct_level > 0. Tim. |
From @HugmeirOn Sun Apr 02 22:51:44 2000, RT_System wrote:
I can't find the context behind this report. There.. seems to be a Does anyone know what the issue _was_? : / |
From @tonycozOn Fri May 04 08:52:57 2012, Hugmeir wrote:
From reading the thread, apparently we (were|are) not releasing loaded This isn't a problem when perl is running standalone, but is a problem As to the proposed solution, I wonder if freeing the libraries on Also, there doesn't seem to be an XS entry point (like boot_Foo for Tony |
From @nwc10TL;DR: It's a mess. On Fri, Aug 09, 2013 at 12:35:41AM -0700, Tony Cook via RT wrote:
[whether at exit the interpreter should attempt to dl_unload() all files it
As an aside, I can't figure out how this has actually come to be recorded http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-04/msg00091.html (Back before the ticketing system was on RT. So what's the old bug number?)
I've looked at this and the related thread "perl_atexit() considered useless" http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-09/msg00846.html Relevant commits from the period are: commit abb9e9d unload extension shared objects when exiting, implemented commit 23d2500 make unloading of extension shared objects (change#5381) a build Both are just before v5.6.0 was released. Nothing has been changed in the code It's a mess. I can't actually work out what the problem was that Alan was reporting in the I've been looking at memory errors in perl, and found that if perl_atexit() is called after object destruction, but *before* all the I've also built blead from that era with gcc 4.8.1 and ASAN. The build and most of the tests pass. There are a couple of bugs tickled by I think I can see how the DBD::Oracle problem might be happening. It's SKIP: { in that, if DBD::Oracle is using something (probably tie magic) that is a DL_UNLOAD_ALL_AT_EXIT is not the default. I'm not sure if anyone is building I suspect that no-one is building with it, because since this (innocent) commit 667763b Make PerlIO::encoding more resilient to buffer changes ext/PerlIO-encoding/t/encoding.t will start SEGVing, because something still The issues are sort-of threefold 1) As ithreads are effectively forks as far as the interpreter goes, but are Point (3) doesn't matter for last-stage global destruction unloading, which I think to properly solve the "at interpreter exit" cleanup we'd really need The current code is *in XS*, and kicks back to more XS code. I think that it #ifdef DL_UNLOAD_ALL_AT_EXIT if ((sub = get_cvs("DynaLoader::dl_unload_file", 0)) != NULL) { Part of the fun of changing things is that it's provable that other code out http://grep.cpan.me/?q=dl_librefs but I'm not sure if all code doing so 1) only adds *all* handles it got by calling dl_load_file() ie - I've not looked at the code on CPAN closely enough to work out whether We possibly also need *two* hooks into shared objects. One for "this Problem is that, like PerlIO, we want to be able to do things both when there We'd still be trusting shared objects not to leave signal handers live. To solve the more general problem of dl_unload_file() - ie to be able to And I think we'd also need those hooks described above, so that XS modules It's hard work to fix the first problem. Nicholas Clark |
From @bulk88On Fri Aug 09 00:35:40 2013, tonyc wrote:
END block? package var with a DESTROY? I think I once did it with an XS Windows has DllMain which is always called at DLL unload time, but I
related link -- |
From @nwc10On Thu, Aug 22, 2013 at 07:09:36AM -0700, bulk88 via RT wrote:
As Ilya Z noted in one of the threads, Alan's initial suggestion of END is Ilya Z noted that it really needs to be done after everything Perl-like is Alan Burlison writes: Too early. The only safe place (if any) should be Ilya http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-01/msg00843.html which sort of gets asked again by Sarathy, to which Alan replies "pass": >> There was some doubt in my mind whether call_atexit() would do the job http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-02/msg01594.html I think that we are overlooking potential sharp corners, and that Ilya Z
Thanks for the link Nicholas Clark |
perl5/ext/DynaLoader/t/DynaLoader.t Line 27 in 0eda2a5
perl5/ext/DynaLoader/t/DynaLoader.t Line 157 in 0eda2a5
Still a problem, adding any more XS deps, to those 6 XS modules, if #7 module, has an XSUB |
Migrated from rt.perl.org#2968 (status was 'open')
Searchable as RT2968$
The text was updated successfully, but these errors were encountered: