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

Report deadlocked thread names in failures to stop emulation #9865

Merged
merged 3 commits into from Feb 28, 2021

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Feb 28, 2021

Finally report which threads were failing to terminate at Emu.Stop().

{
atomic_wait_engine::raw_notify(0, get_native_id());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the liberaty to remove this hack as I think all thread code paths are CELL_OK now.

@@ -2336,9 +2336,8 @@ bool thread_base::join(bool dtor) const
}

// Hacked for too sleepy threads (1ms) TODO: make sure it's unneeded and remove
const auto timeout = dtor && Emu.IsStopped() ? atomic_wait_timeout{1'000'000} : atomic_wait_timeout::inf;
const auto timeout = dtor && !thread_ctrl::get_current() ? atomic_wait_timeout{1'000'000} : atomic_wait_timeout::inf;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just keep this line the same? It does't stand in the way of the declared purpose of the PR. On the other hand, checking get_current() is a very weird one.

@Nekotekina
Copy link
Member

PR name confuses me as hell. Their names were always reported as I remember.

@elad335
Copy link
Contributor Author

elad335 commented Feb 28, 2021

@@ -2336,9 +2336,8 @@ bool thread_base::join(bool dtor) const
}

// Hacked for too sleepy threads (1ms) TODO: make sure it's unneeded and remove
const auto timeout = dtor && Emu.IsStopped() ? atomic_wait_timeout{1'000'000} : atomic_wait_timeout::inf;
const auto timeout = dtor && !thread_ctrl::get_current() ? atomic_wait_timeout{1'000'000} : atomic_wait_timeout::inf;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just keep this line the same? It does't stand in the way of the declared purpose of the PR. On the other hand, checking get_current() is a very weird one.

@Nekotekina Nekotekina merged commit 48cd56a into RPCS3:master Feb 28, 2021
@elad335 elad335 deleted the patch-24 branch March 2, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants