microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.46k stars 822 forks source link

clock_nanosleep (CLOCK_PROCESS_CPUTIME_ID) fails with EINVAL #2116

Open alexrp opened 7 years ago

alexrp commented 7 years ago

Microsoft Windows [Version 10.0.15063]

Calling clock_nanosleep with clock_id = CLOCK_PROCESS_CPUTIME_ID.

It returns EINVAL. It should work as it does on Linux.

strace output for the profiler is huge, so here's the relevant bit:

clock_nanosleep(0xfffffffa /* CLOCK_??? */, TIMER_ABSTIME, {0, 41250000}, NULL) = -1 EINVAL (Invalid argument)

The issue can be reproduced by building Mono and running the profiler test suite, like so:

$ ./autogen.sh
$ make
$ cd mono/profiler
$ make check

(You might need to sudo apt install mono-complete to bootstrap the build.)

You'll see something like:

alexrp@alexrp:~/mono/mono/profiler$ make check
make  check-local
make[1]: Entering directory '/home/alexrp/mono/mono/profiler'
MONO_PATH=/home/alexrp/mono/mcs/class/lib/net_4_x perl ./ptestrunner.pl ../..
Checking test-alloc.exe with report ...
Checking test-busy.exe with report ...
Checking test-busy.exe with report,sample .../proc/self/maps:
00400000-007c1000 r-x- 00000000 00:00 662238                     /home/alexrp/mono/mono/mini/mono-sgen
009c0000-009c1000 r--- 003c0000 00:00 662238                     /home/alexrp/mono/mono/mini/mono-sgen
009c1000-009c4000 rw-- 003c1000 00:00 662238                     /home/alexrp/mono/mono/mini/mono-sgen
009c4000-009fa000 rw-- 00000000 00:00 0
01c6b000-01cef000 rw-- 00000000 00:00 0                          [heap]
7ffe0000-80000000 rwx- 00000000 00:00 0
7f3820000000-7f3820021000 rw-- 00000000 00:00 0
7f3820021000-7f3824000000 ---- 00000000 00:00 0
7f3828000000-7f3828021000 rw-- 00000000 00:00 0
7f3828021000-7f382c000000 ---- 00000000 00:00 0
7f382e7b0000-7f382e7b1000 ---- 00000000 00:00 0
7f382e7b1000-7f382efb1000 rw-- 00000000 00:00 0
7f382efc0000-7f382efc9000 ---- 00000000 00:00 0
7f382efc9000-7f382f1c1000 rw-- 00000000 00:00 0
7f382f1c4000-7f382f570000 r--- 00000000 00:00 663924             /home/alexrp/mono/mcs/class/lib/net_4_x-linux/mscorlib.dll
7f382f570000-7f382f589000 r-x- 00000000 00:00 426055             /lib/x86_64-linux-gnu/libz.so.1.2.8
7f382f589000-7f382f58a000 ---- 00019000 00:00 426055             /lib/x86_64-linux-gnu/libz.so.1.2.8
7f382f58a000-7f382f788000 ---- 00000000 00:00 0
7f382f788000-7f382f789000 r--- 00018000 00:00 426055             /lib/x86_64-linux-gnu/libz.so.1.2.8
7f382f789000-7f382f78a000 rw-- 00019000 00:00 426055             /lib/x86_64-linux-gnu/libz.so.1.2.8
7f382f795000-7f382fb71000 r-x- 00000000 00:00 662247             /home/alexrp/mono/mono/mini/.libs/libmonosgen-2.0.so.1.0.0
7f382fb71000-7f382fd70000 ---- 003dc000 00:00 662247             /home/alexrp/mono/mono/mini/.libs/libmonosgen-2.0.so.1.0.0
7f382fd70000-7f382fd76000 r--- 003db000 00:00 662247             /home/alexrp/mono/mono/mini/.libs/libmonosgen-2.0.so.1.0.0
7f382fd76000-7f382fd7a000 rw-- 003e1000 00:00 662247             /home/alexrp/mono/mono/mini/.libs/libmonosgen-2.0.so.1.0.0
7f382fd7a000-7f382fdb0000 rw-- 00000000 00:00 0
7f382fdb0000-7f382fde4000 r-x- 00000000 00:00 662540             /home/alexrp/mono/mono/profiler/.libs/libmono-profiler-log.so.0.0.0
7f382fde4000-7f382fe45000 ---- 00034000 00:00 662540             /home/alexrp/mono/mono/profiler/.libs/libmono-profiler-log.so.0.0.0
7f382fe45000-7f382ffe3000 ---- 00000000 00:00 0
7f382ffe3000-7f382ffe4000 r--- 00033000 00:00 662540             /home/alexrp/mono/mono/profiler/.libs/libmono-profiler-log.so.0.0.0
7f382ffe4000-7f382ffe5000 rw-- 00034000 00:00 662540             /home/alexrp/mono/mono/profiler/.libs/libmono-profiler-log.so.0.0.0
7f382fff0000-7f3830ff0000 rw-- 00000000 00:00 0
7f3830ff0000-7f3830ff1000 ---- 00000000 00:00 0
7f3830ff1000-7f38317f1000 rw-- 00000000 00:00 0
7f3831800000-7f3831c00000 rw-- 00000000 00:00 0
7f3831c20000-7f3831ca0000 rw-- 00000000 00:00 0
7f3831cb0000-7f3831cb1000 ---- 00000000 00:00 0
7f3831cb1000-7f38324b1000 rw-- 00000000 00:00 0
7f38324c0000-7f383267f000 r-x- 00000000 00:00 415185             /lib/x86_64-linux-gnu/libc-2.23.so
7f383267f000-7f3832688000 ---- 001bf000 00:00 415185             /lib/x86_64-linux-gnu/libc-2.23.so
7f3832688000-7f383287f000 ---- 00000000 00:00 0
7f383287f000-7f3832883000 r--- 001bf000 00:00 415185             /lib/x86_64-linux-gnu/libc-2.23.so
7f3832883000-7f3832885000 rw-- 001c3000 00:00 415185             /lib/x86_64-linux-gnu/libc-2.23.so
7f3832885000-7f3832889000 rw-- 00000000 00:00 0
7f3832890000-7f38328a6000 r-x- 00000000 00:00 415022             /lib/x86_64-linux-gnu/libgcc_s.so.1
7f38328a6000-7f3832aa5000 ---- 00000000 00:00 0
7f3832aa5000-7f3832aa6000 rw-- 00015000 00:00 415022             /lib/x86_64-linux-gnu/libgcc_s.so.1
7f3832ab0000-7f3832ac8000 r-x- 00000000 00:00 415221             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f3832ac8000-7f3832ad2000 ---- 00018000 00:00 415221             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f3832ad2000-7f3832cc7000 ---- 00000000 00:00 0
7f3832cc7000-7f3832cc8000 r--- 00017000 00:00 415221             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f3832cc8000-7f3832cc9000 rw-- 00018000 00:00 415221             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f3832cc9000-7f3832ccd000 rw-- 00000000 00:00 0
7f3832cd0000-7f3832cd3000 r-x- 00000000 00:00 415172             /lib/x86_64-linux-gnu/libdl-2.23.so
7f3832cd3000-7f3832cd4000 ---- 00003000 00:00 415172             /lib/x86_64-linux-gnu/libdl-2.23.so
7f3832cd4000-7f3832ed2000 ---- 00000000 00:00 0
7f3832ed2000-7f3832ed3000 r--- 00002000 00:00 415172             /lib/x86_64-linux-gnu/libdl-2.23.so
7f3832ed3000-7f3832ed4000 rw-- 00003000 00:00 415172             /lib/x86_64-linux-gnu/libdl-2.23.so
7f3832ee0000-7f3832ee7000 r-x- 00000000 00:00 415163             /lib/x86_64-linux-gnu/librt-2.23.so
7f3832ee7000-7f3832ee8000 ---- 00007000 00:00 415163             /lib/x86_64-linux-gnu/librt-2.23.so
7f3832ee8000-7f38330e6000 ---- 00000000 00:00 0
7f38330e6000-7f38330e7000 r--- 00006000 00:00 415163             /lib/x86_64-linux-gnu/librt-2.23.so
7f38330e7000-7f38330e8000 rw-- 00007000 00:00 415163             /lib/x86_64-linux-gnu/librt-2.23.so
7f38330f0000-7f38331f8000 r-x- 00000000 00:00 415013             /lib/x86_64-linux-gnu/libm-2.23.so
7f38331f8000-7f38331fa000 ---- 00108000 00:00 415013             /lib/x86_64-linux-gnu/libm-2.23.so
7f38331fa000-7f38333f7000 ---- 00000000 00:00 0
7f38333f7000-7f38333f8000 r--- 00107000 00:00 415013             /lib/x86_64-linux-gnu/libm-2.23.so
7f38333f8000-7f38333f9000 rw-- 00108000 00:00 415013             /lib/x86_64-linux-gnu/libm-2.23.so
7f3833400000-7f3833426000 r-x- 00000000 00:00 415176             /lib/x86_64-linux-gnu/ld-2.23.so
7f383348d000-7f3833625000 r--- 00000000 00:00 439911             /usr/lib/locale/locale-archive
7f3833625000-7f3833626000 r--- 00025000 00:00 415176             /lib/x86_64-linux-gnu/ld-2.23.so
7f3833626000-7f3833627000 rw-- 00026000 00:00 415176             /lib/x86_64-linux-gnu/ld-2.23.so
7f3833627000-7f3833628000 rw-- 00000000 00:00 0
7f3833660000-7f3833661000 rw-- 00000000 00:00 0
7f3833670000-7f3833684000 rw-- 00000000 00:00 0
7f3833690000-7f3833694000 rw-- 00000000 00:00 0
7f38336a0000-7f38336a1000 rw-- 00000000 00:00 0
7f38336b0000-7f38336c1000 rw-- 00000000 00:00 0
7f38336d0000-7f38336d4000 rw-- 00000000 00:00 0
7f38336e0000-7f38336e1000 rw-- 00000000 00:00 0
7f38336f0000-7f38336f1000 rw-- 00000000 00:00 0
7f3833700000-7f3833701000 rw-- 00000000 00:00 0
7f3833710000-7f3833711000 rw-- 00000000 00:00 0
7f3833720000-7f3833721000 rw-- 00000000 00:00 0
7f3833721000-7f3833780000 ---- 00000000 00:00 0
7f3833780000-7f3833782000 rw-- 00000000 00:00 0
7f3833790000-7f3833791000 rw-- 00000000 00:00 0
7f38337a0000-7f38337a1000 rw-- 00000000 00:00 0
7f38337b0000-7f38337b1000 rw-- 00000000 00:00 0
7f38337c0000-7f38337c2000 rw-- 00000000 00:00 0
7f38337cd000-7f38337cf000 r--- 00000000 00:00 669223             /home/alexrp/mono/mono/profiler/test-busy.exe
7f38337cf000-7f38337d0000 rw-- 00000000 00:00 665434             /run/shm/mono.25450
7fffd366c000-7fffd366d000 rw-- 00000000 00:00 0                  [stack]
7fffd366d000-7fffd3675000 ---- 00000000 00:00 0
7fffd3675000-7fffd3e6c000 rw-- 00000000 00:00 0
7fffd4180000-7fffd4181000 r-x- 00000000 00:00 0                  [vdso]

Native stacktrace:

        ../../mono/mini/mono() [0x4a8121]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f3832ac1390]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f38324f5428]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f38324f702a]
        ../../mono/mini/mono() [0x67cf09]
        ../../mono/mini/mono() [0x6932e5]
        ../../mono/mini/mono() [0x6933c4]
        ../../mono/mini/mono() [0x516954]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f3832ab76ba]
        /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f38325c682d]

Debug info from gdb:

[New LWP 25451]
[New LWP 25452]
[New LWP 25455]
[New LWP 25456]
[New LWP 25457]
[New LWP 25458]
[New LWP 25459]
[New LWP 25461]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x000000007ffe2479 in ?? ()
  Id   Target Id         Frame
* 1    Thread 0x7f3833780740 (LWP 25450) "mono" 0x000000007ffe2479 in ?? ()
  2    Thread 0x7f38324b0700 (LWP 25451) "SGen worker" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7f38317f0700 (LWP 25452) "SGen worker" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  4    Thread 0x7f382f1c0700 (LWP 25455) "Finalizer" 0x00007f3832abf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x9e8f80 <finalizer_sem>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  5    Thread 0x7f382efb0700 (LWP 25456) "Profiler sample" 0x00007f3832ac0f7b in __waitpid (pid=pid@entry=25460, stat_loc=stat_loc@entry=0x7f382efaeabc, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
  6    Thread 0x7f382e7a0700 (LWP 25457) "Profiler helper" 0x00007f38325bc9e3 in select () at ../sysdeps/unix/syscall-template.S:84
  7    Thread 0x7f382df90700 (LWP 25458) "Profiler writer" 0x00007f3832abf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x1c72768) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  8    Thread 0x7f382d780700 (LWP 25459) "Profiler dumper" 0x00007f3832abf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x1c727f8) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
  9    Thread 0x7f382cf70700 (LWP 25461) "BusyHelper" 0x000000007ffe2cf9 in ?? ()

Thread 9 (Thread 0x7f382cf70700 (LWP 25461)):
#0  0x000000007ffe2cf9 in ?? ()
#1  0x00007f3831800510 in ?? ()
#2  0x0000000000000001 in ?? ()
#3  0x0000000000000001 in ?? ()
#4  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f382d780700 (LWP 25459)):
#0  0x00007f3832abf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x1c727f8) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x1c727f8, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007f3832abf8d4 in __new_sem_wait_slow (sem=0x1c727f8, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007f3832abf97a in __new_sem_wait (sem=sem@entry=0x1c727f8) at sem_wait.c:29
#4  0x00007f382fdbc2d2 in mono_os_sem_wait (flags=<optimized out>, sem=<optimized out>) at ../../mono/utils/mono-os-semaphore.h:210
#5  dumper_thread (arg=0x1c72680) at mono-profiler-log.c:4452
#6  0x00007f3832ab76ba in start_thread (arg=0x7f382d780700) at pthread_create.c:333
#7  0x00007f38325c682d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7f382df90700 (LWP 25458)):
#0  0x00007f3832abf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x1c72768) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x1c72768, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007f3832abf8d4 in __new_sem_wait_slow (sem=0x1c72768, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007f3832abf97a in __new_sem_wait (sem=sem@entry=0x1c72768) at sem_wait.c:29
#4  0x00007f382fdbd05e in mono_os_sem_wait (flags=<optimized out>, sem=<optimized out>) at ../../mono/utils/mono-os-semaphore.h:210
#5  writer_thread (arg=0x1c72680) at mono-profiler-log.c:4343
#6  0x00007f3832ab76ba in start_thread (arg=0x7f382df90700) at pthread_create.c:333
#7  0x00007f38325c682d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f382e7a0700 (LWP 25457)):
#0  0x00007f38325bc9e3 in select () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f382fdbddf0 in helper_thread (arg=0x1c72680) at mono-profiler-log.c:4104
#2  0x00007f3832ab76ba in start_thread (arg=0x7f382e7a0700) at pthread_create.c:333
#3  0x00007f38325c682d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f382efb0700 (LWP 25456)):
#0  0x00007f3832ac0f7b in __waitpid (pid=pid@entry=25460, stat_loc=stat_loc@entry=0x7f382efaeabc, options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00000000004a81d9 in mono_handle_native_crash (signal=<optimized out>, ctx=<optimized out>, info=<optimized out>) at mini-exceptions.c:2704
#2  <signal handler called>
#3  0x00007f38324f5428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#4  0x00007f38324f702a in __GI_abort () at abort.c:89
#5  0x000000000067cf09 in mono_log_write_logfile (log_domain=<optimized out>, level=<optimized out>, hdr=<optimized out>, message=0x7f38200012d0 "clock_sleep_ns_abs: clock_nanosleep () returned 22") at mono-log-common.c:135
#6  0x00000000006932e5 in monoeg_g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x6bfdc8 "%s: clock_nanosleep () returned %d", args=0x7f382efafd90) at goutput.c:115
#7  0x00000000006933c4 in monoeg_g_log (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x6bfdc8 "%s: clock_nanosleep () returned %d") at goutput.c:125
#8  0x0000000000516954 in clock_sleep_ns_abs (ns_abs=41250000) at mini-posix.c:629
#9  sampling_thread_func (data=<optimized out>) at mini-posix.c:724
#10 0x00007f3832ab76ba in start_thread (arg=0x7f382efb0700) at pthread_create.c:333
#11 0x00007f38325c682d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f382f1c0700 (LWP 25455)):
#0  0x00007f3832abf827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x9e8f80 <finalizer_sem>) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x9e8f80 <finalizer_sem>, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007f3832abf8d4 in __new_sem_wait_slow (sem=0x9e8f80 <finalizer_sem>, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007f3832abf97a in __new_sem_wait (sem=sem@entry=0x9e8f80 <finalizer_sem>) at sem_wait.c:29
#4  0x00000000005efdaf in mono_os_sem_wait (flags=MONO_SEM_FLAGS_ALERTABLE, sem=0x9e8f80 <finalizer_sem>) at ../../mono/utils/mono-os-semaphore.h:210
#5  mono_coop_sem_wait (flags=MONO_SEM_FLAGS_ALERTABLE, sem=0x9e8f80 <finalizer_sem>) at ../../mono/utils/mono-coop-semaphore.h:43
#6  finalizer_thread (unused=unused@entry=0x0) at gc.c:866
#7  0x00000000005c7557 in start_wrapper_internal (stack_ptr=0x7f382f1bfe58, start_info=0x0) at threads.c:829
#8  start_wrapper (data=0x1ce7570) at threads.c:891
#9  0x00007f3832ab76ba in start_thread (arg=0x7f382f1c0700) at pthread_create.c:333
#10 0x00007f38325c682d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f38317f0700 (LWP 25452)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000672fdb in mono_os_cond_wait (mutex=0x9f8100 <pool_inst>, cond=0x9f8128 <pool_inst+40>) at ../../mono/utils/mono-os-mutex.h:173
#2  thread_func (thread_data=0x7f3833700108) at sgen-thread-pool.c:90
#3  0x00007f3832ab76ba in start_thread (arg=0x7f38317f0700) at pthread_create.c:333
#4  0x00007f38325c682d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f38324b0700 (LWP 25451)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000672f9b in mono_os_cond_wait (mutex=0x9f97a0 <sweep_pool_inst>, cond=0x9f97c8 <sweep_pool_inst+40>) at ../../mono/utils/mono-os-mutex.h:173
#2  thread_func (thread_data=0x9f98b8 <sweep_pool>) at sgen-thread-pool.c:108
#3  0x00007f3832ab76ba in start_thread (arg=0x7f38324b0700) at pthread_create.c:333
#4  0x00007f38325c682d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f3833780740 (LWP 25450)):
#0  0x000000007ffe2479 in ?? ()
#1  0x0000000000000001 in ?? ()
#2  0x0000000000000000 in ?? ()

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Error: Missing thread Finalizer.
Error: Missing thread Main.
Error: Wrong loaded images 2.
Error: Not enough compiled method.
Error: Not enough compiled code.
Error: Missing thread BusyHelper.
Total errors: 6
Checking test-monitor.exe with report ...
Checking test-excleave.exe with report ...
Checking test-heapshot.exe with report,heapshot ...
Checking test-heapshot.exe with heapshot,output=-traces.mlpd ...
Checking test-traces.exe with output=-traces.mlpd ...
Checking test-traces.exe with nocalls,output=-traces.mlpd ...
Makefile:1049: recipe for target 'testlog' failed
make[1]: *** [testlog] Error 1
make[1]: Leaving directory '/home/alexrp/mono/mono/profiler'
Makefile:912: recipe for target 'check-am' failed
make: *** [check-am] Error 2

The important part being:

#5  0x000000000067cf09 in mono_log_write_logfile (log_domain=<optimized out>, level=<optimized out>, hdr=<optimized out>, message=0x7f38200012d0 "clock_sleep_ns_abs: clock_nanosleep () returned 22") at mono-log-common.c:135

Altering Mono to use CLOCK_MONOTONIC makes the profiler tests pass, but this is not a great solution as we specifically want the semantics of CLOCK_PROCESS_CPUTIME_ID.

stehufntdev commented 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.