Comments (15)
I was able to reproduce on an Ubuntu 22.04 VM. This is the disassembly of gettimeofday
and clock_gettime
:
0000000000000bd0 <__vdso_gettimeofday@@LINUX_2.6>:
bd0: e9 4b fe ff ff jmp a20 <LINUX_2.6@@LINUX_2.6+0xa20>
bd5: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
bdc: 00 00 00 00
0000000000000c10 <__vdso_clock_gettime@@LINUX_2.6>:
c10: e9 9b fb ff ff jmp 7b0 <LINUX_2.6@@LINUX_2.6+0x7b0>
c15: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
c1c: 00 00 00 00
In these implementations, it's just a jmp
to another internal function. Seems like the inner function didn't get inlined. Luckily, since both of these functions are aligned to 16 bytes via padding, they should be safe to patch. A real fix is landing soon.
from hermit.
I have the same problem on Ubuntu 22.04
Linux version 5.15.0-53-generic (buildd@lcy02-amd64-047) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022
It does feel like the error is coming from reverie
though.
from hermit.
I see a very similar issue. attached is attached trace log.
trace.txt
Environment:
$ uname -a
Linux eg 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 22.04.1 LTS
from hermit.
This is really a bug in reverie (it reproduces running the reverie strace implementation on ls
). It affects both clock_gettime
and gettimeofday
for me, but not clock_getres
. I tested this by commenting out the entries for those two vdso entries in VDSO_SYMBOLS
in reverie-prtrace/src/vdso.rs
, after which I was successfully able to strace /bin/ls
.
from hermit.
The following change fixes reverie for me: samth/reverie@a7f6cae but I cannot be sure if it's right.
from hermit.
I have an upstream fix for this in Reverie that should be getting synced into the repo within the next hour or so. @samth was on the right on the money with the fix. The NOP padding at the end of the VDSO patches was unnecessary and can just be removed. I also have a fix for the getcpu
vdso patch. I'll update this thread when it the fix is in.
Thanks @androm3da for reporting this issue! Keep those bug reports coming! :)
from hermit.
I don't think this actually fixes the issue. The problem is now 5 bytes vs 8 bytes, but it still errors. You need the changes to handle things being up to 8-byte aligned that are in my patch, or something different (I still don't know if that change is right).
from hermit.
@samth Not quite sure I follow. Does facebookexperimental/reverie@debce82 not fix the issue? The vdso patches are now 8 bytes instead of 16 (not 5 bytes).
from hermit.
Right, that commit does not fix the problem. On my system the original vdso entry is 5 bytes.
from hermit.
Ohh, now I understand. I thought you meant the patch was 5 bytes. That's a pretty small vdso entry size. What distro+version are you running? And what is the kernel version? I'd like to see what those entries are actually doing. Maybe we don't really need to patch them.
from hermit.
It's the same machine as this issue: #18
Ubuntu 22.10 and 5.19.0 is the short answer.
from hermit.
fix does not work for me neither.
thread 'main' panicked at 'vdso symbol __vdso_clock_gettime's real size is 5 bytes, but trying to replace it with 8 bytes', /home/eg/.cargo/git/checkouts/reverie-9a587e40a0d7d3be/c448d10/reverie-ptrace/src/vdso.rs:148:17
from hermit.
I am using commit 159c343 and I'm on ubuntu 20.04
$ cat /proc/version
Linux version 5.4.0-122-generic (buildd@lcy02-amd64-095) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022
I did a cargo clean && cargo build && ./target/debug/hermit run --chaos ls
-- this seems to fail the same way it did before. Would those steps get this fix from reverie mentioned above (facebookexperimental/reverie@fa44c91) or do I need to purge some cache somewhere?
from hermit.
@androm3da Try deleting Cargo.lock
and doing the build again. (I don't think cargo clean
will delete it.) Then, Cargo should pull down the latest commit.
Also, for reference, the commit with the fix is facebookexperimental/reverie@5478e47.
from hermit.
Try deleting Cargo.lock and doing the build again
This did the trick, tyvm @jasonwhite
from hermit.
Related Issues (20)
- failures to build (and needed dependencies) HOT 21
- User docs reference internal FB Workplace instance HOT 3
- warnings while running bash (or programs with line editing)
- Panic on hello world java program HOT 1
- thread 'main' panicked at 'prehook: Missed expected preemption!..'
- Question: Is scheduler preemptive? HOT 2
- Cargo test failed on two cases HOT 3
- DrRacket hangs under hermit HOT 1
- RFC: A plan for open source integration tests HOT 2
- Support go hello world at least HOT 6
- Implement key management (keyctl and friends)
- error[E0599]: no method named `force_pretty` found for struct `reverie::Backtrace` HOT 2
- intercepted.cpuid(eax).unwrap() panics HOT 1
- CockroachDB hangs under hermit
- Adding syscall semantics fuzzing -- beyond thread interleavings HOT 3
- Unsupported processor with feature info
- Support for rustc stable
- Document `record` data format
- Characterize overhead
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 hermit.