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

[runtime] Add some debugging aid to xamarin_release_managed_ref. #15767

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

rolfbjarne
Copy link
Member

It's fairly frequent (due to various types of coding errors) to have the
call to '[self release]' in xamarin_release_managed_ref crash. These
crashes are typically very hard to diagnose, because it can be hard to
figure out which object caused the crash. So now we store the native
object in a static variable, so that it can be read using lldb from a core
dump.

Ref: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1481312.

It's fairly frequent (due to various types of coding errors) to have the
call to '[self release]' in xamarin_release_managed_ref crash. These
crashes are typically very hard to diagnose, because it can be hard to
figure out which object caused the crash. So now we store the native
object in a static variable, so that it can be read using lldb from a core
dump.

Ref: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1481312.
@rolfbjarne rolfbjarne added the not-notes-worthy Ignore for release notes label Aug 25, 2022
Copy link
Contributor

@Therzok Therzok left a comment

Choose a reason for hiding this comment

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

❤️

Copy link
Contributor

@Therzok Therzok left a comment

Choose a reason for hiding this comment

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

I hope it's not a case where the handle is already nulled out at this point.

@rolfbjarne
Copy link
Member Author

@Therzok the crash would look different if that was the case

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 Failed to compare API and create generator diff 🔥

Error: 'make' failed for the hash 1228fda.

Pipeline on Agent
Hash: 9ea459d96a57b804043d699111b683f862bb0545 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

📚 [PR Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-010.Monterey
Hash: 9ea459d96a57b804043d699111b683f862bb0545 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • introspection
  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: 9ea459d96a57b804043d699111b683f862bb0545 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build] Test results 🔥

Test results

❌ Tests failed on VSTS: simulator tests

0 tests crashed, 1 tests failed, 222 tests passed.

Failures

❌ mmp tests

1 tests failed, 1 tests passed.
  • mmptest/macOS/Debug: Failed (Execution failed with exit code 2)

Html Report (VSDrops) Download

Successes

✅ bcl: All 69 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 7 tests passed. Html Report (VSDrops) Download
✅ framework: All 8 tests passed. Html Report (VSDrops) Download
✅ generator: All 2 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 7 tests passed. Html Report (VSDrops) Download
✅ install_source: All 1 tests passed. Html Report (VSDrops) Download
✅ introspection: All 8 tests passed. Html Report (VSDrops) Download
✅ linker: All 65 tests passed. Html Report (VSDrops) Download
✅ mac_binding_project: All 1 tests passed. Html Report (VSDrops) Download
✅ mononative: All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch: All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ mtouch: All 1 tests passed. Html Report (VSDrops) Download
✅ xammac: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 8 tests passed. Html Report (VSDrops) Download
✅ xtro: All 2 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [PR build]

@rolfbjarne
Copy link
Member Author

Test failures are unrelated (https://github.com/xamarin/maccore/issues/2612).

@rolfbjarne rolfbjarne merged commit 15d27ac into xamarin:main Aug 26, 2022
@rolfbjarne rolfbjarne deleted the runtime-debugging-aid branch August 26, 2022 06:14
@Therzok
Copy link
Contributor

Therzok commented Sep 1, 2022

Can you please backport this to 6.x release branch?

@rolfbjarne
Copy link
Member Author

@Therzok this will be included in our Xcode 14 release, which will most likely be out later this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-notes-worthy Ignore for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants