Replies: 9 comments 19 replies
-
|
I don't think we've done any testing of a JRE within Shadow. Which JRE are you using (OpenJDK, HotSpot, etc), and what version? How did you install it? And what OS are you using? |
Beta Was this translation helpful? Give feedback.
-
A backtrace of this segv would also be helpful. There are some instructions for getting them here: https://shadow.github.io/docs/guide/developer_guide.html#debugging-virtual-processes |
Beta Was this translation helpful? Give feedback.
-
This might be a hint that the JVM is trying to do its own paging, which would probably take some work to support. OTOH it might just be trying to install a handler that dumps debug info before exiting with a segv.
|
Beta Was this translation helpful? Give feedback.
-
|
Here is my YAML file: |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the info and YAML file! Confirmed I see the same behavior here. I got a slightly less mangled stack trace, but it looks like I'd need to install debug symbols for openjdk for it to be very useful. Implementing Glancing through an I'm not sure when we'll get around to pursuing this further; successfully running a JVM under Shadow would be a nice milestone, but it's not on our current roadmap. Any thoughts @robgjansen ? |
Beta Was this translation helpful? Give feedback.
-
|
I looked a bit into why this (appears to) work in ptrace mode. It turns out the SIGSEGV does happen in ptrace mode as well, but it doesn't crash the process: I believe the reason is because of how ptrace mode implements signals. It mostly delegates to native signal handling rather than emulating. This has its own problems, but in this case it appears that the managed process installs a SIGSEGV handler that recovers. In ptrace mode this is allowed to execute, but in preload mode it isn't. Opened #2091 I had started a PR before to fix this issue, but backburnered it partly because we didn't have any real world examples of needing it. I'll see if I can resurrect it... Btw the |
Beta Was this translation helpful? Give feedback.
-
|
Chatted a bit with @robgjansen. We agree it makes sense to prioritize fixing gaps in preload mode that don't exist in ptrace mode before we remove ptrace mode. Opened #2094 to track the We're currently a bit less inclined to invest in implementing syscall handlers, unless they can be implemented in Rust. Release 2.2 is going to focus on migrating core Shadow code to Rust and making it easier for syscall handlers to be written in Rust. Any C syscall handlers we write in the meantime will eventually be rewritten in Rust, so we're trying to minimize doing so. Unfortunately
@bentoumia Does your BFT-SMaRt work sufficiently well in ptrace mode for now? |
Beta Was this translation helpful? Give feedback.
-
|
Closed #2094; |
Beta Was this translation helpful? Give feedback.
-
|
Hi, sorry for taking too long to get back to you. I am currently running into issues with the newest Shadow version, build goes through but many tests (141/202 tests) are failing with i updated all dependencies i have, rebuilt and retried to no avail. I will retry again in the next days and report back once the newest version is working on my system again. Thanks again for your help! :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
so i am currently working on simulating BFT-SMaRt(https://github.com/bft-smart/library) in Shadow as part of my Bachelor's thesis. Strangely, the simulation works and completes successfully with ptrace but not with LD_PRELOAD. I also tried to simulate just the command
java --versionin Shadow and also this does not work with preload. It seems as if it is related to the JVM.is this maybe related to this(#1549)?
Im very curious to know why this fails in preload and i would be very thankful can explain to me why this happens.
Shadow also never terminates, it just hangs in this state indefinitely, shimlog also shows a SegFault happening:
00:00:00.037584 [00:00:00.000000001] [shd-shim] [error] [shim.c:548] [_handle_sigsegv] Unhandled sigsegvHere are my logs:
Beta Was this translation helpful? Give feedback.
All reactions