Coder Social home page Coder Social logo

cryostat-reports's People

Contributors

aali309 avatar andrewazores avatar aptmac avatar dependabot[bot] avatar ebaron avatar maxcao13 avatar mwangggg avatar

Watchers

 avatar  avatar

cryostat-reports's Issues

Warnings when disabling Docker extension

Our downstream builds do not use the Docker extension. The following keys in the application.properties end up generating warnings upon startup:

quarkus.container-image.build=true
quarkus.container-image.registry=quay.io
quarkus.container-image.group=cryostat
quarkus.container-image.additional-tags=latest
quarkus.docker.executable-name=podman

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.

Bump version to 1.1.0-SNAPSHOT

The version should be updated for the next development cycle and to not conflict with builds from the cryostat-v2.1 branch.

`A fatal error has been detected by the Java Runtime Environment:` on large JFR report request

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.

[Task] `Dockerfile.jvm` defaults should append, not override, default container settings

ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"

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.

Collect a "full-featured" JFR file to use for native-image builds

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...)

image

Some of the rules are still ignored and code paths therefore unexecuted.

Sync Quarkus version with RHBQ

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.

[Task] CI fails to download `-core`

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

Add custom event template for report generation event

-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.

<artifactId>quarkus-container-image-docker</artifactId>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.