Bug 1643469 - Upgrade warning during cleanup: lib/client: remove failed: No such file or directory
Summary: Upgrade warning during cleanup: lib/client: remove failed: No such file or di...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-11-openjdk
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1679639
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-26 10:25 UTC by Severin Gehwolf
Modified: 2019-04-13 00:02 UTC (History)
3 users (show)

Fixed In Version: java-11-openjdk-11.0.2.7-6.fc28 java-11-openjdk-11.0.2.7-7.fc29 java-11-openjdk-11.0.2.7-7.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-05 01:55:04 UTC


Attachments (Terms of Use)

Description Severin Gehwolf 2018-10-26 10:25:31 UTC
Description of problem:
When upgrading java-11-openjdk packages one gets a warning during cleanup.

Version-Release number of selected component (if applicable):
Any java-11-openjdk version as far as I could tell.

How reproducible:
100%

Steps to Reproduce:
1. Install java-11-openjdk-1:11.0.ea.28-2.fc29.x86_64
2. Try upgrading to java-11-openjdk-1:11.0.1.13-1.fc29.x86_64

Actual results:
  Cleanup          : java-11-openjdk-headless-1:11.0.ea.28-2.fc29.x86_64                                                                                                                                       6/6 
warning: file /usr/lib/jvm/java-11-openjdk-11.0.ea.28-2.fc29.x86_64/lib/client: remove failed: No such file or directory
  Running scriptlet: java-11-openjdk-headless-1:11.0.ea.28-2.fc29.x86_64                                                                                                                                       6/6 
  Running scriptlet: java-11-openjdk-1:11.0.1.13-1.fc29.x86_64                                                                                                                                                 6/6 

Expected results:
No warning "No such file or directory" for lib/client.

Comment 1 Severin Gehwolf 2019-02-22 09:36:28 UTC
What exactly makes you think that depends on bug 1679639? See this proposed fix which worked for me:
https://src.fedoraproject.org/rpms/java-11-openjdk/pull-request/34

Comment 2 zzambers 2019-02-25 15:00:06 UTC
Maybe I am wrong, but I think non-existance of jsa archive alone would not cause this issue.

There is some kind of cleanup phase in copy-jdk-configs which is responsible for messages like this. I think problem happens when JDK package installs empty directories, and these are not listed in blacklist in copy-jdk-configs [1]. C-j-c then remove these (empty directories) and that causes messages like this. I don't know reasoning behind this step (jvanek should know), but see also: [2]

This problem is very annoying and was causing TPS failures when new dirs were added to JDK  (tps check for failed, error pattern in rpm's output). I complained about this problem on our mailing list multiple times in the past. And even though fedora now seems to include env. variable to add files to that blacklist, this is not the case on RHEL...

But I hope this can be solved in a way that no blacklist/whitelist would be necessary in c-j-c.

[1] https://pagure.io/copy_jdk_configs/blob/1d18ce8b5dec47a0468136ab6cdadfb93defe2c4/f/copy_jdk_configs_fixFiles.sh#_191
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1624517

Comment 4 zzambers 2019-02-25 16:24:44 UTC
Note to myself:

I think I know why c-j-c removes these empty directories. I think when old JDK already has some modified/backup conf. files (e.g. .rpmsave), these files with their empty parent dirs would be kept on the system. It was probably discovered, that just removing old rpmsave files does not help. I guess rpm internally composes list of files to remove (old JDK) before running new JDK's post script and empty dirs would therefore be kept. (And that's why that cleanup step exist...)

However if I am right, there should be better solution for this problem. when removing old modified/backup conf. files, not only remove them, but continue with their parent dirs as long as they are empty. But this would need proper testing... (This should have same effect as current ugly solution (when It happens to work), but there would be no need blacklist.)

ps: c-j-c needs to better comments/documentation, so there is no mysterious behaviour, where nobody remembers what was its original purpose.

Comment 5 Severin Gehwolf 2019-02-25 16:46:40 UTC
(In reply to zzambers from comment #2)
> There is some kind of cleanup phase in copy-jdk-configs which is responsible
> for messages like this. I think problem happens when JDK package installs
> empty directories, and these are not listed in blacklist in copy-jdk-configs
> [1]. C-j-c then remove these (empty directories) and that causes messages
> like this. I don't know reasoning behind this step (jvanek should know), but
> see also: [2]

Right. But packaging empty directories which are never going to contain any files (we don't build a client JVM, IIRC) is a bug in the package to me.

That is not to say that we shouldn't also fix c-j-c :) In a different bug, though.

Comment 6 zzambers 2019-02-25 17:35:29 UTC
Sure, I am not against that fix at all. What I was trying to say is that warning message is not about existence/non-existence of jsa, it's caused by bug/limitation of c-j-c (triggered by that empty dir). 
It's just coincidence that it uncovered non-existing jsa -> unnecessary dir. :)

Comment 7 Fedora Update System 2019-03-27 09:38:04 UTC
java-11-openjdk-11.0.2.7-7.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c474104ebb

Comment 8 Fedora Update System 2019-03-27 09:38:12 UTC
java-11-openjdk-11.0.2.7-6.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-649ac90900

Comment 9 Severin Gehwolf 2019-03-27 10:00:00 UTC
Note: The first version which got fixed is java-11-openjdk-11.0.2.6. This upgrade issue will only be solved once a user upgrades a JDK 11 version >= java-11-openjdk-11.0.2.6 to a higher version.

Comment 10 Fedora Update System 2019-03-27 19:14:59 UTC
java-11-openjdk-11.0.2.7-6.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-649ac90900

Comment 11 Fedora Update System 2019-03-27 19:36:18 UTC
java-11-openjdk-11.0.2.7-7.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ac496c1055

Comment 12 Fedora Update System 2019-03-27 20:01:47 UTC
java-11-openjdk-11.0.2.7-7.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c474104ebb

Comment 13 Fedora Update System 2019-03-29 00:12:29 UTC
java-11-openjdk-11.0.2.7-7.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ac496c1055

Comment 14 Fedora Update System 2019-04-05 01:55:04 UTC
java-11-openjdk-11.0.2.7-6.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2019-04-05 05:10:03 UTC
java-11-openjdk-11.0.2.7-7.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2019-04-13 00:02:56 UTC
java-11-openjdk-11.0.2.7-7.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.