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

Jetty 12 - Attributes dump is not working #8984

Closed
joakime opened this issue Nov 30, 2022 · 6 comments
Closed

Jetty 12 - Attributes dump is not working #8984

joakime opened this issue Nov 30, 2022 · 6 comments
Labels
Bug For general bugs on Jetty side

Comments

@joakime
Copy link
Contributor

joakime commented Nov 30, 2022

Jetty version(s)
Jetty 12

Description
The Dump of org.eclipse.jetty.util.Attributes is kinda useless right now.
We need to fix this to show something meaningful.

Example dump (from a WebAppContext from ee10)

|     |  |  +> Handler attributes EE10 Demo Spec WebApp@119f1f2a size=13
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@6403e24c
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@2f236de0
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@4eba373c
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@767a014e
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@d109c4f
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@3968bc60
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@26f46fa6
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@227a47
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@9596ce8
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@75ae4a1f
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@70228253
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@63c12e52
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@21bd20ee
|     |  |  +> Context attributes EE10 Demo Spec WebApp@119f1f2a size=31
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@26c47874
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@421056e5
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@2849434b
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@60bbacfc
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@65b97f47
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@255eaa6b
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@476fe690
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@7a0e7ecd
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@54e3658c
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@43e9089
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@3c5dbdf8
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@352c44a8
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@7aac8884
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@a66e580
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@5b852b49
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@cdb2d95
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@122d6c22
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@2f5ac102
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@5df778c3
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@895416d
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@71a06021
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@80bfdc6
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@6edcad64
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@4c6007fb
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@3e33d73e
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@6981f8f3
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@623dcf2a
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@2eae4349
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@e84fb85
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@68a4dcc6
|     |  |  |  +> org.eclipse.jetty.util.Attributes$1$1$1$1@646c0a67
@joakime joakime added Bug For general bugs on Jetty side jetty 12 labels Nov 30, 2022
@gregw
Copy link
Contributor

gregw commented Dec 1, 2022

Also, that's a lot of attributes! We don't know what they all are, but once we see the names we need to check why do many

@janbartel
Copy link
Contributor

The revealed attributes are as follows:

| | | +> Handler attributes EE10 Demo Spec WebApp@2b62442c size=13
| | | | +> response-character-encoding=utf-8
| | | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=./jakarta.servlet-api-[^/].jar$|.jakarta.servlet.jsp.jstl-..jar$
| | | | +> org.eclipse.jetty.lifecyleCallbackCollection=org.eclipse.jetty.ee10.plus.annotation.LifeCycleCallbackCollection@2bc378f7
| | | | +> org.eclipse.jetty.webapp.tmpResourceBase=/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp
| | | | +> org.eclipse.jetty.injectionCollection=org.eclipse.jetty.ee10.plus.annotation.InjectionCollection@268cbb86
| | | | +> org.eclipse.jetty.websocket.core.WebSocketComponents=oejwcs.WebSocketServerComponents@267dc982{STARTED}
| | | | +> org.apache.catalina.jsp_classpath=
| | | | +> jakarta.servlet.context.tempdir=/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-
| | | | +> default-context-path=/test-spec
| | | | +> org.eclipse.jetty.jndi.EnvConfiguration=[org.eclipse.jetty.ee10.plus.webapp.EnvConfiguration$Bound@10f7918f, org.eclipse.jetty.ee10.plus.webapp.EnvConfiguration$Bound@64d4f7c7]
| | | | +> request-character-encoding=utf-8
| | | | +> jakarta.servlet.context.orderedLibs=[/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp/WEB-INF/lib/jetty-ee10-demo-container-initializer-12.0.0-SNAPSHOT.jar, /home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp/WEB-INF/lib/jetty-ee10-demo-web-fragment-12.0.0-SNAPSHOT.jar]
| | | | +> org.eclipse.jetty.websocket.core.server.WebSocketMappings=org.eclipse.jetty.websocket.core.server.WebSocketMappings@ccf91df
| | | +> Context attributes EE10 Demo Spec WebApp@2b62442c size=31
| | | | +> response-character-encoding=utf-8
| | | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=./jakarta.servlet-api-[^/].jar$|.jakarta.servlet.jsp.jstl-..jar$
| | | | +> org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=3]
| | | | +> org.eclipse.jetty.lifecyleCallbackCollection=org.eclipse.jetty.ee10.plus.annotation.LifeCycleCallbackCollection@2bc378f7
| | | | +> org.eclipse.jetty.server.Executor=QueuedThreadPool[qtp852687460]@32d2fa64{STARTED,10<=11<=200,i=0,r=-1,q=0}[ReservedThreadExecutor@20cece0b{reserved=0/8,pending=0}]
| | | | +> org.eclipse.jetty.websocket.core.WebSocketComponents=oejwcs.WebSocketServerComponents@267dc982{STARTED}
| | | | +> jakarta.websocket.server.ServerContainer=oeje10wjsi.JakartaWebSocketServerContainer@74fab04a{STARTED}
| | | | +> org.example.AnnotationTest.complete=true
| | | | +> default-context-path=/test-spec
| | | | +> org.eclipse.jetty.jndi.EnvConfiguration=[org.eclipse.jetty.ee10.plus.webapp.EnvConfiguration$Bound@10f7918f, org.eclipse.jetty.ee10.plus.webapp.EnvConfiguration$Bound@64d4f7c7]
| | | | +> org.example.AnnotationTest.sclGetSessionTimeout=true
| | | | +> jakarta.servlet.context.orderedLibs=[/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp/WEB-INF/lib/jetty-ee10-demo-container-initializer-12.0.0-SNAPSHOT.jar, /home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp/WEB-INF/lib/jetty-ee10-demo-web-fragment-12.0.0-SNAPSHOT.jar]
| | | | +> org.eclipse.jetty.websocket.core.server.WebSocketMappings=org.eclipse.jetty.websocket.core.server.WebSocketMappings@ccf91df
| | | | +> org.example.AnnotationTest.sclSetSessionTimeout=true
| | | | +> org.example.AnnotationTest.listenerRegoTest=true
| | | | +> org.example.AnnotationTest.listenerTest=true
| | | | +> org.eclipse.jetty.webapp.tmpResourceBase=/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp
| | | | +> org.apache.tomcat.InstanceManager=org.apache.tomcat.SimpleInstanceManager@54e02f6a
| | | | +> org.eclipse.jetty.injectionCollection=org.eclipse.jetty.ee10.plus.annotation.InjectionCollection@268cbb86
| | | | +> org.example.jsp.file=true
| | | | +> org.apache.catalina.jsp_classpath=
| | | | +> org.example.AnnotationTest.programListenerInjectTest=true
| | | | +> jakarta.servlet.context.tempdir=/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-
| | | | +> org.apache.jasper.compiler.TldCache=org.apache.jasper.compiler.TldCache@17f3eefb
| | | | +> org.example.Foo=[class org.example.test.SecuredServlet, class org.example.test.Bar, class org.example.fragment.FragmentServlet, class org.example.test.ClassLoaderServlet, class jakarta.servlet.http.HttpServlet, class org.example.test.TestListener, class jakarta.servlet.GenericServlet, class org.example.test.RoleAnnotationTest, class org.example.test.AsyncListenerServlet, class org.example.test.MultiPartTest, class org.example.test.AnnotationTest]
| | | | +> org.example.AnnotationTest.sclFromSclRegoTest=true
| | | | +> org.example.AnnotationTest.invalidListenerRegoTest=true
| | | | +> org.eclipse.jetty.ee10.websocket.api.WebSocketContainer=oeje10ws.JettyWebSocketServerContainer@3d7fb838{STARTED}
| | | | +> request-character-encoding=utf-8
| | | | +> org.example.AnnotationTest.sclInjectTest=true
| | | | +> org.example.AnnotationTest.sclInjectWebListenerTest=true

@janbartel
Copy link
Contributor

janbartel commented Dec 8, 2022

Set from external configuration (or defaults):
| | | | +> response-character-encoding=utf-8
| | | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=./jakarta.servlet-api-[^/].jar$|.jakarta.servlet.jsp.jstl-..jar$

These are removed in various Configuration.deconfigure() calls:
| | | | +> org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=3]
| | | | +> org.eclipse.jetty.lifecyleCallbackCollection=org.eclipse.jetty.ee10.plus.annotation.LifeCycleCallbackCollection@2bc378f7
| | | | +> org.eclipse.jetty.injectionCollection=org.eclipse.jetty.ee10.plus.annotation.InjectionCollection@268cbb86
| | | | +> org.eclipse.jetty.jndi.EnvConfiguration=[org.eclipse.jetty.ee10.plus.webapp.EnvConfiguration$Bound@10f7918f, org.eclipse.jetty.ee10.plus.webapp.EnvConfiguration$Bound@64d4f7c7]

Spec required:
| | | | +> jakarta.servlet.context.tempdir=/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-
| | | | +> jakarta.servlet.context.orderedLibs=[/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp/WEB-INF/lib/jetty-ee10-demo-container-initializer-12.0.0-SNAPSHOT.jar, /home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp/WEB-INF/lib/jetty-ee10-demo-web-fragment-12.0.0-SNAPSHOT.jar]
| | | | +> jakarta.websocket.server.ServerContainer=oeje10wjsi.JakartaWebSocketServerContainer@74fab04a{STARTED}

Jasper controlled:
| | | | +> org.apache.jasper.compiler.TldCache=org.apache.jasper.compiler.TldCache@17f3eefb
| | | | +> org.apache.catalina.jsp_classpath=
| | | | +> org.apache.tomcat.InstanceManager=org.apache.tomcat.SimpleInstanceManager@54e02f6a

Attributes related to the demo:
| | | | +> org.example.AnnotationTest.sclInjectTest=true
| | | | +> org.example.AnnotationTest.sclInjectWebListenerTest=true
| | | | +> org.example.Foo=[class org.example.test.SecuredServlet, class org.example.test.Bar, class org.example.fragment.FragmentServlet, class org.example.test.ClassLoaderServlet, class jakarta.servlet.http.HttpServlet, class org.example.test.TestListener, class jakarta.servlet.GenericServlet, class org.example.test.RoleAnnotationTest, class org.example.test.AsyncListenerServlet, class org.example.test.MultiPartTest, class org.example.test.AnnotationTest]
| | | | +> org.example.jsp.file=true
| | | | +> org.example.AnnotationTest.sclFromSclRegoTest=true
| | | | +> org.example.AnnotationTest.invalidListenerRegoTest=true
| | | | +> org.example.AnnotationTest.sclSetSessionTimeout=true
| | | | +> org.example.AnnotationTest.listenerRegoTest=true
| | | | +> org.example.AnnotationTest.listenerTest=true
| | | | +> org.example.AnnotationTest.programListenerInjectTest=true
| | | | +> org.example.AnnotationTest.sclGetSessionTimeout=true
| | | | +> org.example.AnnotationTest.complete=true
| | | | +> default-context-path=/test-spec

Never cleared:
| | | | +> org.eclipse.jetty.webapp.tmpResourceBase=/home/janb/src/jetty-eclipse/jetty-12.0.x/jetty-home/target/base/work/jetty-0_0_0_0-8443-ee10-demo-spec_war-_ee10-test-spec-any-/webapp

Not sure if ever cleared?:
| | | | +> org.eclipse.jetty.server.Executor=QueuedThreadPool[qtp852687460]@32d2fa64{STARTED,10<=11<=200,i=0,r=-1,q=0}[ReservedThreadExecutor@20cece0b{reserved=0/8,pending=0}]

Websocket related attributes (cleared?):
| | | | +> org.eclipse.jetty.websocket.core.server.WebSocketMappings=org.eclipse.jetty.websocket.core.server.WebSocketMappings@ccf91df
| | | | +> org.eclipse.jetty.ee10.websocket.api.WebSocketContainer=oeje10ws.JettyWebSocketServerContainer@3d7fb838{STARTED}
| | | | +> org.eclipse.jetty.websocket.core.WebSocketComponents=oejwcs.WebSocketServerComponents@267dc982{STARTED}

@joakime
Copy link
Contributor Author

joakime commented Dec 8, 2022

Move this one to Spec required:

| | | | +> jakarta.websocket.server.ServerContainer=oeje10wjsi.JakartaWebSocketServerContainer@74fab04a{STARTED}

@janbartel
Copy link
Contributor

@joakime done.

@joakime
Copy link
Contributor Author

joakime commented Dec 20, 2022

Closing, PR #9024 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

No branches or pull requests

3 participants