Open eriknellessen opened 7 months ago
Are you preloading libfaketime.so or libfaketimeMT.so? If the latter, could you try compiling without -DPTHREAD_SINGLETHREADED_TIME
in the Makefile
and check whether that makes any difference?
libfaketime itself does not establish any signal handlers and thus couldn't get locked up in any of them. Are there any changes in OpenJDK's SIGTERM handler between the two versions?
We are preloading libfaketime.so
(it is called libfaketime.so.1
in Ubuntu).
I could not find any hints about the SIGTERM handler in the release notes of OpenJDK 11.0.19, OpenJDK 11.0.20 and OpenJDK 11.0.21. I should add that I am not an expert concerning the OpenJDK release notes, so it is possible that I missed something.
Today I tried the following combination:
So to me it seems like the problem is fixed somewhere between versions 0.9.7-3ubuntu1 and 0.9.10-2.1. Unfortunately, 0.9.10-2.1 causes performance issues in combination with OpenJDK 11.0.21 (see issue https://github.com/wolfcw/libfaketime/issues/425), so we still cannot use this version in our setup.
When using the current Java 11 version (OpenJDK 11.0.21) in Ubuntu 22.04 and libfaketime 0.9.7-3ubuntu1, java processes do not stop anymore when getting the SIGTERM signal. I tried the following combinations (all in docker containers):
When taking a look at the process threads, I could see a lot of SIGTERM handlers:![sigterm_libfaketime](https://github.com/wolfcw/libfaketime/assets/8004039/86533d70-a2d1-42f7-a2aa-744d6b54e269)
This issue might look similar to this already existing issue: https://github.com/wolfcw/libfaketime/issues/428 But it is not the same problem. We are not using the
faketime
binary, but the mechanism with the configuration file/etc/ld.so.preload
. The other issue is not about java programs, but a problem that generally occurs when using thefaketime
binary.