-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
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
runtime/pprof: takes zero samples in BashOnWindows (WSL) #22366
Comments
Yes, this is probably because WSL doesn't implement profiling signals. /cc @jessfraz to escalate within Microsoft. |
will see what I can do
…On Fri, Oct 20, 2017 at 3:33 PM, Brad Fitzpatrick ***@***.***> wrote:
Yes, this is probably because WSL doesn't implement profiling signals.
/cc @jessfraz <https://github.com/jessfraz> to escalate within Microsoft.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22366 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABYNbHTH3fiG3_EUJGGiO5IMPlCw-xC5ks5suPVpgaJpZM4QBHV->
.
--
Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu <http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3>
|
If someone wants to try again with WSL2, this may work now that there's a full Linux kernel inside. |
It would appear there is no change from WSL1 to WSL2:
Disclaimer: I don't know much about pprof, just happened to have a WSL2 instance and wanted to help. If I'm doing something wrong or if there are more tests for me to run, I'm happy to help. |
Does the kernel need any specific support to enable profiling? I can confirm that WSL2 does not support this at the moment, but they accept suggestions for additional build flags. If someone can point me on resources or information about which flags/features the kernel needs to support pprof I would build a custom kernel. Edit: I've got profiling working with a custom kernel. The missing piece is the
I will contact the WSL team to see if it's possible to get the flag into the official kernel. |
I try to compile the kernel, but a lot of error message, failed... please send them a message, this feature should be added asap. |
I'm unable to reproduce your error messages, I built it on two machines and everything worked fine. I got the response from one of the maintainers that they would like to add the kernel flag. But I'm very sure this takes a few weeks to settle in the latest preview. So until it's in the official kernel the only option is to build a custom kernel. Notice that for building you need a recent ubuntu distribution like 19.04, as stated in the documentation from the kernel:
|
I see, thank you for your kindness. |
Quick followup: The release notes from insider build 19013 state:
I've tested and can confirm that the default kernel on build 19013 and later produces the right pprof profile which has samples in it. I don't know if this resolves this issue or it should be left open cause wsl2 is in insiders only and wsl1 still has the issue. |
Thanks! I'll close this. |
This is probably a BashOnWindows issue but just wanted to raise here to check.
What version of Go are you using (
go version
)?go version go1.9.1 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
Using dummy benchmark in https://play.golang.org/p/orUkRfuAl1:
When run in windows this produces a cpu.pprof file of 4.5Kb and opening with pprof gives the following information:
When the same program is run in BashOnWindows this produces a cpu.pprof file of 239Bytes and opening with pprof gives:
What did you expect to see?
Both environments to produce a cpu.pprof file containing a similar number of samples.
What did you see instead?
When run in BashOnWindows pprof never takes a single sample.
The text was updated successfully, but these errors were encountered: