I have a need to be able to instrument java applications running in a non-global zone and because dtrace cannot be run from the non-global zone, i need to run it from the global zone. However the probes are not visible in the global zone if started in the non-global zone. Below is a more descriptive explanation of the problem. If I load a java class In the global zone with DVM probes enabled: # java -Xrundvmpi:all Test and then execute: # dtrace -l -P ''dvm*'' I get a list of all the probes in effect. # dtrace -l -P ''dvm*'' ID PROVIDER MODULE FUNCTION NAME 37373 dvm23460 libdvmpi.so cbGarbageCollectionFinish gc-stats 37374 dvm23460 libdvmpi.so cbGarbageCollectionFinish gc-finish < snip > However if I start the java process in a local (non-global) zone, and run the dtrace query, I don''t get any results back. Even, though I can see the non-global java process from the global zone using ps. I have applied the 120901-03 patch as per the forum topic: https://solaris10-dtrace-vm-agents.dev.java.net/servlets/ProjectForumMessageView?messageID=10270&forumID=1617 Any assistance greatly appreciated Regards Jason This message posted from opensolaris.org
Hi Jason, Try setting the DTRACE_DOF_INIT_DEBUG environment variable before launching Java and see if it reports any errors. Adam On Tue, Jan 17, 2006 at 02:17:47PM -0800, Jason Pell wrote:> I have a need to be able to instrument java applications running in a non-global zone and because dtrace cannot be run from the non-global zone, i need to run it from the global zone. However the probes are not visible in the global zone if started in the non-global zone. Below is a more descriptive explanation of the problem. > > If I load a java class In the global zone with DVM probes enabled: > # java -Xrundvmpi:all Test > > and then execute: > # dtrace -l -P ''dvm*'' > > I get a list of all the probes in effect. > > # dtrace -l -P ''dvm*'' > ID PROVIDER MODULE FUNCTION NAME > 37373 dvm23460 libdvmpi.so cbGarbageCollectionFinish gc-stats > 37374 dvm23460 libdvmpi.so cbGarbageCollectionFinish gc-finish > > < snip > > > However if I start the java process in a local (non-global) zone, and run the dtrace query, I don''t get any results back. > > Even, though I can see the non-global java process from the global zone using ps. > > I have applied the 120901-03 patch as per the forum topic: > https://solaris10-dtrace-vm-agents.dev.java.net/servlets/ProjectForumMessageView?messageID=10270&forumID=1617 > > Any assistance greatly appreciated > > Regards > Jason > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Hi, It reports the following... w79681 at wpsvrd103d-z01$ java -Xrundvmpi:all Test dtrace DOF libjvm.so: failed to open helper device: No such file or directory dtrace DOF libdvmpi.so: failed to open helper device: No such file or directory I don''t have direct control of the machine to apply patches, so its possible the accompanying kernel patch to 120901-03 has not been properly applied, hopefully will be applied today. Will that make a difference Thanks Jason This message posted from opensolaris.org
Hi, The following device is NOT on the solaris machine: lrwxrwxrwx 1 root root 36 Jan 18 14:20 /dev/dtrace/helper -> ../../devices/pseudo/dtrace at 0:helper Could this be the problem, and is this part of a kernel patch? Thanks Jason This message posted from opensolaris.org
Adam Leventhal
2006-Jan-18 22:55 UTC
[dtrace-discuss] Re: DVM probes not visible across zones
I suspected that that was your problem. This was fixed with the integration for this bug: 6218854 USDT and the jstack() action don''t work on processes on a zone Those should be available in that kernel patch, but if you have a zone already installed you may be able to kludge something up by doing a mknod in the zone''s devices directory to create the helper device. Adam On Wed, Jan 18, 2006 at 02:12:36PM -0800, Jason Pell wrote:> Hi, > > The following device is NOT on the solaris machine: > > lrwxrwxrwx 1 root root 36 Jan 18 14:20 /dev/dtrace/helper -> ../../devices/pseudo/dtrace at 0:helper > > Could this be the problem, and is this part of a kernel patch? > > Thanks > Jason > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Jason Pell
2006-Jan-18 23:16 UTC
[dtrace-discuss] Re: Re: DVM probes not visible across zones
Hi, The kernel patch was applied this morning (AEST) and the device now exists on the non-global zone: $ ls -la /dev/dtrace/helper crw-rw-rw- 1 root sys 155, 1 Jan 19 09:26 /dev/dtrace/helper In the global zone it also exists: $ ls -la /dev/dtrace/helper lrwxrwxrwx 1 root root 36 Jan 19 10:04 /dev/dtrace/helper -> ../../devices/pseudo/dtrace at 0:helper But I still get the same error: dtrace DOF libjvm.so: failed to open helper device: No such file or directory dtrace DOF libdvmpi.so: failed to open helper device: No such file or directory How do I tell if the device is functional in the non-global zone, or do I still have to use mknod in a pre-existing non-global zone? Thanks Jason This message posted from opensolaris.org
Adam Leventhal
2006-Jan-19 01:02 UTC
[dtrace-discuss] Re: Re: DVM probes not visible across zones
Those device nodes look right -- my memory just now jogged the answer into place: Java and the DVM agents were built in such a way that hard coded the path to /devices/pseudo/dtrace at 0:helper but that doesn''t exist in the non- global zone. You should be able to work around this by doing this in the non-global zone: # mkdir -p /devices/pseudo/ # ln -s /dev/dtrace/helper /devices/pseudo/dtrace at 0:helper Inelegant I know, but it should do the trick. I''ll talk to Kelly O''Hair to get the DVM library recompiled so that it doesn''t suffer from this problem. Adam On Wed, Jan 18, 2006 at 03:16:01PM -0800, Jason Pell wrote:> Hi, > > The kernel patch was applied this morning (AEST) and the device now exists on the non-global zone: > > $ ls -la /dev/dtrace/helper > crw-rw-rw- 1 root sys 155, 1 Jan 19 09:26 /dev/dtrace/helper > > In the global zone it also exists: > > $ ls -la /dev/dtrace/helper > lrwxrwxrwx 1 root root 36 Jan 19 10:04 /dev/dtrace/helper -> ../../devices/pseudo/dtrace at 0:helper > > > But I still get the same error: > dtrace DOF libjvm.so: failed to open helper device: No such file or directory > dtrace DOF libdvmpi.so: failed to open helper device: No such file or directory > > How do I tell if the device is functional in the non-global zone, or do I still have to use mknod in a pre-existing non-global zone? > > Thanks > Jason > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Jason Pell
2006-Jan-19 02:33 UTC
[dtrace-discuss] Re: Re: DVM probes not visible across zones
Not sure why Adam''s last reply did not appear in the forum, but if fixed the problem, so I am posting it in case it helps someone else. ---------------------------------------------------------------------------------------------- Those device nodes look right -- my memory just now jogged the answer into place: Java and the DVM agents were built in such a way that hard coded the path to /devices/pseudo/dtrace at 0:helper but that doesn''t exist in the non- global zone. You should be able to work around this by doing this in the non-global zone: # mkdir -p /devices/pseudo/ # ln -s /dev/dtrace/helper /devices/pseudo/dtrace at 0:helper Inelegant I know, but it should do the trick. I''ll talk to Kelly O''Hair to get the DVM library recompiled so that it doesn''t suffer from this problem. Adam This message posted from opensolaris.org