Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"thread has no syscall_condition" warning during fork-shadow test #3286

Open
stevenengler opened this issue Jan 21, 2024 · 0 comments
Open
Labels
Type: Bug Error or flaw producing unexpected results

Comments

@stevenengler
Copy link
Contributor

When running the fork-shadow test, there are two warnings about not having a syscall condition during interrupt_with_signal(). I'm not sure if this is important, so I figured I'd make an issue for it.

./setup test fork-shadow
less build/Testing/Temporary/LastTest.log
... [process.rs:501] [shadow_rs::host::process] thread ThreadId(1056) has no syscall_condition. How?
... [process.rs:501] [shadow_rs::host::process] thread ThreadId(1058) has no syscall_condition. How?

fn interrupt_with_signal(&self, host: &Host, signal: Signal) {
let threads = self.threads.borrow();
for thread in threads.values() {
let thread = thread.borrow(host.root());
{
let thread_shmem = thread.shmem();
let host_lock = host.shim_shmem_lock_borrow().unwrap();
let thread_shmem_protected = thread_shmem.protected.borrow(&host_lock.root);
let blocked_signals = thread_shmem_protected.blocked_signals;
if blocked_signals.has(signal) {
continue;
}
}
let Some(mut cond) = thread.syscall_condition_mut() else {
// Defensively handle this gracefully, but it probably shouldn't happen.
// The only thread in the process not blocked on a syscall should be
// the current-running thread (if any), but the caller should have
// delivered the signal synchronously instead of using this function
// in that case.
warn!("thread {:?} has no syscall_condition. How?", thread.id());
continue;
};
cond.wakeup_for_signal(host, signal);
break;
}
}

@stevenengler stevenengler added the Type: Bug Error or flaw producing unexpected results label Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Error or flaw producing unexpected results
Projects
None yet
Development

No branches or pull requests

1 participant