Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not merge/review! Reproducer for: Muzzle does not check abstract method at runtime #1354

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented Oct 9, 2020

Reproducer for #1337.

Steps to reproduce:

git fetch origin origin/1354/head:PR1354
git checkout PR1354

And sample app, cone https://github.com/pavolloffay/sample-apps/tree/traceable

./gradlew build
OTEL_EXPORTER=otlp java -agentlib:jdwp="transport=dt_socket,server=y,suspend=n,address=5000" -javaagent:${HOME}/projects/opentelemetry/opentelemetry-java-instrumentation/javaagent/build/libs/opentelemetry-javaagent-0.9.0-SNAPSHOT-all.jar  -jar  "http/servers/jetty/jetty-servlet31x/build/libs/sample-jetty-app.jar" 7311 7312 

Now search for Server exception at doPost: java.lang.AbstractMethodError: Missing implementation of resolved method 'abstract boolean isReady()' of abstract class javax.servlet.ServletInputStream. in the stdout.

The issue is in this class https://github.com/pavolloffay/opentelemetry-auto-instr-java/blob/muzzle-runtime-abstract-method/instrumentation/servlet/servlet-3.0/src/main/java/io/opentelemetry/instrumentation/auto/servlet/v3_0/bodycapture/BufferingHttpServletRequest.java#L254. The muzzle fails the build correctly but does not recognize API mismatch at runtime and the instrumentation is loaded.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant