- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'd like to use VTune to profile a process running inside a docker container. This doesn't work in either the GUI or the command line. Running the command line version of the collector, VTune seems to report an internal assertion:
$ amplxe-cl -collect hotspots -target-pid $(pgrep writebench)
amplxe: Collection started. To stop the collection, either press CTRL-C or enter from another console window: amplxe-cl -r [redacted] -command stop.
amplxe: Error: [Instrumentation Engine]: Source/pin/base_l/sysfuncs_linux.cpp: GetProcessName: 208: assertion failed: p
amplxe: Collection failed.
amplxe: Internal Error
I'm able to successfully analyze the same process when it's running outside of Docker. I'm using VTune 2016 Update 4:
$ cat support.txt
Package ID: N/A
Package Contents: Intel(R) VTune(TM) Amplifier XE 2016 Update 4
Build Number: 470476
The issue is easily reproducible using the standard redis docker container:
$ docker run redis /usr/local/bin/redis-server
In another shell (running as root)
# amplxe-cl -collect hotspots -target-pid $(pgrep redis-server)
amplxe: Collection started. To stop the collection, either press CTRL-C or enter from another console window: amplxe-cl -r [redacted] -command stop.
amplxe: Error: [Instrumentation Engine]: Source/pin/base_l/sysfuncs_linux.cpp: GetProcessName: 208: assertion failed: p
amplxe: Collection failed.
amplxe: Internal Error
Can you please help?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Advanced Hotspots analysis type is the only available when you try to profile app running within a Docker container from the host. Don’t use other analysis types because they may cause the internal assertions.
Please, try the commands below where $PID is id of a process running within a Docker container:
$ amplxe-cl -collect advanced-hotspots -target-pid=$PID
or if you want to see call stacks
$ amplxe-cl -collect advanced-hotspots -knob collection-detail=stack-sampling -target-pid=$PID
Pay attention that you have to copy the binaries (your apps and other) from the Docker container to the host for better symbol resolution and call stacks, then re-finalize the collected data.
Another option is to deploy VTune in a Docker container. In this case "Basic Hotspots" and "Lock and Waits" analysis types should work but other analysis type may have some problems.
Also if your target application generates dynamic code that you have to make extra steps to see it resolved in VTune GUI, otherwise the dynamic code will be shown as [Unknown] in the VTune GUI.
Thanks,
Denis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VTune container support is documented here:
https://software.intel.com/en-us/vtune-amplifier-help-profiling-container-targets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nathan,
Are you succeeded in using Advanced Hotspots for profiling app running inside a Docker container from the host? Do you need help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Denis,
As I know profiling in Docker is supported in VTune Amplifier 2018. This may be found in release notes.
https://software.intel.com/en-us/articles/intel-vtune-amplifier-release-notes
Nathan uses VTune Amplifier 2016 XE Update 4. Are we expects that it will work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Eagle eye award! Thanks, Pavel )
Nathan, please try VTune Amplifier 2018 and let us know how it goes.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page