Comments (2)
There seems to be millions of "mmap on fd X for Y bytes failed" warnings. I think this happens because the PR added a new check to make sure it wasn't a special file, and it turns out that tor does try to mmap one of these special files.
shadow/src/main/host/syscall/handler/mman.rs
Lines 268 to 273 in 83934ce
This causes a warning further up in the calling code.
shadow/src/main/host/syscall/handler/mman.rs
Lines 210 to 218 in 83934ce
[shadow_rs::host::syscall::handler::mman] (LOG_ONCE) Tried to mmap a non-regular-file
[shadow_rs::host::syscall::handler::mman] mmap on fd 3 for 118 bytes failed
[shadow_rs::host::syscall::handler::mman] mmap on fd 3 for 118 bytes failed
[shadow_rs::host::syscall::handler::mman] mmap on fd 3 for 118 bytes failed
[shadow_rs::host::syscall::handler::mman] mmap on fd 3 for 118 bytes failed
[shadow_rs::host::syscall::handler::mman] mmap on fd 3 for 118 bytes failed
[shadow_rs::host::syscall::handler::mman] mmap on fd 3 for 118 bytes failed
[shadow_rs::host::syscall::handler::mman] mmap on fd 3 for 118 bytes failed
I think I'll make this second warn log a debug log instead.
from shadow.
On my local machine, I only see these warnings for the "fileserver" host. On the benchmark runner, I see it for all tor hosts ("4uthority2", "relay33exitguard", "relay227exit", etc).
At least on my machine, the processes are trying to mmap an fd for "/etc/localtime".
00:00:01.000000000 [tid 1000] open("/etc/localtime", (empty), Mode(0x0)) = 3
00:00:01.000000000 [tid 1000] fstat() = 0
00:00:01.000000000 [tid 1000] mmap(0x0, 118, PROT_READ, MAP_PRIVATE, 3, 0) = 0xfffffffffffffff3 ((unknown errno 13))
We don't want to mmap the native "/etc/localhost" file, but by not doing this we make a lot of unnecessary extra syscalls. Every gettimeofday()
call (which tor makes a lot of) results in several syscalls trying to mmap this file. This surprisingly doesn't seem to affect the benchmark results though, which is good.
00:03:15.000000000 [tid 1000] open("/etc/localtime", (empty), Mode(0x0)) = 7
00:03:15.000000000 [tid 1000] fstat() = 0
00:03:15.000000000 [tid 1000] mmap(0x0, 118, PROT_READ, MAP_PRIVATE, 7, 0) = 0xfffffffffffffff3 ((unknown errno 13))
00:03:15.000000000 [tid 1000] close(7) = 0
000000195000000000 [tid 1000] gettimeofday(...) = 0
from shadow.
Related Issues (20)
- Update versions of tools used in CI
- UDP max payload size should depend on the MTU
- Loopback interface should use a larger MTU HOT 1
- Add docs about language and testing expectations for new PRs HOT 1
- Consider removing the `--summarize` rust test option
- Plugin makes 6 extra syscalls for every "gettimeofday" call
- Cannot disable perf timers after enabling
- Fork test fails when perf timers are enabled
- Document that Shadow usually doesn't perform shell expansion in the config file
- Upgrade nix version in tests
- `posix_spawn` fails starting in glibc-2.38 HOT 2
- Go tests segfault with Go 1.21 (Fedora 38 and 39) HOT 4
- Cannot include structs with bitfields in linux-api
- Partial read triggers an event in Shadow, but not Linux HOT 2
- The 'fork-linux' test is flaky
- Snowflake simulation fails to dial OR port HOT 8
- Decide policy on stub implementations (syscalls, sockopts, flags, etc) HOT 2
- "thread has no syscall_condition" warning during fork-shadow test
- crash: rootedcell "Dropped without calling `safely_drop`" HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shadow.