[DiSL-user] Instrument all classes

Sui, Li L.Sui at massey.ac.nz
Thu Feb 14 00:22:13 CET 2019


Hi Andrea


Sure, here is the link  https://drive.google.com/file/d/1YCVXBbY5sieMFA5mMK89XdWEGAO7lGai/view?usp=sharing


I modified code in example/smoke/src-inst/DiSLClass.java and build-example.xml


Cheers

Li

________________________________
From: Disl-user <disl-user-bounces at d3s.mff.cuni.cz> on behalf of Andrea Rosa <andrea.rosa at usi.ch>
Sent: Thursday, February 14, 2019 11:33:49 AM
To: disl-user at d3s.mff.cuni.cz
Subject: Re: [DiSL-user] Instrument all classes

Hi Li,

would you mind sharing with us a tarball with the failing instrumentation?

Thanks,
Andrea

------------
Andrea Rosà
Postdoctoral Researcher
Faculty of Informatics - Office SI-205
Università della Svizzera italiana (USI)
Via G. Buffi 13
CH-6904 Lugano
Switzerland
(e) andrea.rosa at usi.ch<mailto:andrea.rosa at usi.ch>
(p) +41 58 666 4455 ext. 2183
(w) http://www.inf.usi.ch/phd/rosaa/

On 13 Feb 2019, at 23:26, Sui, Li <L.Sui at massey.ac.nz<mailto:L.Sui at massey.ac.nz>> wrote:

Hi Lubomir

I trying to construct a call graph dynamically. The scope of the analysis is Java Class library+application. So I would like to include classes in JDK as many as possible.
I believe the bottom layer of DiSL can fully instrument JDK, is it right? It seems I have to implement something similar to that?

Cheers
Li
________________________________
From: Lubomír Bulej <bulej at d3s.mff.cuni.cz<mailto:bulej at d3s.mff.cuni.cz>>
Sent: Wednesday, February 13, 2019 9:49:54 PM
To: Sui, Li
Cc: disl-user at d3s.mff.cuni.cz<mailto:disl-user at d3s.mff.cuni.cz>
Subject: Re: [DiSL-user] Instrument all classes

Hi Li,

while DiSL can instrument whatever you want, JVM can be quite picky about some
of the classes in the Java Class Library so when using DiSL alone, the
exclusion list may need to be a bit more extensive.

Can you share a bit of what do you want your instrumentation to do? Chances
are that have tried that before and can help in other ways if not with
debugging, which is not easy to do with the JVM crashing.

Can you get the instrumentation to work if you instrument your application
only, i.e., limit scope to the application package?

Only then I would try to slowly extend the scope of the instrumentation, first
excluding packages such as java.lang.*.*, java.security.*.*, sun.misc.*.*,
sun.reflect.*.* and then try reduce exclusion scope.


Best regards,
Lubomir


On 12/02/2019 21:46, Sui, Li wrote:
> Hi Andrea
>
>
> I still get the error with "-noverify" flag. Does DiSL require a specific JVM
> version? I tested the code on oracle Jdk 1.8_144
>
>
> Cheers
>
> Li
>
> ------------------------------------------------------------------------------
> *From:* Disl-user <disl-user-bounces at d3s.mff.cuni.cz<mailto:disl-user-bounces at d3s.mff.cuni.cz>> on behalf of Andrea Rosa
> <andrea.rosa at usi.ch<mailto:andrea.rosa at usi.ch>>
> *Sent:* Tuesday, February 12, 2019 8:26:50 PM
> *To:* disl-user at d3s.mff.cuni.cz<mailto:disl-user at d3s.mff.cuni.cz>
> *Subject:* Re: [DiSL-user] Instrument all classes
>
> Hi Li,
>
> the error looks related to the bytecode verifier.
>
> Please try disabling it, by adding the “-noverify” flag to the application
> process.
>
> Cheers,
> Andrea
>
> ------------
> Andrea Rosà
> Postdoctoral Researcher
> Faculty of Informatics - Office SI-205
> Università della Svizzera italiana (USI)
> Via G. Buffi 13
> CH-6904 Lugano
> Switzerland
> (e) andrea.rosa at usi.ch<mailto:andrea.rosa at usi.ch><mailto:andrea.rosa at usi.ch>
> (p) +41 58 666 4455 ext. 2183
> (w) http://www.inf.usi.ch/phd/rosaa/
>
> On 12 Feb 2019, at 03:44, Sui, Li
> <L.Sui at massey.ac.nz<mailto:L.Sui at massey.ac.nz><mailto:L.Sui at massey.ac.nz>> wrote:
>
> Hi Andrea
>
> I added java.lang Object* to the exclusion list. I used the "smoke" example
> and change to scope="*"
>
>
>
>      [exec] dislserver: error communicating with client: unexpected end of
> streamError occurred during initialization of VM
>      [exec]
>      [exec] dislreserver: fatal error:
> java.io.EOFExceptionjava.lang.VerifyError: Bad type on operand stack
>      [exec]
>      [exec] Exception Details:
>      [exec]   Location: at
> java.io.DataInputStream.readByte(DataInputStream.java:267)
>      [exec]
>      [exec]
> sun/reflect/ReflectionFactory.hasStaticInitializerForSerialization(Ljava/lang/Class;)Z
> @142: invokespecial
>      [exec]   Reason: at
> ch.usi.dag.dislreserver.DiSLREServer.processRequests(DiSLREServer.java:101)
>      [exec]
>      [exec]     Type 'java/lang/Object' (current frame, stack[3]) is not
> assignable to 'java/lang/Throwable' at
> ch.usi.dag.dislreserver.DiSLREServer.run(DiSLREServer.java:76)
>      [exec]   Current Frame:
>      [exec]
>      [exec]     bci: @142 at
> ch.usi.dag.dislreserver.DiSLREServer.main(DiSLREServer.java:58)
>      [exec]
>      [exec]
>      [exec]     flags: { }
>      [exec]     locals: { 'sun/reflect/ReflectionFactory', 'java/lang/Class',
> 'java/lang/reflect/Method', 'java/lang/Object' }
>      [exec]     stack: { uninitialized 134, uninitialized 134,
> 'java/lang/String', 'java/lang/Object' }
>      [exec]   Bytecode:
>      [exec]     0x0000000: b800 249a 008f b800 29b2 002f 1231 b600
>      [exec]     0x0000010: 37b8 003a a700 16b2 003d 123f b600 3759
>      [exec]     0x0000020: b600 4411 029a b800 48bf b201 8c4d 2cc7
>      [exec]     0x0000030: 0042 1301 8e13 0190 04bd 00a6 5903 12a6
>      [exec]     0x0000040: 53b6 0157 4d2c 04b6 0164 2cb3 018c a700
>      [exec]     0x0000050: 234e bb01 6e59 bb01 9259 b701 9313 0195
>      [exec]     0x0000060: b601 9913 018e b601 9cb6 019f 2db7 0173
>      [exec]     0x0000070: bf2c 0104 bd00 0459 032b 53b6 01a3 c001
>      [exec]     0x0000080: a5b6 01a8 ac4e bb01 6e59 1301 aa2d b701
>      [exec]     0x0000090: 73bf b201 8c4d 2cc7 0042 1301 8e13 0190
>      [exec]     0x00000a0: 04bd 00a6 5903 12a6 53b6 0157 4d2c 04b6
>      [exec]     0x00000b0: 0164 2cb3 018c a700 234e bb01 6e59 bb01
>      [exec]     0x00000c0: 9259 b701 9313 0195 b601 9913 018e b601
>      [exec]     0x00000d0: 9cb6 019f 2db7 0173 bf2c 0104 bd00 0459
>      [exec]     0x00000e0: 032b 53b6 01a3 c001 a5b6 01a8 ac4e bb01
>      [exec]     0x00000f0: 6e59 1301 aa2d b701 73bf
>      [exec]   Exception Handler Table:
>      [exec]     bci [6, 23] => handler: 23
>      [exec]     bci [113, 132] => handler: 133
>      [exec]     bci [113, 132] => handler: 133
>      [exec]     bci [50, 78] => handler: 81
>      [exec]     bci [154, 182] => handler: 185
>      [exec]     bci [217, 236] => handler: 237
>      [exec]     bci [217, 236] => handler: 237
>      [exec]   Stackmap Table:
>      [exec]     same_locals_1_stack_item_frame(@23,Object[#65])
>      [exec]     same_frame(@42)
>      [exec]
> full_frame(@81,{Object[#2],Object[#166],Object[#109]},{Object[#271]})
>      [exec]     same_frame(@113)
>      [exec]     same_locals_1_stack_item_frame(@133,Object[#4])
>      [exec]     chop_frame(@146,1)
>      [exec]     full_frame(@185,{Object[#2],Object[#166],Object[
>      [exec] at
> sun.reflect.ReflectionFactory$GetReflectionFactoryAction.run(ReflectionFactory.java:105)
>      [exec] at
> sun.reflect.ReflectionFactory$GetReflectionFactoryAction.run(ReflectionFactory.java:102)
>      [exec] at java.security.AccessController.doPrivileged(Native Method)
>      [exec] at
> java.lang.reflect.AccessibleObject.<clinit>(AccessibleObject.java:173)
>      [exec]
>
> Cheers
>
> Li
> ________________________________
> From: Disl-user
> <disl-user-bounces at d3s.mff.cuni.cz<mailto:disl-user-bounces at d3s.mff.cuni.cz><mailto:disl-user-bounces at d3s.mff.cuni.cz>>
> on behalf of Andrea Rosa <andrea.rosa at usi.ch<mailto:andrea.rosa at usi.ch><mailto:andrea.rosa at usi.ch>>
> Sent: Monday, February 11, 2019 9:14:51 PM
> To: disl-user at d3s.mff.cuni.cz<mailto:disl-user at d3s.mff.cuni.cz><mailto:disl-user at d3s.mff.cuni.cz>
> Subject: Re: [DiSL-user] Instrument all classes
>
> Hi Li,
>
> please try to exclude java.lang.Object from instrumentation, by adding
> “java.lang.Object.*" to the exclusion list.
> Does it solve the problem? If not, could you please post a stack trace?
>
> Thanks,
> Andrea
>
> ------------
> Andrea Rosà
> Postdoctoral Researcher
> Faculty of Informatics - Office SI-205
> Università della Svizzera italiana (USI)
> Via G. Buffi 13
> CH-6904 Lugano
> Switzerland
> (e) andrea.rosa at usi.ch<mailto:andrea.rosa at usi.ch><mailto:andrea.rosa at usi.ch><mailto:andrea.rosa at usi.ch>
> (p) +41 58 666 4455 ext. 2183
> (w) http://www.inf.usi.ch/phd/rosaa/
>
> On 10 Feb 2019, at 22:31, Sui, Li
> <L.Sui at massey.ac.nz<mailto:L.Sui at massey.ac.nz><mailto:L.Sui at massey.ac.nz><mailto:L.Sui at massey.ac.nz>> wrote:
>
> Dear Community
>
> Does DiSl allow to instrument all classes? (application+ JRE core)?  I tried
> scope = "*"  and JVM crashed. I think DiSl has this dynamic bypass
> mechanismwhich instruments classes in different JVM.
> Is it for DiSl instrumentation only? Does it provide access to user-defined
> instrumentation?
>
> Cheers
> Li
_______________________________________________
Disl-user mailing list
Disl-user at d3s.mff.cuni.cz<mailto:Disl-user at d3s.mff.cuni.cz>
https://d3s.mff.cuni.cz/mailman/listinfo/disl-user

_______________________________________________
Disl-user mailing list
Disl-user at d3s.mff.cuni.cz
https://d3s.mff.cuni.cz/mailman/listinfo/disl-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://d3s.mff.cuni.cz/pipermail/disl-user/attachments/20190213/5eb0f586/attachment-0001.html>


More information about the Disl-user mailing list