Stream: git-wasmtime

Topic: wasmtime / issue #6589 Preview2: No Easy Way To Set Custo...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 16 2023 at 12:57):

adamgfraser opened issue #6589:

Currently all monotonic clock times are based on the time since the clock was created. See here. It would be nice to have an easy way to set this initial time to some other arbitrary value.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 16 2023 at 23:58):

jameysharp commented on issue #6589:

I'd love to hear more about the use case for this. At least in POSIX, the monotonic clock "represents the amount of time since an unspecified point in the past", so a consumer of such a clock is not allowed to care about when that base time was. Under what circumstance are you finding that it's important to be able to control this?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 17 2023 at 01:41):

adamgfraser commented on issue #6589:

If we have different instances we would like the monotonic time to represent the length of time since the same unspecified point in time.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 20 2023 at 16:02):

sunfishcode commented on issue #6589:

Are your instances running inside the same store, or are they in different stores?

Also, are you relying on the clocks being in sync for correctness, or is it just for performance measurements or some other perhaps non-critical activity?

At a high level, this is an interesting question. If two independent components can assume that they're seeing the same monotonic clock without any explicit coordination, that's an implicit contract which breaks virtualization. In practical terms, this would prevent them from running on different machines connected via a network, without some kind of prearranged side channel to coordinate the clocks, for example.

One possible direction to explore here would be APIs for TAI time, which would add monotonic clocks that have a physical-world correspondence, that instances could share just by virtue of occupying the same physical world. Strictly speaking, virtualization doesn't guarantee that two instances have the same physical-world correspondence, but we may be able to find some way to rationalize this.


Last updated: Dec 23 2024 at 12:05 UTC