On Thu, Jan 15, 2026 at 09:58:48AM +0700, Max Nikulin wrote:
> On 14/01/2026 2:28 pm, [email protected] wrote:
> > On Wed, Jan 14, 2026 at 09:29:47AM +0700, Max Nikulin wrote:
> > > 
> > > As to ETXTBSY, I am less sure concerning .so plugins loaded using dlopen. 
> > > At
> > > least I saw crashes when cp(1) was used instead of install(1) to replace 
> > > old
> > > libraries during installing another version.
> > 
> > I don't know what you mean by ".so plugins", but if it is good ol' shared
> > libs, yes, they are mmapped:
> 
> I mean explicit call of dlopen(3). Consider e.g. apache modules. I mentioned
> it for the case if there is some difference in loading of linked libraries
> and loading optional parts later. Certainly files are mmap'ed. I have no
> idea if something has been changed in kernel or in libdl during last decade,
> but earlier cp was able to overwrite shared library in place causing crash
> on next attempt to call some function from that library. I have not retested
> it now. I think, the key point is whether kernel considers specific file as
> being executed. Memory mapped files may be opened in read-write mode.

Ah, OK. I tend to agree with you in that.

I haven't explicitly tried, but this is my mental model when Firefox
goes "Oh, Noes! Something went totally wrong I'm sooo sorry!" when I
do an upgrade while it is running. This one does dlopen a lot.

Cheers
-- 
tomás

Attachment: signature.asc
Description: PGP signature

Reply via email to