v2.3.0
Summary
Shadow v2.3.0 is a minor release that contains many bug fixes as well as a large push to convert more code from C to Rust; ~54% of our code is now written in Rust compared to just 39% in C. We have incorporated many improvements to Shadow's design as we migrate to Rust, making the code easier to understand, better tested, and easier to maintain. We plan to continue our focus on migrating code to Rust in our next release.
Primary user-facing changes since v2.2.0:
- If running Shadow in Docker, you should use
--tmpfs /dev/shm:rw,nosuid,nodev,exec,size=1024grather than
--shm-size=1024gto mount/dev/shmas executable. This fixes errors when
the managed process maps executable pages. #2400 - Added latency modeling and potential thread-yield to rdtsc emulation, allowing
managed code to avoid deadlock in busy-loops that use only the rdtsc
instruction and no syscalls. #2314 - The build now internally uses
pkg-configto locate glib, instead of a custom
cmake module. This is the recommended way of getting the
appropriate glib compile flags, and works better in non-standard layouts such
as in a guix environment. - The
setupscript now has a--searchoption, which can be used to add
additional directories to search for pkg-config files, C headers, and
libraries. It obsoletes the options--libraryand--include. - Fixed a bug causing
mmapto fail when called on a file descriptor that was
opened withO_NOFOLLOW. #2353 - Bare executable names are now resolved by searching shadow's
PATH.
Previously these were interpreted as relative to the current directory. For
backwards compatibility, Shadow will currently prefer a binary in that location
if one is found but log a warning. Such cases should be disambiguated by using
an absolute path or prefixing with./. - Fixed order-of-operations bug in CoDel control law that could lead to an
unexpected packet drop schedule. We think the bug could have caused Shadow to
slightly more aggressively drop packets that have already been sitting in the
CoDel queue for longer than 110 milliseconds. Based on the results of some Tor
network simulations, the bug didn't appear to affect Tor network performance
enough to lead us to believe that previous Tor simulations are invalid. #2479 - Changed the default scheduler from
thread-per-hosttothread-per-core,
which has better performance on most machines. - Experimental host heartbeat log messages are enabled by default
(experimental.host_heartbeat_intervaldefaults to"1 sec"), but the format
of these messages is not stable. - Some of Shadow's emulated syscalls and object allocations are counted and
written to ashadow.data/sim-stats.jsonfile. - Improved experimental strace logging for
brk,mmap,munmap,mremap,
mprotect,open, andopenatsyscalls. - Several small simulation examples were added to an
examples/directory. - Fixed the file access mode for stdin in the managed process (changed from
O_WRONLYtoO_RDONLY). - Fixed support for
readvandwritevsyscalls, and added support for
preadvandpwritev. - Fixed a rare crash in Shadow's shim while logging. #2459
- Set the
ifa_netmaskfield ingetifaddrs()to improve compatibility with
Node.js applications. #2456 - Shadow no longer depends on its absolute installed location, allowing the
installation directory to be safely moved. #2391 - Shadow now emulated
PR_SET_DUMPABLE, allowing it to work for programs that
try to disable memory inspection. #2370 - Added new test cases to check Shadow's simulated network performance. These
new tests help us verify that Shadow's network stack is capable of
facilitating high-bandwidth transfers when using a single TCP stream or when
using many streams in parallel, and across networks with various latency and
bandwidth characteristics. Since we run the tests as part of our CI, it is now
much more likely that we will notice when we make changes that significantly
reduces Shadow's simulated network performance. We plan to expand the cases
that we test in future releases. #2549
New Contributors
- @Congyu-Liu made their first contribution in #2353
- @zyansheep made their first contribution in #2447
- @valdaarhun made their first contribution in #2474
Thanks also to Shadow devs @sporksmith, @stevenengler, and @robgjansen!
Full Changelog
The full changelog can be viewed here: v2.2.0...v2.3.0