Summary: | java/linux-oracle-jdk18: Does not work with NONE-ROOT user | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | jinlong.hao <jinlong.hao> |
Component: | Individual Port(s) | Assignee: | freebsd-java (Nobody) <java> |
Status: | Open --- | ||
Severity: | Affects Only Me | CC: | java, jinlong.hao, petteri.valkonen, trasz |
Priority: | --- | Keywords: | needs-qa |
Version: | Latest | Flags: | koobs:
maintainer-feedback?
(java) koobs: merge-quarterly? |
Hardware: | Any | ||
OS: | Any |
Description
jinlong.hao
2017-08-04 04:01:57 UTC
Seems to work here, on 13-CURRENT: trasz@v2:~ % java -version java version "1.8.0_231" Java(TM) SE Runtime Environment (build 1.8.0_231-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode) trasz@v2:~ % /usr/local/linux-oracle-jdk1.8.0/bin/java -version java version "1.8.0_231" Java(TM) SE Runtime Environment (build 1.8.0_231-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode) Are you still able to reproduce this? (In reply to jinlong.hao from comment #0) For what it's worth, I was experiencing the same symptoms, and allowing unprivileged processes to use process debugging facilities fixed the problem for me. ❯ sysctl security.bsd.unprivileged_proc_debug security.bsd.unprivileged_proc_debug: 0 ❯ /usr/local/linux-oracle-jdk1.8.0/bin/java -version # hangs ^C ❯ doas sysctl security.bsd.unprivileged_proc_debug=1 security.bsd.unprivileged_proc_debug: 0 -> 1 ❯ /usr/local/linux-oracle-jdk1.8.0/bin/java -version java version "1.8.0_241" Java(TM) SE Runtime Environment (build 1.8.0_241-b07) Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode) truss(1) output for a non-priviledged user with 'security.bsd.unprivileged_proc_debug' set to 0 shows an endless loop of "Operation not permitted" errors when trying to open /proc/self/maps: 60130: linux_open("/proc/self/maps",0x0,0666) = 3 (0x3) 60130: linux_newfstat(3,0x800729d80) = 0 (0x0) 60130: linux_mmap2(0x0,0x1000,0x3,0x22,0xffffffffffffffff,0x0) = 34366181376 (0x800625000) 60130: read(3,0x800625000,4096) ERR#-1 'Operation not permitted' 60130: read(3,0x800625000,4096) ERR#-1 'Operation not permitted' 60130: read(3,0x800625000,4096) ERR#-1 'Operation not permitted' 60130: read(3,0x800625000,4096) ERR#-1 'Operation not permitted' 60130: read(3,0x800625000,4096) ERR#-1 'Operation not permitted' ... With the variable set to 1, /proc/self/maps can be opened (and closed) successfully. 39570: linux_open("/proc/self/maps",0x0,0666) = 3 (0x3) 39570: linux_newfstat(3,0x800729d80) = 0 (0x0) 39570: linux_mmap2(0x0,0x1000,0x3,0x22,0xffffffffffffffff,0x0) = 34366181376 (0x800625000) 39570: read(3,"0000000000400000-000000000040100"...,4096) = 4096 (0x1000) 39570: read(3," /compat/linux/usr/lib64/libr"...,4096) = 1357 (0x54d) 39570: close(3) = 0 (0x0) |