Skip to content
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

Ping test fails because of Windows time precision #214

Open
DifferentialOrange opened this issue Mar 22, 2022 · 1 comment
Open

Ping test fails because of Windows time precision #214

DifferentialOrange opened this issue Mar 22, 2022 · 1 comment
Labels
bug Something isn't working ci

Comments

@DifferentialOrange
Copy link
Member

DifferentialOrange commented Mar 22, 2022

See #213 PR. The issue is as follows: ping test started to fail (in ~70% cases) after I migrated Windows CI from Appveyor to GitHub Actions. As a part of this migration, the test Tarantool instance was changed from an instance started on a remote Linux server to an instance started on the same Windows server under WSL. Thus, request time has shortened and it supposedly caused the ping test to fail.

Python documentation declares that

though the time is always returned as a floating point number, not all systems provide time with a better precision than 1 second

Particularly, this StackOverflow answer argues that

For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds. Python on Windows uses +- 16 milliseconds precision due to clock implementation problems due to process interrupts.

based on Windows documentation.

Assuming that ping requests between the same server services can easily be under 1 ms, it caused the test to fail.

I see two ways to "solve" this issue:

  • Rework the test, document ping return value precision on Windows.
  • Rework time measurement to be more precise on Windows.

The second approach is more time-consuming and I'm not sure there are any users that really need this to be fixed. So I think it should be the first one until someone interested in the second one appears.

@DifferentialOrange DifferentialOrange added bug Something isn't working ci teamE needs feedback Something is unclear with the issue labels Mar 22, 2022
DifferentialOrange added a commit that referenced this issue Mar 22, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
Tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 22, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 22, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 22, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 22, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 22, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 30, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 30, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 30, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 31, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 31, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
DifferentialOrange added a commit that referenced this issue Mar 31, 2022
Ping test started to fail (in ~70% cases) after Windows CI migration
from Appveyor to GitHub Actions. As a part of this migration, the test
tarantool instance was changed from an instance started on a remote
Linux server to an instance started on the same Windows server under
WSL. Thus, request time has shortened and it supposedly caused the ping
test to fail.

Python documentation [1] declares that

  ...though the time is always returned as a floating point number,
  not all systems provide time with a better precision than 1 second...

Particularly, StackOverflow answer [2] argues that

  For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds.
  Python on Windows uses +- 16 milliseconds precision due to clock
  implementation problems due to process interrupts.

based on Windows documentation [3].

Assuming that ping requests between the same server services can easily
be under 1 ms, it caused the test to fail.

This patch adds skip for the flaky test, refer to #214 for further
development.

1. https://docs.python.org/3/library/time.html#time.time
2. https://stackoverflow.com/a/1938096/11646599
3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers

Follows up #182, part of #214
@Totktonada
Copy link
Member

I see two ways to "solve" this issue:

  • Rework the test, document ping return value precision on Windows.
  • Rework time measurement to be more precise on Windows.
    The second approach is more time-consuming and I'm not sure there are any users that really need this to be fixed. So I think it should be the first one until someone interested in the second one appears.

I agree. Let's adjust the test.

@Totktonada Totktonada removed the needs feedback Something is unclear with the issue label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci
Projects
None yet
Development

No branches or pull requests

3 participants