-
Bug
-
Resolution: Fixed
-
P4
-
11, 14, 15
-
b18
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8242105 | 14.0.2 | Christoph Langer | P4 | Resolved | Fixed | b04 |
JDK-8246765 | 13.0.4 | Christoph Langer | P4 | Resolved | Fixed | b05 |
JDK-8249962 | 11.0.10-oracle | Evan Whelan | P4 | Resolved | Fixed | b01 |
JDK-8243250 | 11.0.8 | Christoph Langer | P4 | Resolved | Fixed | b01 |
java/nio/file/attribute/PosixFileAttributeView/Basic.java has started to fail recently on two Ubuntu 18.04 aarch64 systems at SAP.
An example failure is:
-- Lookup UserPrincipal Tests --
lookup: jvmtests
lookup group: kmem
lookup: scumbag99
----------System.err:(17/1126)----------
java.io.IOException: scumbag99: Operation not permitted
at java.base/sun.nio.fs.UnixUserPrincipals.lookupName(UnixUserPrincipals.java:148)
at java.base/sun.nio.fs.UnixUserPrincipals.lookupUser(UnixUserPrincipals.java:170)
at java.base/sun.nio.fs.UnixFileSystem$LookupService$1.lookupPrincipalByName(UnixFileSystem.java:328)
at Basic.lookupPrincipalTests(Basic.java:305)
at Basic.main(Basic.java:390)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:834)
JavaTest Message: Test threw exception: java.io.IOException: scumbag99: Operation not permitted
It appears that that getpwnam_r and getgrnam_r are failing with the error EPERM when these libc functions are called to lookup user or group names that do not exist.
As per man page of getpwnam_r, EPERM is a well defined error code that should indicate that "The given name or uid was not found."
https://linux.die.net/man/3/getpwnam_r
Errors
0 or ENOENT or ESRCH or EBADF or EPERM or ...
The given name or uid was not found.
I suggest to add EBADF and EPERM to the checked return codes in UnixNativeDispatcher.c
An example failure is:
-- Lookup UserPrincipal Tests --
lookup: jvmtests
lookup group: kmem
lookup: scumbag99
----------System.err:(17/1126)----------
java.io.IOException: scumbag99: Operation not permitted
at java.base/sun.nio.fs.UnixUserPrincipals.lookupName(UnixUserPrincipals.java:148)
at java.base/sun.nio.fs.UnixUserPrincipals.lookupUser(UnixUserPrincipals.java:170)
at java.base/sun.nio.fs.UnixFileSystem$LookupService$1.lookupPrincipalByName(UnixFileSystem.java:328)
at Basic.lookupPrincipalTests(Basic.java:305)
at Basic.main(Basic.java:390)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:834)
JavaTest Message: Test threw exception: java.io.IOException: scumbag99: Operation not permitted
It appears that that getpwnam_r and getgrnam_r are failing with the error EPERM when these libc functions are called to lookup user or group names that do not exist.
As per man page of getpwnam_r, EPERM is a well defined error code that should indicate that "The given name or uid was not found."
https://linux.die.net/man/3/getpwnam_r
Errors
0 or ENOENT or ESRCH or EBADF or EPERM or ...
The given name or uid was not found.
I suggest to add EBADF and EPERM to the checked return codes in UnixNativeDispatcher.c
- backported by
-
JDK-8242105 (fs) UserPrincipalLookupService.lookupXXX failure with IOE "Operation not permitted"
-
- Resolved
-
-
JDK-8243250 (fs) UserPrincipalLookupService.lookupXXX failure with IOE "Operation not permitted"
-
- Resolved
-
-
JDK-8246765 (fs) UserPrincipalLookupService.lookupXXX failure with IOE "Operation not permitted"
-
- Resolved
-
-
JDK-8249962 (fs) UserPrincipalLookupService.lookupXXX failure with IOE "Operation not permitted"
-
- Resolved
-