IBM Support

How to trace if code is calling System.exit()

Question & Answer


How do I trace to see what code is calling System.exit() ? When System.exit() is called by any code, it terminates the currently running Java™ Virtual Machine. An unexpected call to System.exit() by any code would lead to Java processes vanishing and the appserver will fail. Most of the time, this is considered as a crash without any footprint. Since it is a normal termination, no system core or javacore is created that would otherwise provide information about the problem.


The most probable reason for a crash without any footprint or core is that some code has called System.exit(). Since there is no footprint, there is no way to tell which piece of code called System.exit().


To find out which part of the application or server code has called System.exit(), enable the following trace in the appserver. This trace will generate a javacore whenever some code calls System.exit().

Note that a restart of the server is needed after enabling the traces. To enable this trace add the following in the Generic JVM arguments

  • For IBM® WebSphere® Application Server V6.1 and higher:

  • For IBM® WebSphere® Application Server V6.0 and earlier: -Dibm.dg.trc.trigger=method(java/lang/System.exit,javadump)

NOTE: There is a significant performance impact possible when this trace is enabled. This trace should only be implemented at the request of IBM Support and then removed when problem determination has been completed.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Crash","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.5.5;8.5;8.0;7.0;6.1;6.0.2","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}},{"Product":{"code":"SS7JFU","label":"WebSphere Application Server - Express"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"J2EE Development and deployment","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.5.5;8.5;8.0;7.0;6.1;6.0.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018