Skip to content
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

[Suggestion] The preload library should complain when the daemon is in "appsNeedRestart" state #443

Open
nephros opened this issue Jun 29, 2023 · 1 comment
Labels
enhancement this improves something

Comments

@nephros
Copy link
Contributor

nephros commented Jun 29, 2023

DESCRIPTION

Consider:

  1. PM applies patch foo version 1.0 which affects file1, file2, and file3.
  2. a process X is launched, opening the three files, getting redirected as usual by the preload library.
  3. PM applies patch foo version 1.1 which affects file1, file2, but no longer file3.
  4. Assuming the patch has the correct metadata, PM will know that process X should be restarted, but the user might opt to not do it.

The process X may now have a version of file3 in use that shouldn't exist any more. E.g. a QML program might Qt.resolvedUrl("file3"). This will work after 2., but fail after 3.

Also it may have been initialized with the state of things in the files from after 1., but reading the same files after 3. will serve new content.

It's easy (?) to see that this can confuse processes.

ADDITIONAL INFORMATION

The PM daemon has a state where it "recommends" affected processes ("services") to be restarted.

Communication between the preload library and the daemon should include that information, and the preload library should log a warning if it discovers that it's redirecting to files which have been "patched twice".

@nephros nephros added feature request feature requests, suggestions, ideas etc. enhancement this improves something and removed feature request feature requests, suggestions, ideas etc. labels Jun 29, 2023
@Olf0
Copy link
Contributor

Olf0 commented Jul 1, 2023

I suppose step 3 is a really rare case (borderline to artificial), but AFAIU your considerations are fully correct.

Additionally step 4 "the user ignores the strong suggestion to restart the patched service / program" is required for ultimately that service / program not working correctly … until the next reboot. Which lets the whole issue appear to be a rare corner case.

Hence one valid approach is IMO not to address this technically, but to emphasise that things my not work correctly if the suggestion to restart the service / program is not obeyed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement this improves something
Projects
None yet
Development

No branches or pull requests

2 participants