cpp_client_telemetry icon indicating copy to clipboard operation
cpp_client_telemetry copied to clipboard

Edge iOS shutdown crash in TransmitProfiles

Open Qusic opened this issue 4 years ago • 4 comments

Describe your environment. Describe any aspect of your environment relevant to the problem, including your SDK version, platform, OS version, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main brach.

Platform: iOS SDK Version: b0a4a085dd3c3d73002a426a6513704eb35fbb67

Steps to reproduce. Describe exactly how to reproduce the error. Include a code sample if applicable.

It crashes when killing the app from switcher.

What is the expected behavior? What did you expect to see?

What is the actual behavior? What did you see instead?

Additional context. Add any other context about the problem here.

I believe it's related to https://github.com/microsoft/cpp_client_telemetry/issues/822 but v4 seems still far away. Is it possible to have short-term mitigation? Thanks!

report-2517700415230009999-e86c432b-6ef7-4ad6-ba15-8d484fa1a51a.txt report-2517700643540009999-b86bcfc8-ad88-46b0-b2ad-44fff5a5faf3.txt

Qusic avatar Sep 22 '21 08:09 Qusic

@Qusic - I am supposing switcher performs graceful shutdown of the app and ensures that LogManager::FlushAndTeardown() method is called before the app gets killed. There have been fixes done in the past for the race conditions due to concurrent threads still calling logger methods, while the LogManager is shutting down.

Have you gone through the recommendation to minimize use-after-free as proposed here: https://github.com/microsoft/cpp_client_telemetry/blob/main/docs/use-after-free.md

@eduardo-camacho @kindbe - I am not an expert here, but do you think that PauseActivity() and WaitPause() methods should be available in ios wrapper to be called from ios apps?

lalitb avatar Sep 28 '21 19:09 lalitb

@lalitb, iOS wrapper has pauseTransmission and resumeTransmission, would that fit your purpose?

eduardo-camacho avatar Sep 28 '21 23:09 eduardo-camacho

@Qusic - Can you confirm if you are following the guidelines posted in the link: https://github.com/microsoft/cpp_client_telemetry/blob/main/docs/use-after-free.md, basically calling Flush before FlushAndTeardown`. We would work on the v4 planning in the coming weeks, but don't have any commitment if it would be included for next semester of the Observability team.

lalitb avatar Oct 05 '21 19:10 lalitb

@lalitb Thanks for the info! I am OOF until next Monday and will look into details later. IIRC, such flush and shutdown code in Edge are shared across all platforms, so I wonder if similar issues are seen on desktop platforms (which have much larger userbase than mobile).

Qusic avatar Oct 06 '21 03:10 Qusic