What's happening in Shadow 2022-09 #2428
sporksmith
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is part of a series of periodic updates of development in Shadow. This work is sponsored by the NSF. Previous update: 2022-06.
We've merged 103 non-dependabot pull requests and closed 12 issues since our previous update.
Release status
We've released Shadow 2.2.0! Notable user-facing changes, from the release notes:
We have removed ptrace-mode, and the associated experimental options
use-o-n-waitpid-workaroundand--interpose-method. ptrace-mode was an alternative to Shadow's current interposition mechanism that usesLD_PRELOADandseccomp. This change should be transparent to most users, since it hasn't been the default for several releases, and was only accessible via experimental options. See Remove --interpose-method=ptrace #1945dup()and related syscalls are now supported for all file descriptorsFixed behavior when multiple threads are blocked in
epoll_waiton the same epoll file description. epoll_wait never delivers events to multiple waiters #2260Fixed bugs causing
timerfd_settimeto not reset the internal timer's expiration count (Ensure timerfd_settime resets expiration count #2279), and not cancel previously scheduled timer-fire events (timerfd: ensure previously scheduled events are cancelled when re-arming #2282).Fixed a panic when patching the VDSO in newer kernels, such as those in Ubuntu 22.04. Size of
__vdso_gettimeofdayis too small for trampoline #2273Fixed the errno returned from calling
connect()on a unix socket. This fixes agetaddrinfo()test failure on some systems. Cannot pass getaddrinfo-shadow test #2286Fixed minor memory leaks. Fixed misc memory leaks #2249
Other user-facing improvements since last update
We also continue to make compatibility improvements:
Added support for escaping additional "busy loops" - ones that only use
rdtscwithout making any actual syscalls. This affected some versions of libopenblas. Handle busy-loops that only use rdtsc #2314Replaced custom cmake code for locating glib with pkg-config. This makes shadow easier to compile in environments with non-standard layouts such as guix or nix. cmake: improve dependency processing #2331
Fixed a bug handling files opened with
O_NOFOLLOW. Remove O_NOFOLLOW flag when mmap file in plugin #2353Fixed our documentation and CI to support mapping pages with
PROT_EXECwhen run under Docker, fixing 2400. When usingdocker run, you should also pass the--tmpfs /dev/shm:rw,nosuid,nodev,exec,size=1024g. Add documentation and tests to support mmap withPROT_EXEC#2402Made the shadow installation directory relocatable. e.g. installing to
$HOME/opt/shadowand later moving to$HOME/opt/shadow-oldnow behaves as expected. This also makes it easier to share and reuse pre-built shadow binaries, e.g. for CI, though we still do not yet publish pre-compiled binaries. Make shadow installation directory relocatable #2391Added support for emulating
PR_SET_DUMPABLE, which fixes compatibility with managed programs that "harden" themselves against debuggers, including arti. Emulate PR_SET_DUMPABLE and misc improvements #2370Fixed a bug affecting getaddrinfo on some systems. Fix
getaddrinfo()error on some systems #2292Partly implemented fcntl. Re-enable fcntl locking for regular files #2259
Made failures due to running out of tmpfs space easier to understand. Pre-allocate space in shared memory files #2267
Other notable changes since last update
Since the 2.2.0 release, our current focus is primarily on migrating Shadow's C code to Rust. These changes should be mostly invisible to Shadow's end users, but may be of interest to folks interested in hacking on Shadow itself. Along those lines we've:
Migrated Shadow's scheduler to Rust. This is a fairly complex and performance-sensitive component, and we're taking care to prevent performance regressions during the migration:
HostSinglePolicyDatatoSchedulerPolicyand remove vtable #2344Migrated other modules to Rust.
Eventto rust #2327Managerwith a rust version #2277Implemented a Rust mutex suitable for use in shared memory, and compatible with rkyv. Add SelfContainedMutex #2386
Moved most of the compilation and linking of Shadow's remaining C code from cmake into Cargo build scripts. This fixes some dependency issues and will make it easier to start migrating some of our additional support libraries from C to Rust. Cargo once #2404
Improved organization of global state in Rust.
Controller's global state to the worker module #2361ControllertoWorkerShared#2367Refactored other components to simplify migration to Rust.
Shadow in Tor
We've been working on using Shadow to help test and evaluate arti - The Tor Projects's new Rust-based implementation of tor. This has driven many of the compatibility fixes above, and we are happy to report that arti now runs under Shadow! We plan to merge a shadow-based continuous integration test into arti itself within the next few days: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/634
Happy simulating!
The Shadow team
Beta Was this translation helpful? Give feedback.
All reactions