这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@indragiek
Copy link
Member

📜 Description

Handle this failure gracefully and only log a thread priority if reading it was successful.

💡 Motivation and Context

Reading the thread priority can return -1 in failure cases and we don't want to store this in the profile payload if we're not able to read a legitimate value. This also fixes a flake with the testStartTransaction_ProfilingDataIsValid test which checked for a valid priority and failed about 20% of the time on macOS.

💚 How did you test it?

Verify that testStartTransaction_ProfilingDataIsValid no longer flakes on macOS.

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • Review from the native team if needed
  • No breaking changes

🔮 Next steps

Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

LGTM

@indragiek indragiek merged commit 887b464 into master Jul 28, 2022
@indragiek indragiek deleted the indragiek/harden-thread-priority branch July 28, 2022 16:01
kevinrenskers added a commit that referenced this pull request Aug 1, 2022
* master:
  ci: benchmarking and profile generation improvements (#2022)
  release: 7.23.0
  fix: Bad merge on CHANGELOG.md (#2020)
  fix: Log empty samples instead of collecting stacks for idle threads (#2013)
  fix: Handle failure to read thread priority gracefully (#2015)
  fix: Remove logging that could occur while a thread is suspended (#2014)
  fix: Use constant for max thread name size instead of magic number (#2012)
  Disable flaky tesDefaultMaxEnvelopesConcurrent (#2018)
  Fix build failure in unit tests (#2019)
  Fix address sanitizer compilation error (#1996)
  fix: Sauce labs iPhone 13 pro iOS version
  feat: Add transaction to baggage and trace headers (#1992)
  ci: fix ui thread starvation in benchmarks (#2009)
  fix: Add more descriptive deprecation message for enableProfiling (#2011)
  feat: Add sampling configuration for profiling (#2004)
  fix log message option name (#2006)
  meta: add armcknight as a codeowner (#2008)
  release: 7.22.0
  fix: Disable broken LaunchUITests to unblock release (#2003)

# Conflicts:
#	Samples/iOS-Swift/iOS-Swift/ViewControllers/PerformanceViewController.swift
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.

5 participants