You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you actually have something so expensive that justifies fork + several socket calls + several context switches? This should be something notoriously expensive.
However, snapshoting with fork can also be useful to:
Fight accumulated global state in tests. Currently it's prohibited and schedulers break badly when program behavior changes from run to tun.
Fight non-deterministic test. Non-determinism in tests is bad, but it's still better to test at least to the degree possible than to crash.
ThreadSanitizer has lots of advantages over Relacy:
automatic instrumentation of memory access with compiler help (no ugly $!)
automatic instrumentation of atomic operations
extensive library of libc interceptors for pthread/semahores/thread-safe statics/malloc/read/write and lots of other functions
dynamic thread count
ability to handle real programs of any size
But it does not have a number of important features that Relacy has, in particular:
very precise memory model modelling
examination of different schedules
Taking into account that ThreadSanitizer's main goal is to handle any real programs with zero user effort, using fork-based scheduler looks like a good fit for ThreadSanitizer because of the ability to handle global state, non-determinism and larger programs.
@dvyukov What do you think the scheduler based on memory snapshots can be useful? https://github.com/dorooleg/relacy/tree/scheduler-based-on-memory-snapshots
I see several uses of this approach:
Currently, only the first item is made. Does the rest make sense?
The text was updated successfully, but these errors were encountered: