We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
卸载repeater或者停用repeater ttl增强后可恢复,同样是用com.alibaba.ttl.TransmittableThreadLocal,二次增强会导致skywalking增强失效
java.util.concurrent.ThreadPoolExecutor 增强后字节码如下: public void execute(java.lang.Runnable); Code: 0: iconst_2 1: pop 2: iconst_1 3: anewarray #476 // class java/lang/Object 6: dup 7: iconst_0 8: aload_1 9: aastore 10: dup 11: ldc_w #614 // String default 14: sipush 1059 17: iconst_0 18: ldc_w #616 // String java.util.concurrent.ThreadPoolExecutor 21: ldc_w #602 // String execute 24: ldc_w #617 // String (Ljava/lang/Runnable;)V 27: aload_0 28: invokestatic #623 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnBefore:([Ljava/lang/Object;Ljava/lang/String;IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret; 31: swap 32: dup 33: iconst_0 34: aaload 35: checkcast #254 // class java/lang/Runnable 38: astore_1 39: pop 40: dup 41: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I 44: dup 45: iconst_1 46: if_icmpeq 56 49: iconst_2 50: if_icmpeq 65 53: goto 72 56: pop 57: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 60: pop 61: return 62: nop 63: nop 64: athrow 65: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 68: checkcast #232 // class java/lang/Throwable 71: athrow 72: pop 73: iconst_3 74: pop 75: aload_1 76: ifnonnull 82 79: goto 117 82: invokestatic #601 // Method org/apache/skywalking/apm/toolkit/activation/executor/ExecutorMethodAdvice$ExecutorMethodAdviceHelper.getInstance:()Lorg/apache/skywalking/apm/toolkit/activation/executor/ExecutorMethodAdvice$ExecutorMethodAdviceHelper; 85: ldc #230 // class java/util/concurrent/ThreadPoolExecutor 87: ldc_w #602 // String execute 90: iconst_1 91: anewarray #604 // class java/lang/Class 94: dup 95: iconst_0 96: ldc #254 // class java/lang/Runnable 98: aastore 99: invokevirtual #608 // Method java/lang/Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; 102: aload_1 103: invokevirtual #612 // Method org/apache/skywalking/apm/toolkit/activation/executor/ExecutorMethodAdvice$ExecutorMethodAdviceHelper.enter:(Ljava/lang/reflect/Method;Ljava/lang/Object;)Ljava/lang/Object; 106: checkcast #254 // class java/lang/Runnable 109: astore_1 110: goto 114 113: astore_2 114: goto 117 117: aload_1 118: ifnonnull 129 121: new #104 // class java/lang/NullPointerException 124: dup 125: invokespecial #105 // Method java/lang/NullPointerException."":()V 128: athrow 129: aload_0 130: getfield #5 // Field java/util/concurrent/ThreadPoolExecutor.ctl:Ljava/util/concurrent/atomic/AtomicInteger; 133: invokevirtual #7 // Method java/util/concurrent/atomic/AtomicInteger.get:()I 136: istore_2 137: iload_2 138: invokestatic #10 // Method java/util/concurrent/ThreadPoolExecutor.workerCountOf:(I)I 141: aload_0 142: getfield #52 // Field java/util/concurrent/ThreadPoolExecutor.corePoolSize:I 145: if_icmpge 213 148: aload_0 149: aload_1 150: iconst_1 151: invokespecial #72 // Method java/util/concurrent/ThreadPoolExecutor.addWorker:(Ljava/lang/Runnable;Z)Z 154: ifeq 205 157: iconst_2 158: pop 159: aconst_null 160: ldc_w #614 // String default 163: sipush 1059 166: invokestatic #636 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnReturn:(Ljava/lang/Object;Ljava/lang/String;I)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret; 169: dup 170: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I 173: dup 174: iconst_1 175: if_icmpeq 185 178: iconst_2 179: if_icmpeq 194 182: goto 201 185: pop 186: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 189: pop 190: return 191: nop 192: nop 193: athrow 194: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 197: checkcast #232 // class java/lang/Throwable 200: athrow 201: pop 202: iconst_3 203: pop 204: return 205: aload_0 206: getfield #5 // Field java/util/concurrent/ThreadPoolExecutor.ctl:Ljava/util/concurrent/atomic/AtomicInteger; 209: invokevirtual #7 // Method java/util/concurrent/atomic/AtomicInteger.get:()I 212: istore_2 213: iload_2 214: invokestatic #12 // Method java/util/concurrent/ThreadPoolExecutor.isRunning:(I)Z 217: ifeq 281 220: aload_0 221: getfield #15 // Field java/util/concurrent/ThreadPoolExecutor.workQueue:Ljava/util/concurrent/BlockingQueue; 224: aload_1 225: invokeinterface #110, 2 // InterfaceMethod java/util/concurrent/BlockingQueue.offer:(Ljava/lang/Object;)Z 230: ifeq 281 233: aload_0 234: getfield #5 // Field java/util/concurrent/ThreadPoolExecutor.ctl:Ljava/util/concurrent/atomic/AtomicInteger; 237: invokevirtual #7 // Method java/util/concurrent/atomic/AtomicInteger.get:()I 240: istore_3 241: iload_3 242: invokestatic #12 // Method java/util/concurrent/ThreadPoolExecutor.isRunning:(I)Z 245: ifne 264 248: aload_0 249: aload_1 250: invokevirtual #111 // Method java/util/concurrent/ThreadPoolExecutor.remove:(Ljava/lang/Runnable;)Z 253: ifeq 264 256: aload_0 257: aload_1 258: invokevirtual #112 // Method java/util/concurrent/ThreadPoolExecutor.reject:(Ljava/lang/Runnable;)V 261: goto 278 264: iload_3 265: invokestatic #10 // Method java/util/concurrent/ThreadPoolExecutor.workerCountOf:(I)I 268: ifne 278 271: aload_0 272: aconst_null 273: iconst_0 274: invokespecial #72 // Method java/util/concurrent/ThreadPoolExecutor.addWorker:(Ljava/lang/Runnable;Z)Z 277: pop 278: goto 295 281: aload_0 282: aload_1 283: iconst_0 284: invokespecial #72 // Method java/util/concurrent/ThreadPoolExecutor.addWorker:(Ljava/lang/Runnable;Z)Z 287: ifne 295 290: aload_0 291: aload_1 292: invokevirtual #112 // Method java/util/concurrent/ThreadPoolExecutor.reject:(Ljava/lang/Runnable;)V 295: iconst_2 296: pop 297: aconst_null 298: ldc_w #614 // String default 301: sipush 1059 304: invokestatic #636 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnReturn:(Ljava/lang/Object;Ljava/lang/String;I)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret; 307: dup 308: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I 311: dup 312: iconst_1 313: if_icmpeq 323 316: iconst_2 317: if_icmpeq 332 320: goto 339 323: pop 324: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 327: pop 328: return 329: nop 330: nop 331: athrow 332: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 335: checkcast #232 // class java/lang/Throwable 338: athrow 339: pop 340: iconst_3 341: pop 342: return 343: iconst_2 344: pop 345: astore 4 347: aload 4 349: ldc_w #614 // String default 352: sipush 1059 355: invokestatic #640 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnThrows:(Ljava/lang/Throwable;Ljava/lang/String;I)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret; 358: dup 359: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I 362: dup 363: iconst_1 364: if_icmpeq 374 367: iconst_2 368: if_icmpeq 383 371: goto 390 374: pop 375: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 378: pop 379: return 380: nop 381: nop 382: athrow 383: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object; 386: checkcast #232 // class java/lang/Throwable 389: athrow 390: pop 391: aload 4 393: iconst_3 394: pop 395: athrow Exception table: from to target type 82 110 113 Class java/lang/Throwable 2 62 343 Class java/lang/Throwable 65 191 343 Class java/lang/Throwable 194 329 343 Class java/lang/Throwable 332 343 343 Class java/lang/Throwable LineNumberTable: line 1343: 75 line 1344: 121 line 1365: 129 line 1366: 137 line 1367: 148 line 1368: 157 line 1369: 205 line 1371: 213 line 1372: 233 line 1373: 241 line 1374: 256 line 1375: 264 line 1376: 271 line 1377: 278 line 1378: 281 line 1379: 290 line 1380: 295 LocalVariableTable: Start Length Slot Name Signature 343 53 5 t Ljava/lang/Throwable;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
卸载repeater或者停用repeater ttl增强后可恢复,同样是用com.alibaba.ttl.TransmittableThreadLocal,二次增强会导致skywalking增强失效
java.util.concurrent.ThreadPoolExecutor 增强后字节码如下:
public void execute(java.lang.Runnable);
Code:
0: iconst_2
1: pop
2: iconst_1
3: anewarray #476 // class java/lang/Object
6: dup
7: iconst_0
8: aload_1
9: aastore
10: dup
11: ldc_w #614 // String default
14: sipush 1059
17: iconst_0
18: ldc_w #616 // String java.util.concurrent.ThreadPoolExecutor
21: ldc_w #602 // String execute
24: ldc_w #617 // String (Ljava/lang/Runnable;)V
27: aload_0
28: invokestatic #623 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnBefore:([Ljava/lang/Object;Ljava/lang/String;IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret;
31: swap
32: dup
33: iconst_0
34: aaload
35: checkcast #254 // class java/lang/Runnable
38: astore_1
39: pop
40: dup
41: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I
44: dup
45: iconst_1
46: if_icmpeq 56
49: iconst_2
50: if_icmpeq 65
53: goto 72
56: pop
57: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
60: pop
61: return
62: nop
63: nop
64: athrow
65: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
68: checkcast #232 // class java/lang/Throwable
71: athrow
72: pop
73: iconst_3
74: pop
75: aload_1
76: ifnonnull 82
79: goto 117
82: invokestatic #601 // Method org/apache/skywalking/apm/toolkit/activation/executor/ExecutorMethodAdvice$ExecutorMethodAdviceHelper.getInstance:()Lorg/apache/skywalking/apm/toolkit/activation/executor/ExecutorMethodAdvice$ExecutorMethodAdviceHelper;
85: ldc #230 // class java/util/concurrent/ThreadPoolExecutor
87: ldc_w #602 // String execute
90: iconst_1
91: anewarray #604 // class java/lang/Class
94: dup
95: iconst_0
96: ldc #254 // class java/lang/Runnable
98: aastore
99: invokevirtual #608 // Method java/lang/Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
102: aload_1
103: invokevirtual #612 // Method org/apache/skywalking/apm/toolkit/activation/executor/ExecutorMethodAdvice$ExecutorMethodAdviceHelper.enter:(Ljava/lang/reflect/Method;Ljava/lang/Object;)Ljava/lang/Object;
106: checkcast #254 // class java/lang/Runnable
109: astore_1
110: goto 114
113: astore_2
114: goto 117
117: aload_1
118: ifnonnull 129
121: new #104 // class java/lang/NullPointerException
124: dup
125: invokespecial #105 // Method java/lang/NullPointerException."":()V
128: athrow
129: aload_0
130: getfield #5 // Field java/util/concurrent/ThreadPoolExecutor.ctl:Ljava/util/concurrent/atomic/AtomicInteger;
133: invokevirtual #7 // Method java/util/concurrent/atomic/AtomicInteger.get:()I
136: istore_2
137: iload_2
138: invokestatic #10 // Method java/util/concurrent/ThreadPoolExecutor.workerCountOf:(I)I
141: aload_0
142: getfield #52 // Field java/util/concurrent/ThreadPoolExecutor.corePoolSize:I
145: if_icmpge 213
148: aload_0
149: aload_1
150: iconst_1
151: invokespecial #72 // Method java/util/concurrent/ThreadPoolExecutor.addWorker:(Ljava/lang/Runnable;Z)Z
154: ifeq 205
157: iconst_2
158: pop
159: aconst_null
160: ldc_w #614 // String default
163: sipush 1059
166: invokestatic #636 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnReturn:(Ljava/lang/Object;Ljava/lang/String;I)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret;
169: dup
170: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I
173: dup
174: iconst_1
175: if_icmpeq 185
178: iconst_2
179: if_icmpeq 194
182: goto 201
185: pop
186: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
189: pop
190: return
191: nop
192: nop
193: athrow
194: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
197: checkcast #232 // class java/lang/Throwable
200: athrow
201: pop
202: iconst_3
203: pop
204: return
205: aload_0
206: getfield #5 // Field java/util/concurrent/ThreadPoolExecutor.ctl:Ljava/util/concurrent/atomic/AtomicInteger;
209: invokevirtual #7 // Method java/util/concurrent/atomic/AtomicInteger.get:()I
212: istore_2
213: iload_2
214: invokestatic #12 // Method java/util/concurrent/ThreadPoolExecutor.isRunning:(I)Z
217: ifeq 281
220: aload_0
221: getfield #15 // Field java/util/concurrent/ThreadPoolExecutor.workQueue:Ljava/util/concurrent/BlockingQueue;
224: aload_1
225: invokeinterface #110, 2 // InterfaceMethod java/util/concurrent/BlockingQueue.offer:(Ljava/lang/Object;)Z
230: ifeq 281
233: aload_0
234: getfield #5 // Field java/util/concurrent/ThreadPoolExecutor.ctl:Ljava/util/concurrent/atomic/AtomicInteger;
237: invokevirtual #7 // Method java/util/concurrent/atomic/AtomicInteger.get:()I
240: istore_3
241: iload_3
242: invokestatic #12 // Method java/util/concurrent/ThreadPoolExecutor.isRunning:(I)Z
245: ifne 264
248: aload_0
249: aload_1
250: invokevirtual #111 // Method java/util/concurrent/ThreadPoolExecutor.remove:(Ljava/lang/Runnable;)Z
253: ifeq 264
256: aload_0
257: aload_1
258: invokevirtual #112 // Method java/util/concurrent/ThreadPoolExecutor.reject:(Ljava/lang/Runnable;)V
261: goto 278
264: iload_3
265: invokestatic #10 // Method java/util/concurrent/ThreadPoolExecutor.workerCountOf:(I)I
268: ifne 278
271: aload_0
272: aconst_null
273: iconst_0
274: invokespecial #72 // Method java/util/concurrent/ThreadPoolExecutor.addWorker:(Ljava/lang/Runnable;Z)Z
277: pop
278: goto 295
281: aload_0
282: aload_1
283: iconst_0
284: invokespecial #72 // Method java/util/concurrent/ThreadPoolExecutor.addWorker:(Ljava/lang/Runnable;Z)Z
287: ifne 295
290: aload_0
291: aload_1
292: invokevirtual #112 // Method java/util/concurrent/ThreadPoolExecutor.reject:(Ljava/lang/Runnable;)V
295: iconst_2
296: pop
297: aconst_null
298: ldc_w #614 // String default
301: sipush 1059
304: invokestatic #636 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnReturn:(Ljava/lang/Object;Ljava/lang/String;I)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret;
307: dup
308: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I
311: dup
312: iconst_1
313: if_icmpeq 323
316: iconst_2
317: if_icmpeq 332
320: goto 339
323: pop
324: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
327: pop
328: return
329: nop
330: nop
331: athrow
332: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
335: checkcast #232 // class java/lang/Throwable
338: athrow
339: pop
340: iconst_3
341: pop
342: return
343: iconst_2
344: pop
345: astore 4
347: aload 4
349: ldc_w #614 // String default
352: sipush 1059
355: invokestatic #640 // Method java/com/alibaba/jvm/sandbox/spy/Spy.spyMethodOnThrows:(Ljava/lang/Throwable;Ljava/lang/String;I)Ljava/com/alibaba/jvm/sandbox/spy/Spy$Ret;
358: dup
359: getfield #628 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.state:I
362: dup
363: iconst_1
364: if_icmpeq 374
367: iconst_2
368: if_icmpeq 383
371: goto 390
374: pop
375: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
378: pop
379: return
380: nop
381: nop
382: athrow
383: getfield #632 // Field java/com/alibaba/jvm/sandbox/spy/Spy$Ret.respond:Ljava/lang/Object;
386: checkcast #232 // class java/lang/Throwable
389: athrow
390: pop
391: aload 4
393: iconst_3
394: pop
395: athrow
Exception table:
from to target type
82 110 113 Class java/lang/Throwable
2 62 343 Class java/lang/Throwable
65 191 343 Class java/lang/Throwable
194 329 343 Class java/lang/Throwable
332 343 343 Class java/lang/Throwable
LineNumberTable:
line 1343: 75
line 1344: 121
line 1365: 129
line 1366: 137
line 1367: 148
line 1368: 157
line 1369: 205
line 1371: 213
line 1372: 233
line 1373: 241
line 1374: 256
line 1375: 264
line 1376: 271
line 1377: 278
line 1378: 281
line 1379: 290
line 1380: 295
LocalVariableTable:
Start Length Slot Name Signature
343 53 5 t Ljava/lang/Throwable;
The text was updated successfully, but these errors were encountered: