<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cortex XDR JDP method instrumentation causing severe Java runtime slowness (agent 9.2.0.120) — follow-up to solved cyjagent crash thread in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xdr-jdp-method-instrumentation-causing-severe-java/m-p/1262500#M9510</link>
    <description>&lt;P dir="ltr"&gt;This is a follow-up to a previously solved thread: &lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xdr-cyjagent-dll-injection-causes-jvm-startup-crash/m-p/1261632#M9495" target="_self" rel="noreferrer"&gt;Cortex XDR cyjagent.dll injection causes JVM startup crash&lt;/A&gt;, where &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/241098"&gt;@susekar&lt;/a&gt; confirmed the known JDP/JVM conflict (CPATR-38467 / CPATR-18158). Thanks for that confirmation. Since the solution there is already accepted, raising this as a separate topic: we've now observed a &lt;STRONG&gt;second symptom from the same module&lt;/STRONG&gt; — severe runtime slowness rather than a startup crash — on a host running Cortex XDR agent &lt;STRONG&gt;9.2.0.120&lt;/STRONG&gt; (Windows Server 2025), and we'd like it confirmed.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P dir="ltr"&gt;&lt;STRONG&gt;For context — what we observed Cortex doing inside the JVM&lt;/STRONG&gt;&lt;/P&gt;
&lt;P dir="ltr"&gt;Cortex is not only scanning files. It is instrumenting selected Java methods and adding PANW hooks around the original execution:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;Normal:
Poller.run()

Instrumented:
Poller.run()
   -&amp;gt; PANW hook
   -&amp;gt; Poller.run$PANW()
   -&amp;gt; PANW hook&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P dir="ltr"&gt;The &lt;CODE&gt;$PANW&lt;/CODE&gt; method appears to contain the original method logic, while the wrapper calls Cortex hooks before/after execution. Those hooks can add delay because execution goes from Java into Cortex's native code:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;Application code
   -&amp;gt; PanwHooks.MethodLeave1()
   -&amp;gt; PanwHooks.NativeMethodLeave()
   -&amp;gt; Cortex processing
   -&amp;gt; back to Java&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P dir="ltr"&gt;For a method that runs occasionally, this overhead may be negligible. But on the affected host, ~34 methods were instrumented — including hot paths such as the Tomcat NIO Poller, SocketProcessor, thread-pool execution, REST request processing, and &lt;CODE&gt;java.io.FileOutputStream&lt;/CODE&gt;. &lt;CODE&gt;NativeMethodLeave&lt;/CODE&gt; was visible in 9/9 consecutive thread dumps, suggesting threads spend noticeable time in/around the Cortex hook.&lt;/P&gt;
&lt;P dir="ltr"&gt;The measured impact was severe on connection-handling paths: &lt;STRONG&gt;NIO connection and WebSocket operations that normally complete in milliseconds were taking 8–9 seconds&lt;/STRONG&gt; while instrumented, and overall per-request latency was roughly &lt;STRONG&gt;9× higher&lt;/STRONG&gt; than on an otherwise comparable host where only ~1 method was instrumented.&lt;/P&gt;
&lt;P dir="ltr"&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P dir="ltr"&gt;i) Is runtime performance degradation from JDP method hooks a known issue, and is it covered by the CPATR-38467 fix in 9.2.1, or tracked separately?&lt;/P&gt;
&lt;P dir="ltr"&gt;ii) What determines the instrumentation scope per host? Two hosts running the same Java application showed ~34 vs ~1 instrumented methods — is this driven by policy, content-update version, or runtime heuristics?&lt;/P&gt;
&lt;P dir="ltr"&gt;iii) Is there a configuration or profile setting that causes the agent to perform deeper analysis/inspection inside these hooks (e.g., on socket or WebSocket paths)? A hook wrapper alone shouldn't turn a millisecond operation into 8–9 seconds, so we'd like to understand whether some Cortex-side investigation (payload analysis, cloud lookup, verdict wait) is being triggered by configuration — and if so, which setting to review.&lt;/P&gt;
&lt;P dir="ltr"&gt;iv) Can you confirm whether stopping agent services does or does not detach already-injected hooks from a running JVM (i.e., is a Java process restart required for the disable to take effect)?&lt;/P&gt;
&lt;P dir="ltr"&gt;v) Kindly share the best practices we should follow to make our Java server application compatible with Cortex agents.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2026 08:29:09 GMT</pubDate>
    <dc:creator>aravindhanr68</dc:creator>
    <dc:date>2026-08-21T08:29:09Z</dc:date>
    <item>
      <title>Cortex XDR JDP method instrumentation causing severe Java runtime slowness (agent 9.2.0.120) — follow-up to solved cyjagent crash thread</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xdr-jdp-method-instrumentation-causing-severe-java/m-p/1262500#M9510</link>
      <description>&lt;P dir="ltr"&gt;This is a follow-up to a previously solved thread: &lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xdr-cyjagent-dll-injection-causes-jvm-startup-crash/m-p/1261632#M9495" target="_self" rel="noreferrer"&gt;Cortex XDR cyjagent.dll injection causes JVM startup crash&lt;/A&gt;, where &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/241098"&gt;@susekar&lt;/a&gt; confirmed the known JDP/JVM conflict (CPATR-38467 / CPATR-18158). Thanks for that confirmation. Since the solution there is already accepted, raising this as a separate topic: we've now observed a &lt;STRONG&gt;second symptom from the same module&lt;/STRONG&gt; — severe runtime slowness rather than a startup crash — on a host running Cortex XDR agent &lt;STRONG&gt;9.2.0.120&lt;/STRONG&gt; (Windows Server 2025), and we'd like it confirmed.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P dir="ltr"&gt;&lt;STRONG&gt;For context — what we observed Cortex doing inside the JVM&lt;/STRONG&gt;&lt;/P&gt;
&lt;P dir="ltr"&gt;Cortex is not only scanning files. It is instrumenting selected Java methods and adding PANW hooks around the original execution:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;Normal:
Poller.run()

Instrumented:
Poller.run()
   -&amp;gt; PANW hook
   -&amp;gt; Poller.run$PANW()
   -&amp;gt; PANW hook&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P dir="ltr"&gt;The &lt;CODE&gt;$PANW&lt;/CODE&gt; method appears to contain the original method logic, while the wrapper calls Cortex hooks before/after execution. Those hooks can add delay because execution goes from Java into Cortex's native code:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;Application code
   -&amp;gt; PanwHooks.MethodLeave1()
   -&amp;gt; PanwHooks.NativeMethodLeave()
   -&amp;gt; Cortex processing
   -&amp;gt; back to Java&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P dir="ltr"&gt;For a method that runs occasionally, this overhead may be negligible. But on the affected host, ~34 methods were instrumented — including hot paths such as the Tomcat NIO Poller, SocketProcessor, thread-pool execution, REST request processing, and &lt;CODE&gt;java.io.FileOutputStream&lt;/CODE&gt;. &lt;CODE&gt;NativeMethodLeave&lt;/CODE&gt; was visible in 9/9 consecutive thread dumps, suggesting threads spend noticeable time in/around the Cortex hook.&lt;/P&gt;
&lt;P dir="ltr"&gt;The measured impact was severe on connection-handling paths: &lt;STRONG&gt;NIO connection and WebSocket operations that normally complete in milliseconds were taking 8–9 seconds&lt;/STRONG&gt; while instrumented, and overall per-request latency was roughly &lt;STRONG&gt;9× higher&lt;/STRONG&gt; than on an otherwise comparable host where only ~1 method was instrumented.&lt;/P&gt;
&lt;P dir="ltr"&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P dir="ltr"&gt;i) Is runtime performance degradation from JDP method hooks a known issue, and is it covered by the CPATR-38467 fix in 9.2.1, or tracked separately?&lt;/P&gt;
&lt;P dir="ltr"&gt;ii) What determines the instrumentation scope per host? Two hosts running the same Java application showed ~34 vs ~1 instrumented methods — is this driven by policy, content-update version, or runtime heuristics?&lt;/P&gt;
&lt;P dir="ltr"&gt;iii) Is there a configuration or profile setting that causes the agent to perform deeper analysis/inspection inside these hooks (e.g., on socket or WebSocket paths)? A hook wrapper alone shouldn't turn a millisecond operation into 8–9 seconds, so we'd like to understand whether some Cortex-side investigation (payload analysis, cloud lookup, verdict wait) is being triggered by configuration — and if so, which setting to review.&lt;/P&gt;
&lt;P dir="ltr"&gt;iv) Can you confirm whether stopping agent services does or does not detach already-injected hooks from a running JVM (i.e., is a Java process restart required for the disable to take effect)?&lt;/P&gt;
&lt;P dir="ltr"&gt;v) Kindly share the best practices we should follow to make our Java server application compatible with Cortex agents.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2026 08:29:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/cortex-xdr-jdp-method-instrumentation-causing-severe-java/m-p/1262500#M9510</guid>
      <dc:creator>aravindhanr68</dc:creator>
      <dc:date>2026-08-21T08:29:09Z</dc:date>
    </item>
  </channel>
</rss>

