In one of the Ubuntu docker image with JDK 17 installed, YC 360 script does not capture Java path properly in M3 mode. Because of this, it was not capturing the GC or thread dump.
This is the location of Java path after running the "which java" command:
/usr/lib/jvm/java-17-openjdk-amd64/bin/java