GithubHelp home page GithubHelp logo

Comments (8)

ksdhans avatar ksdhans commented on May 23, 2024

I just discovered that something puts a lock on the library(s) while it's in use. Perhaps AmiSSL itself is doing this? I can rename/overwrite other libraries even though they're in use, so the OS itself doesn't lock libraries that are currently open.

from amissl.

Futaura avatar Futaura commented on May 23, 2024

Yes, you're right - it is most likely due to:

if(base->elfHandle && (base->elfHandle = (base->IElf->OpenElfTags)(OET_ElfHandle, base->elfHandle, TAG_DONE)))

which cannot easily be avoided AFAIK, due to the baserel stuff / IElf->CopyDataSegment(), which needs the Elf handle. IBrowse has the same issue, for the same reason.

The AmiSSL installer itself employs some tricks (renaming the libraries) to flush the libraries from memory, otherwise the installer would also fail even if the libraries were resident in memory, but not in use. Of course, this only works if nothing has AmiSSL open. I hope updating AmiSSL via AmiUpdate is not affected by this, as I did advise that AmiUpdate needs to close AmiSSL before trying to update AmiSSL.

from amissl.

ksdhans avatar ksdhans commented on May 23, 2024

It's not just AmiUpdate. ZitaFTPServer has the problem too. I will be updating the installer to shutdown the server first. However, if the user still has their web-browser open then it'll still fail.

from amissl.

Futaura avatar Futaura commented on May 23, 2024

Of course, any application that has AmiSSL open will prevent the installer from working. I just mentioned AmiUpdate as a special case.

Anyway, this problem has always bothered me and it is indeed OpenElf() that puts a lock on the libraries. CopyDataSegment() unfortunately needs to read relocation information from the file each time it is called (everytime the library is opened). This lock has to be maintained while the library is in memory, otherwise if you update AmiSSL and overwrite the libs, while AmiSSL is in use, if some application then opens AmiSSL it will probably crash due to CopyDataSegment() reading from the newer file.

I've been looking at the elf.library source code and there just doesn't seem to be a good way around it, in terms of the AmiSSL libinit code. Perhaps the only solution is to make the installer rename the libraries to amissl*.library-old (for example) and at least the libraries can then be installed - the new version just won't be used until after a reboot or if the old version is expunged.

from amissl.

Futaura avatar Futaura commented on May 23, 2024

@ksdhans I figured out a way to preload the required data relocs, allowing the file lock to be released during initialisation (instead of expunge), which means that once users have AmiSSL 5.4 installed, future updates will be able to install even if AmiSSL is currently running or in memory (just as would normally happen on OS3).

from amissl.

ksdhans avatar ksdhans commented on May 23, 2024

Nice! The ZitaFTP Server installer can now shut it down, but it won't help with the AmiSSL update if something else is using it...

Looking forward to AmiSSL 5.4...

from amissl.

Futaura avatar Futaura commented on May 23, 2024

Final fix for this is in AmiSSL 5.13

from amissl.

Futaura avatar Futaura commented on May 23, 2024

And now that elf.library 54.1 has been released to the public, it is now time to finally close this issue.

from amissl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.