cryostatio / cryostat-reports Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Our downstream builds do not use the Docker extension. The following keys in the application.properties end up generating warnings upon startup:
cryostat-reports/src/main/resources/application.properties
Lines 1 to 5 in 2199e85
2022-11-22 19:54:53,265 WARN [io.qua.config] (main) Unrecognized configuration key "quarkus.container-image.build" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2022-11-22 19:54:53,265 WARN [io.qua.config] (main) Unrecognized configuration key "quarkus.container-image.group" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2022-11-22 19:54:53,265 WARN [io.qua.config] (main) Unrecognized configuration key "quarkus.container-image.additional-tags" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2022-11-22 19:54:53,265 WARN [io.qua.config] (main) Unrecognized configuration key "quarkus.docker.executable-name" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
2022-11-22 19:54:53,265 WARN [io.qua.config] (main) Unrecognized configuration key "quarkus.container-image.registry" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
This doesn't impact the application running, but it would be nice to move these properties and the container build to a Maven profile. It can be active by default to not cause any development workflow changes.
Depends on cryostatio/cryostat#880
When cryostat supports a JSON response format for automated analysis, the reports sidecar must also support the same for deployments where cryostat delegates requests rather than forking a subprocess.
I also got a bit of an issue when creating a report replica as pod seems to in `CrashLoopBackOff` with logs show:
exec /deployments/run-java.sh: permission denied
I am using Cluster Bot with OCP 4.11.1
Originally posted by @tthvo in cryostatio/cryostat-operator#499 (comment)
The version should be updated for the next development cycle and to not conflict with builds from the cryostat-v2.1 branch.
exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -XX:+ExitOnOutOfMemoryError -XX:+UseSerialGC -XX:UseSSE=2 -cp . -jar /deployments/quarkus-run.jar
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/deployments/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.1.0.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/deployments/lib/main/org.slf4j.slf4j-jdk14-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Slf4jLoggerFactory]
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2021-12-20 17:04:22,752 INFO [io.quarkus] (main) cryostat-reports 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.5.3.Final) started in 1.881s. Listening on: http://0.0.0.0:8080
2021-12-20 17:04:22,842 INFO [io.quarkus] (main) Profile prod activated.
2021-12-20 17:04:22,842 INFO [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, smallrye-context-propagation, vertx]
2021-12-20 17:04:23,958 INFO [io.cry.rep.ReportResource] (executor-thread-0) Received request for otel.jfr (1441656 bytes)
2021-12-20 17:04:26,642 INFO [io.cry.rep.ReportResource] (executor-thread-0) Completed request for otel.jfr after 2683ms
2021-12-20 17:04:29,959 INFO [io.cry.rep.ReportResource] (executor-thread-1) Received request for foo.jfr (10352883 bytes)
2021-12-20 17:04:46,439 INFO [io.cry.rep.ReportResource] (executor-thread-1) Completed request for foo.jfr after 16479ms
2021-12-20 17:05:02,038 INFO [io.cry.rep.ReportResource] (executor-thread-0) Received request for vertx-fib-demo-6f4775cdbf-82dvl_150mb_20211006T152006Z.jfr (156212847 bytes)
[thread 177 also had an error]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fcdf866f76e, pid=1, tid=181
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.13+8) (build 11.0.13+8-LTS)
# Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.13+8-LTS, mixed mode, sharing, tiered, compressed oops, serial gc, linux-amd64)
# Problematic frame:
# j org.openjdk.jmc.common.item.Aggregators$MinMaxConsumer.consume(Lorg/openjdk/jmc/common/item/IItem;)V+11
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /deployments/core.1)
#
# An error report file with more information is saved as:
# /deployments/hs_err_pid1.log
Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
[thread 176 also had an error][thread 175 also had an error]
[thread 178 also had an error]
#
# If you would like to submit a bug report, please visit:
# https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=java-11-openjdk
#
[error occurred during error reporting (), id 0xb, SIGSEGV (0xb) at pc=0x00007fce168c4e91]
This definitely appears to be a HotSpot bug, but I'm not sure how or why it's being triggered exactly. When I run the container with 1 CPU and 1G of memory and make a report request where the uploaded file is ~150MB then it crashes with this message.
This line sets JAVA_OPTS
but should instead set JAVA_OPTS_APPEND
:
The base image's run-java.sh
script, which is the entrypoint for this container, tries to do some container detection and set some JVM tuning flags accordingly. This is probably done for a reason and we should respect these tuning flags and not clobber them by default.
One setting the base image does set by default is +ExitOnOutOfMemoryError
, which I don't think we want. Quarkus handles OOMs cleanly by responding with a 500 to the client and remaining otherwise functional, and in my testing it seems to work reliably. In a container orchestration environment, exiting the container and having it restart is unlikely to fix the underlying reason for the OOM (in this case, probably that the requested file to be processed was too large/complex), it only introduces unnecessary downtime to the deployment, so it would be better to remain running and simply respond to such requests with the 500.
We will need to follow the Migration Guide to ensure nothing breaks.
This should ideally match what is used by the main Cryostat build.
See cryostatio/cryostat-agent#126 , the same thing applies here.
It would be great for clients to be able to make requests for automated analysis and receive the rule evaluation results as ex. JSON for machine consumption or for customized formatting for display, in addition to the existing HTML report document.
Sidecar equivalent to cryostatio/cryostat#918
As described in the README, native image builds of cryostat-reports need to fully exercise the rules report generator code paths. This means the JFR file used needs to contain events of all types that are checked for by any of the rule implementations in the JMC version used by cryostat-reports, which is dictated by the cryostat-core version.
Using Cryostat's ALL
meta-template and running a recording on a target for a while almost does the trick:
all.jfr.zip (ZIP containing a single .jfr file)
This was collected by running the ALL
meta-template for 5 minutes.
overview.html.txt (HTML report document renamed to .txt so GitHub will allow it to be uploaded...)
Some of the rules are still ignored and code paths therefore unexecuted.
For build environments that perform Java and container builds separately, it would be useful to have the Maven build produce an assembly of all artifacts that need to be copied into the final container image.
There should be some way for end users to add some ReportTransformer implementations to the classpath and these should be loaded and applied to the generated reports.
See cryostatio/cryostat-core#168 . Same thing should be done here.
See also dependabot/dependabot-core#6067
To make our downstream releases deviate as little as possible from our upstream releases, we should use a version of Quarkus that is released as part of the Red Hat Build of Quarkus. The latest as of now is 2.2.5.
https://github.com/cryostatio/cryostat-reports/actions/runs/7625164851/job/20768861530?pr=197
Error: Failed to execute goal on project cryostat-reports: Could not resolve dependencies for project io.cryostat:cryostat-reports:jar:2.5.0-SNAPSHOT: Failed to collect dependencies at io.cryostat:cryostat-core:jar:2.27.0: Failed to read artifact descriptor for io.cryostat:cryostat-core:jar:2.27.0: The following artifacts could not be resolved: io.cryostat:cryostat-core:pom:2.27.0 (absent): Could not transfer artifact io.cryostat:cryostat-core:pom:2.27.0 from/to github (https://maven.pkg.github.com/cryostatio/cryostat-core): status code: 401, reason phrase: Unauthorized (401) -> [Help 1]
Error:
Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.
Error:
Error: For more information about the errors and possible solutions, please read the following articles:
Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Error: Process completed with exit code 1.
Related to #81
We should add a profile to support building in native-sources
mode to better support our downstream builds:
https://quarkus.io/guides/building-native-image#separating-java-and-native-image-compilation
-core
has a ReportRuleEvalEvent
JFR event that that we should be able to capture from sidecar report generators. The best way to do this should be something similar to what we do in main Cryostat with the cryostat.jfc
template. Using the Profiling template provided by the JDK in the base image of this project, extend the template by adding an event definition for the ReportRuleEvalEvent
. That updated template definition should be added to this project somewhere under src/main/resources
, and the build configuration updated so that the event template file is copied into the built OCI image in the correct filesystem location.
This can probably be accomplished with the Maven assembly plugin, as seen here:
https://github.com/cryostatio/cryostat/blob/main/src/assembly/dist.xml
https://github.com/cryostatio/cryostat/blob/7361dfee2ed32920171ca6219406c94086d5f436/pom.xml#L894
The setup will vary somewhat however since main Cryostat uses Jib to build the OCI image, but here in -reports we use the quarkus docker image build plugin.
Line 45 in 3237998
README.md
mentions:
Line 41 in 09305e3
This should be sudo dnf install podman-docker
(maybe other package manager?). Also, I think installing and starting docker
would also solve this issue.
Set version in POM and release
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.