[crac] RFR: CRaC: Fix fds opened for logging
Jan Kratochvil
jkratochvil at openjdk.org
Wed Sep 20 13:25:59 UTC 2023
On Tue, 19 Sep 2023 14:40:52 GMT, Radim Vansa <rvansa at openjdk.org> wrote:
> I have doubts about the fix being in `is_fd_ignored`: while the function name is confusingly generic, it is used for exclusion of file descriptors inherited from parent process. The check for currently open FDs lives in `VM_Crac::check_fds`.
I do not see how it could be in `VM_Crac::check_fds`. The file descriptor gets closed already during JVM startup:
#0 close_extra_descriptors () at src/hotspot/os/linux/crac_linux.cpp:395
#1 0x00007ffff64d34c6 in crac::vm_create_start () at src/hotspot/os/linux/crac_linux.cpp:424
#2 0x00007ffff7316dda in Threads::create_vm (args=0x7ffff59fee60, canTryAgain=canTryAgain at entry=0x7ffff59fed9f) at src/hotspot/share/runtime/threads.cpp:495
#3 0x00007ffff69c4e74 in JNI_CreateJavaVM_inner (args=<optimized out>, penv=0x7ffff59fee58, vm=0x7ffff59fee50) at src/hotspot/share/prims/jni.cpp:3576
#4 JNI_CreateJavaVM (vm=0x7ffff59fee50, penv=0x7ffff59fee58, args=<optimized out>) at src/hotspot/share/prims/jni.cpp:3667
#5 0x00007ffff7f8a0bf in InitializeJVM (ifn=<synthetic pointer>, penv=0x7ffff59fee58, pvm=0x7ffff59fee50) at src/java.base/share/native/libjli/java.c:1522
#6 JavaMain (_args=<optimized out>) at src/java.base/share/native/libjli/java.c:416
#7 0x00007ffff7f8db89 in ThreadJavaMain (args=<optimized out>) at src/java.base/unix/native/libjli/java_md.c:650
#8 0x00007ffff7e34947 in start_thread (arg=<optimized out>) at pthread_create.c:444
#9 0x00007ffff7eba870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
-------------
PR Comment: https://git.openjdk.org/crac/pull/113#issuecomment-1727719302
More information about the crac-dev
mailing list