Skip to content

Conversation

@al45tair
Copy link
Contributor

@al45tair al45tair commented Mar 7, 2023

These weren't working correctly because I made the unwinder call _swift_task_getCurrent(), but of course when out-of-process, it calls that in swift-backtrace, which is wrong. Remove that for now.

While I'm here, I also tweaked the formatting slightly, and I noticed that we were saying that all thunks were also system functions, which seemed unnecessary and odd.

Plus there were a couple of extra system functions I added to make the async crash backtraces nicer in friendly mode.

rdar://106363539

@al45tair
Copy link
Contributor Author

al45tair commented Mar 7, 2023

@swift-ci Please smoke test

@al45tair al45tair requested a review from mikeash March 7, 2023 17:05
Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

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

swift-inspect knows how to get the current task of a remote thread (on Darwin, anyway) if you want to crib from that at some point. It's not pretty.

@al45tair
Copy link
Contributor Author

al45tair commented Mar 7, 2023

How odd. The macOS build failed to demangle some of the symbols. (There's some other problem that someone has introduced in the meantime that's broken PR testing also.)

@al45tair
Copy link
Contributor Author

al45tair commented Mar 7, 2023

@swift-ci Please smoke test

These weren't working correctly because I made the unwinder call
`_swift_task_getCurrent()`, but of course when out-of-process, it calls
that in `swift-backtrace`, which is wrong.  Remove that for now.

While I'm here, I also tweaked the formatting slightly, and I noticed
that we were saying that all thunks were also system functions, which
seemed unnecessary and odd.

Plus there were a couple of extra system functions I added to make the
async crash backtraces nicer in friendly mode.

rdar://106363539
@al45tair
Copy link
Contributor Author

al45tair commented Mar 8, 2023

Ah, I wonder if the issue is that the macOS CI is running an older macOS that can't demangle async function names. That would make sense as it's clearly demangled the top frame correctly.

The CI nodes currently run an older macOS version that can't demangle the
async function names.  So, to pass PR testing and CI, we'll need to turn
demangling off for this test for now.  No big deal.

rdar://106363539
@al45tair
Copy link
Contributor Author

al45tair commented Mar 8, 2023

@swift-ci Please smoke test

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

LGTM, would be interesting to be able to get the task like @mikeash mentioned but that's extra / future stuff 👍

@al45tair al45tair merged commit 3211f68 into swiftlang:main Mar 9, 2023
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.

3 participants