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

Perefetto gets stuck at "PixelMemory#ShowTotalMemory already exists" and never recovers #923

Open
alecazam opened this issue Nov 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@alecazam
Copy link

alecazam commented Nov 4, 2024

My kram-profile app is hitting this error from Perfetto. Once it occurs, I can't get another file to load. This is Perfetto running in a Swift-wrapped WKWebView. Seems to happen if I try to quickly go through the list of files. This is reusing the same webview to load various clang -ftime-trace files.

UI: https://ui.perfetto.dev/v47.0-1b4776303

RegistryError: Registrant dev.perfetto.PixelMemory#ShowTotalMemory already exists in the registry

  • RegistryError (frontend_bundle.js:3416:15)
  • register (frontend_bundle.js:3434:37)
  • registerCommand (frontend_bundle.js:84168:75)
  • (frontend_bundle.js:84667:29)
  • onTraceLoad (frontend_bundle.js:84666:29)
  • (frontend_bundle.js:84465:49)
  • doPluginTraceLoad (frontend_bundle.js:84460:38)
  • (frontend_bundle.js:84425:38)

Trace: not available (ARRAY_BUFFER). Provide repro steps.
UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
Referrer:

@alecazam alecazam changed the title Perefetto gets stuck here, and never recovers Perefetto gets stuck at "PixelMemory#ShowTotalMemory already exists" and never recovers Nov 4, 2024
alecazam added a commit to alecazam/kram that referenced this issue Nov 4, 2024
Perfetto gets hung up here.  Need to move off using web tools.
google/perfetto#923
@LalitMaganti
Copy link
Collaborator

So this is clearly a race condition because it's a double registration error. The problem is that we have no other reports of this issue.

If there's a way to repro this in a bare browser I can take a look but otherwise if this is some race condition which specific to your app/your usage of WKWebView/a bug in WKWebView, we would not have the bandwidth to look into this.

@LalitMaganti
Copy link
Collaborator

Also all of this code has been under heavy rework recently (for example, on HEAD doPluginTraceLoad function no longer even exists) so it's very possible that there was a bug which has been fixed.

@alecazam
Copy link
Author

alecazam commented Nov 5, 2024

Thanks, I'll keep checking if this goes away. The inability to reuse the Perfetto web view to load different data is a problem. It's already 600KB with nothing loaded. But this new issue causes the app to never recover, and post the same error when I try to load a different trace file. Something that broke in the last 2-3 months.

@LalitMaganti LalitMaganti added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants