You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2023/01/05 15:23:44 UTC

[skywalking-java] branch deadlock created (now 158d311928)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a change to branch deadlock
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git


      at 158d311928 Add changelog.

This branch includes the following new commits:

     new 989e88f5f8 Move `Agent-Version` property reading to fix a deadlock
     new 158d311928 Add changelog.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-java] 02/02: Add changelog.

Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch deadlock
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git

commit 158d311928b319a5bf5870a2da02a8a86edfdd0c
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Jan 5 23:23:35 2023 +0800

    Add changelog.
---
 CHANGES.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 0b067b1543..e8e029ff0a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -23,7 +23,7 @@ Release Notes.
 * Add support for KafkaClients 3.x.
 * Support to customize the collect period of JVM relative metrics.
 * Upgrade netty-codec-http2 to 4.1.86.Final.
-* Remove `Agent-Version` property from the class loading stage to avoid deadlock when use `jarsigner`.
+* Move `Agent-Version` property reading away from the class loading stage to avoid deadlock when use `jarsigner`.
 
 #### Documentation
 


[skywalking-java] 01/02: Move `Agent-Version` property reading to fix a deadlock

Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch deadlock
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git

commit 989e88f5f8e60fd27c0bec54b85f63c913eb5f57
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Jan 5 23:22:43 2023 +0800

    Move `Agent-Version` property reading to fix a deadlock
---
 CHANGES.md                                                             | 1 +
 .../org/apache/skywalking/apm/agent/core/remote/AgentIDDecorator.java  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index f67237ae94..0b067b1543 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -23,6 +23,7 @@ Release Notes.
 * Add support for KafkaClients 3.x.
 * Support to customize the collect period of JVM relative metrics.
 * Upgrade netty-codec-http2 to 4.1.86.Final.
+* Remove `Agent-Version` property from the class loading stage to avoid deadlock when use `jarsigner`.
 
 #### Documentation
 
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AgentIDDecorator.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AgentIDDecorator.java
index 46ad74de14..4149597512 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AgentIDDecorator.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AgentIDDecorator.java
@@ -40,7 +40,7 @@ import org.apache.skywalking.apm.agent.core.logging.api.LogManager;
  */
 public class AgentIDDecorator implements ChannelDecorator {
     private static final ILog LOGGER = LogManager.getLogger(AgentIDDecorator.class);
-    private static final Metadata.Key<String> AGENT_VERSION_HEAD_HEADER_NAME = Metadata.Key.of("Agent-Version", Metadata.ASCII_STRING_MARSHALLER);
+    private static Metadata.Key<String> AGENT_VERSION_HEAD_HEADER_NAME;
     private String version = "UNKNOWN";
 
     public AgentIDDecorator() {
@@ -61,6 +61,7 @@ public class AgentIDDecorator implements ChannelDecorator {
                     }
                 }
             }
+            AGENT_VERSION_HEAD_HEADER_NAME = Metadata.Key.of("Agent-Version", Metadata.ASCII_STRING_MARSHALLER);
         } catch (Exception e) {
             LOGGER.warn("Can't read version from MANIFEST.MF in the agent jar");
         }