Repository navigation
Closed
Description
clock_gettime(CLOCK_REALTIME, {1465583395, 663255600}) = 0
clock_gettime(CLOCK_REALTIME, {1465583395, 663347200}) = 0
clock_gettime(CLOCK_REALTIME, {1465583395, 663443500}) = 0
clock_gettime(CLOCK_REALTIME, {1465583395, 663546800}) = 0
times({tms_utime=1014, tms_stime=1579, tms_cutime=6, tms_cstime=15}) = 50171
clock_gettime(CLOCK_REALTIME, {1465583395, 663875500}) = 0
read(17, 0x7fffe278d430, 16384) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe27914a0) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791450) = -1 EINVAL (Invalid argument)
select(19, [12 14 16 17 18], [17], [], {0, 0}) = 2 (in [16], out [17], left {0, 0})
read(16, "", 16384) = 0
writev(17, [{"HTTP/1.1 200 OK\r\nX-Frame-Options"..., 354}, {"<!DOCTYPE html>\n<html>\n<head>\n "..., 1908}], 2) = 2262
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
clock_gettime(CLOCK_MONOTONIC_RAW, 0x7fffe2791420) = -1 EINVAL (Invalid argument)
(forever)
Metadata
Metadata
Assignees
Labels
No labels
Activity
sunilmut commentedon Jun 15, 2016
Thanks for reporting this and the strace (very helpful). CLOCK_MONOTONIC_RAW is currently not implemented in WSL. I have opened a bug to track this, but unfortunately it won't make the cut for Anniversary update. Can you please share precise repro steps?
ddfznt commentedon Jun 15, 2016
Just a new rails application with "thin" gem.
thomaskilian commentedon Jul 4, 2016
FWIW: I just installed RoR on Debian and ran into this issue. Right after the first page access Ruby runs into this loop and only eventually calms down (almost never, though).
gergap commentedon Aug 31, 2016
I've created an issue specific to the clock_gettime issue. So this might also help in fixing this problem:
#1023
sodabrew commentedon Dec 27, 2016
Hi, I'm the maintainer of the Ruby EventMachine. It should not be using CLOCK_MONOTONIC_RAW on Windows, and does not need it to be available. I wrote a very cross-platform clock wrapper here:
https://github.com/eventmachine/eventmachine/blob/master/ext/em.cpp#L440
Is there something about the BashOnWindows toolkit that is making EM think that CLOCK_MONOTONIC_RAW is defined even though it's not actually available from the system?
Could you post the
gem install --verbose eventmachineoutput that you get? I expect to see something like this:The important part is that CLOCK_MONOTONIC_RAW is not found in time.h, and so EM won't try to use it. A possible bug is if BashOnWindows defines this constant but it's not available from the system?
onekopaka commentedon Dec 27, 2016
Hey Aaron Stone (@sodabrew), thanks for checking out this issue! Not to worry, it's not your fault it's broken, your clock wrapper works great when it's not being lied to.
It's very important to remember that this repository is actually about the Windows Subsystem for Linux, in which Microsoft has reimplemented the Linux kernel ABI, in much the same way that Illumos has lx-branded zones, so Linux binaries can run on a Windows 10 system with the WSL installed without knowing the secret that this is on Windows.
As such, the relevant snippet of the output of the extconf.rb stage of installing the eventmachine gem looks like this:
It is definitely an issue that CLOCK_MONOTONIC_RAW is defined in time.h (considering that it's the same time.h you'd find on a normal install of Ubuntu 16.04), but it is not actually implemented in WSL.
sodabrew commentedon Dec 27, 2016
Aha! Yes! You'll need to fix that implementation fib then :)
tara-raj commentedon May 22, 2018
Closing this issue as it's stale. Bug us if you can repro.
sodabrew commentedon May 22, 2018
Tara Raj (@tara-raj) Did you fix it?
RReverser commentedon Dec 12, 2018
I went through a chain of issues all of which say they are duplicates of others and eventually ended up here, where the issue is closed as stale, but it's very much still reproducable in modern builds. Can it be reopened please?
therealkenc commentedon Dec 12, 2018
Thanks. Reopening.
RReverser commentedon Dec 12, 2018
Hmm, looking at original issue again, I'm starting to suspect that it's not actually the same although likely related to current. Let me recheck and provide more details here tomorrow.
therealkenc commentedon Dec 12, 2018
Right. I just found a comment at the bottom of #77 indicating
CLOCK_MONOTONIC_RAWwas implemented. I had assumed it wasn't. No word in the release notes and no answer to "did you fix it", in May, either (sigh).Related or not, better to spawn a new issue with a disciplined repro.
RReverser commentedon Dec 12, 2018
Yeah, fair enough. Thanks for chasing this.