[Bug 1871129] Re: htop is blank when using in focal in wsl1

Rafael David Tinoco rafaeldtinoco at ubuntu.com
Tue Apr 7 18:22:56 UTC 2020


The issue is happening because WSL is currently not POSIX compliant and
any call to glibc that uses CLOCK_REALTIME will fail with EINVAL (-1)
(such as clock_gettime() or clock_nanosleep()). It is likely that a
glibc change has made this to appear (instead of the htop different
version).

Upstream related bugs:

https://github.com/microsoft/WSL/issues/2503

https://github.com/microsoft/WSL/issues/4898 <- opened and being worked

--

htop strace output:

12324 read(4, "htop\0", 4096)           = 5
12324 read(4, "", 4091)                 = 0
12324 close(4)                          = 0
12324 getdents64(3, /* 0 entries */, 32768) = 0
12324 close(3)                          = 0
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
12324 clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=75000000}, 0x7ffff6dce7b0) = -1 EINVAL (Invalid argument)
... <indefinitely>

--

As a workaround a software can use monotonic clock instead but changing
glibc specific function clocks is likely a no-go at this point in time
(specially if just for WSL).

** Bug watch added: github.com/microsoft/WSL/issues #2503
   https://github.com/microsoft/WSL/issues/2503

** Bug watch added: github.com/microsoft/WSL/issues #4898
   https://github.com/microsoft/WSL/issues/4898

** Also affects: glibc (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: glibc (Ubuntu)
       Status: New => Confirmed

** Changed in: glibc (Ubuntu)
   Importance: Undecided => Medium

** Changed in: htop (Ubuntu)
     Assignee: Rafael David Tinoco (rafaeldtinoco) => (unassigned)

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1871129

Title:
  htop is blank when using in focal in wsl1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1871129/+subscriptions



More information about the Ubuntu-server-bugs mailing list