Fix java attach - #11848
Conversation
8b7a284 to
f289555
Compare
Add a shared java_attach_preflight() gate used by both the Java symbol collector and deepflow-jattach before socket creation, Agent SO copying, or injection. The preflight validates process liveness and zombie state, identifies HotSpot/OpenJ9 from the target maps, executes the target JVM's -version in the correct Host/POD namespace, and rechecks PID start time and executable path to detect reuse. For HotSpot Java 8, distinguish the 8u0-351 range missing JDK-8173361 from the 8u352-381 range missing the 8u-specific JDK-8305165 follow-up; keep 8u382 as the complete-fix attach baseline and log the two skip reasons separately. Also reject DisableAttachMechanism and unreadable attach options, harden command/output buffers, and add the local release-check script plus investigation and operator documentation.
f289555 to
32f9452
Compare
|
@claude review一下当前PR中的代码修改 |
|
Claude finished @kylewanginchina's task in 12m 18s —— View job Todo
Review整体思路没问题:
Summary
|
Add a shared java_attach_preflight() gate used by both the Java symbol collector and deepflow-jattach before socket creation, Agent SO copying, or injection.
The preflight validates process liveness and zombie state, identifies HotSpot/OpenJ9 from the target maps, executes the target JVM's -version in the correct Host/POD namespace, and rechecks PID start time and executable path to detect reuse.
For HotSpot Java 8, distinguish the 8u0-351 range missing JDK-8173361 from the 8u352-381 range missing the 8u-specific JDK-8305165 follow-up; keep 8u382 as the complete-fix attach baseline and log the two skip reasons separately. Also reject DisableAttachMechanism and unreadable attach options, harden command/output buffers, and add the local release-check script plus investigation and operator documentation.
This PR is for:
Affected branches
5.1 JVM 缺陷复现测试
5.2 Attach 预检测试
git diff --checkDisableAttachMechanism参数