how do I get fullstack trace logs in GAE standard environment?

194 views
Skip to first unread message

jie lin

unread,
Oct 5, 2020, 10:33:21 AM10/5/20
to Google App Engine
Hi

I am experiencing an intermitent problem of GAE jetty 9.0 crash. The crash is not caused by a specific restful call. Once GAE jetty 9.0 crashes, the service  (the application) is not accessable anymore and all instances have to be restarted. Have anyone seen the same problem and managed to get full stacktrace logs to find the root cause?

Here is the complete log. on GAE java standard environment, XX:-OmitStackTraceInFastThrow is not supported. any help on getting the full stacktrace is real appreciated.


avax.servlet.ServletException: java.lang.ClassCastException: Stack trace intentionally empty, disable using -XX:-OmitStackTraceInFastThrow at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:297) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:539) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) at com.google.apphosting.runtime.jetty9.RpcConnection.handle(RpcConnection.java:213) at com.google.apphosting.runtime.jetty9.RpcConnector.serviceRequest(RpcConnector.java:81) at com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest(JavaRuntime.java:781) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:744) at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:714) at com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run(JavaRuntime.java:900) at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:270) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassCastException: Stack trace intentionally empty, disable using -XX:-OmitStackTraceInFastThrow

Jerry

Katayoon (Cloud Platform Support)

unread,
Oct 5, 2020, 6:31:16 PM10/5/20
to Google App Engine
Hi Jerry,

App Engine Standard environment is a sandbox and you may not have much control on the execution environment. Looking at ClassCastException doc, this exception indicates that the code has attempted to cast an object to a subclass of which it is not an instance. This seems like an issue in your code, however, if you believe the issue is not from your app, you may create a PRIVATE issue tracker and provide us with your project ID, your App Engine service ID, Version name and the timestamp you have received the issue, so that we would be able to inspect your app's logs to dig into the issue. 

Some other possible ways to debug may be:

- Running load tests locally to try to reproduce the issue, and see if there is an exception when run outside App Engine.
- Looking at the first request on an instance to get the exception -- then trace through the code that would be executed by this request. You may add more application logs to capture more context of the issue.
Reply all
Reply to author
Forward
0 new messages