Open alexrp opened 7 years ago
Thanks for reporting the issue. Currently wsl only supports a subset of the clokc_nanosleep clock ids and I confirmed CLOCK_PROCESS_CPUTIME_ID is not currently supported. Please give us feedback on UserVoice so we can prioritize appropriately, https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo.
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.15063]
Calling
clock_nanosleep
withclock_id
=CLOCK_PROCESS_CPUTIME_ID
.It returns
EINVAL
. It should work as it does on Linux.<cmd>
is failing, then runstrace -o strace.txt -ff <cmd>
, and post the strace.txt output here)strace
output for the profiler is huge, so here's the relevant bit:The issue can be reproduced by building Mono and running the profiler test suite, like so:
(You might need to
sudo apt install mono-complete
to bootstrap the build.)You'll see something like:
The important part being:
Altering Mono to use
CLOCK_MONOTONIC
makes the profiler tests pass, but this is not a great solution as we specifically want the semantics ofCLOCK_PROCESS_CPUTIME_ID
.