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

Incorrect default cache directory permission on z/OS Java 11+ #19328

Closed
hangshao0 opened this issue Apr 16, 2024 · 2 comments · Fixed by #19539
Closed

Incorrect default cache directory permission on z/OS Java 11+ #19328

hangshao0 opened this issue Apr 16, 2024 · 2 comments · Fixed by #19539

Comments

@hangshao0
Copy link
Contributor

On z/OS, the default cache directory is /tmp/javasharedresources/. The default permission for this directory is 0777 on Java 8. We will always change it to 0777 after creation (see perms = in trace j9prt.124):

rm -rf /tmp/javasharedresources/
java -Xshareclasses -Xtrace:print={j9prt.124-126} -version
JVMJ9VM082E Unable to switch to IFA processor - issue "extattr +a libj9ifa29.so"
16:07:31.728*0x1c1d3200           j9prt.124      > j9sharedhelper change shared directory permission entered dir = /tmp/javasharedresources/, perms = 1ff
16:07:31.729 0x1c1d3200           j9prt.125      < j9sharedhelper change shared directory permission successful exit
java version "1.8.0_411"

On Java 11+, OpenJ9 only changes the permission to 0777 after creation if -Xshareclass is specified:

rm -rf /tmp/javasharedresources/
java -Xshareclasses -Xtrace:print={j9prt.124-126} -version
JVMJ9VM082E Unable to switch to IFA processor - issue "extattr +a libj9ifa29.so"
16:10:47.761*0x1c670600           j9prt.124      > j9sharedhelper change shared directory permission entered dir = /tmp/javasharedresources/, perms = 1ff
16:10:47.762 0x1c670600           j9prt.125      < j9sharedhelper change shared directory permission successful exit

On Java 11+, if -Xshareclass is not specified (SCC enabled by default), the permission is not changed to 0777, which is incorrect:

rm -rf /tmp/javasharedresources/
java -Xtrace:print={j9prt.124-126} -version
JVMJ9VM082E Unable to switch to IFA processor - issue "extattr +a libj9ifa29.so"
16:13:49.314*0x1c670600           j9prt.124      > j9sharedhelper change shared directory permission entered dir = /tmp/javasharedresources/, perms = 0
16:13:49.315 0x1c670600           j9prt.125      < j9sharedhelper change shared directory permission successful exit
@tajila
Copy link
Contributor

tajila commented May 22, 2024

@hangshao0 any updates on this?

@hangshao0
Copy link
Contributor Author

any updates on this?

A Pull Request will be created this week.

hangshao0 added a commit to hangshao0/openj9 that referenced this issue May 23, 2024
SCC is enabled by default when -Xshareclasses is not specified in the
CML. cacheDirPerm should be set to J9SH_DIRPERM_ABSENT in this case.

Closes eclipse-openj9#19328

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit that referenced this issue May 28, 2024
SCC is enabled by default when -Xshareclasses is not specified in the
CML. cacheDirPerm should be set to J9SH_DIRPERM_ABSENT in this case.

Closes #19328

Signed-off-by: Hang Shao <[email protected]>
pshipton pushed a commit to pshipton/openj9 that referenced this issue May 28, 2024
SCC is enabled by default when -Xshareclasses is not specified in the
CML. cacheDirPerm should be set to J9SH_DIRPERM_ABSENT in this case.

Closes eclipse-openj9#19328

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue May 28, 2024
SCC is enabled by default when -Xshareclasses is not specified in the
CML. cacheDirPerm should be set to J9SH_DIRPERM_ABSENT in this case.

Closes eclipse-openj9#19328

Signed-off-by: Hang Shao <[email protected]>
hangshao0 added a commit to hangshao0/openj9 that referenced this issue May 28, 2024
SCC is enabled by default when -Xshareclasses is not specified in the
CML. cacheDirPerm should be set to J9SH_DIRPERM_ABSENT in this case.

Closes eclipse-openj9#19328

Signed-off-by: Hang Shao <[email protected]>
AswathySK pushed a commit to AswathySK/openj9 that referenced this issue Jun 4, 2024
SCC is enabled by default when -Xshareclasses is not specified in the
CML. cacheDirPerm should be set to J9SH_DIRPERM_ABSENT in this case.

Closes eclipse-openj9#19328

Signed-off-by: Hang Shao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants