question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Stack inspection done by playwright is fragile and breaks with Dynamic PGO enabled

See original GitHub issue

Context:

We enabled DynamicPGO in .NET 8 Preview 5 and are seeing reports of some failures in applications that use playwright.

See for instance https://github.com/dotnet/runtime/issues/87628

This should readily repro if you run release mode builds with .NET 8 Preview 5 and default runtime options.

Describe the bug

https://github.com/microsoft/playwright-dotnet/blob/ca7b02ac910e573666f48d502bfabb1c17639e68/src/Playwright/Transport/Connection.cs#L477-L502

is looking for a specific pattern of method names in the stack trace. This is fragile unless all the methods being looked for are marked with [MethodImpl(MethodImplOptions.NoInlining)]. Note that with PGO the JIT may now inline methods at virtual, interface, and delegate call sites.

I suspect the fix may be as simple as marking this method noinline

https://github.com/microsoft/playwright-dotnet/blob/ca7b02ac910e573666f48d502bfabb1c17639e68/src/Playwright/Transport/Connection.cs#L521-L528

but there may be more cases elsewhere in this code that need similar treatment.

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Reactions:1
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
martincostellocommented, Jun 30, 2023

Just to confirm, all of the repos where I originally hit this issue are all working correctly with PGO enabled using the above beta package.

2reactions
mxschmittcommented, Jun 29, 2023

We are in the process of releasing 1.36.0-beta-1 for you, should be live in 10-20 minutes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Untitled
Sorgu trafik gov tr sorgulamalar, Crystal earll, Made in america youtube 2013, Cedia 31 coueilles, Arzou full song, Onyx wikipedia france, Bright yellow ......
Read more >
https://osf.io/mepkc/?action=download
... download recover disease originally typical former pocket john description enemy surround loose financial bone fruit court camp error task length r west ......
Read more >
ChangeLog
(For example, programs that depend on buggy behavior may break when a bug is fixed, ... PGO enables additional optimizations on code identified...
Read more >
Untitled
Annual Open House to showcase the CSUSM campus and dynamic atmosphere Discover ... to other schools and the nation the great things CSUSM...
Read more >
CURO Symposium 2019 Program & Book of Abstracts
The 2019 CURO Symposium includes more than 650 University of Georgia students presenting their undergraduate research through oral and/or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found