GithubHelp home page GithubHelp logo

Attempting to draw a tooltip for a flat marker track (where all samples have the same value) causes a "Error: No samples for marker CPU" about profiler HOT 6 CLOSED

sefeng211 avatar sefeng211 commented on June 15, 2024
Attempting to draw a tooltip for a flat marker track (where all samples have the same value) causes a "Error: No samples for marker CPU"

from profiler.

Comments (6)

fqueze avatar fqueze commented on June 15, 2024

Can be reproduced with the profiles at https://treeherder.mozilla.org/jobs?repo=autoland&revision=f768135b85f29ef20a22825a054d1a6938475ba5&searchStr=a51&selectedTaskRun=XDBFxGowQwKYx0YAJk_1YQ.0

Somehow the resource monitoring fails for these jobs / on that hardware (Samsung A51 in bitbar). The test log says for example:
"Total resource usage - Wall time: 1843s; CPU: Can't collect data; Read bytes: 0; Write bytes: 0; Read time: 0; Write time: 0"

from profiler.

julienw avatar julienw commented on June 15, 2024

As another example see this profile from #4845 https://share.firefox.dev/3tcvuuo

from profiler.

julienw avatar julienw commented on June 15, 2024

I think the problem isn't about "having the same value" but the fact the marker schema for the "CPU" marker has an empty "graphs" array (empty as in "array with no items"). So I believe the error is on the code that generates this profile. Although it woulkd be good to not crash at it, or at least crash with a better error.

from profiler.

julienw avatar julienw commented on June 15, 2024

I made a PR to avoid the crash.

I think this is failing here:
https://searchfox.org/mozilla-central/rev/fa86401b80f19afb6ed9bfca127ecc5e3a6f0cdc/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py#1126-1135

From the comment it looks like you planned to add just the right properties to graphs but you forgot, what do you think @fqueze ?

from profiler.

julienw avatar julienw commented on June 15, 2024

Actually this happens a bit later in https://searchfox.org/mozilla-central/rev/fa86401b80f19afb6ed9bfca127ecc5e3a6f0cdc/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py#1156-1157
So maybe having an empty graphs array is the expected outcome, and my PR is just the right fix.

from profiler.

fqueze avatar fqueze commented on June 15, 2024

Actually this happens a bit later in https://searchfox.org/mozilla-central/rev/fa86401b80f19afb6ed9bfca127ecc5e3a6f0cdc/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py#1156-1157 So maybe having an empty graphs array is the expected outcome, and my PR is just the right fix.

We could make the code at
https://searchfox.org/mozilla-central/rev/fa86401b80f19afb6ed9bfca127ecc5e3a6f0cdc/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py#1148-1157 check len(cpuGraphs) and delete the "graphs" property entirely when it's empty, but your fix looks good enough to me in terms of error handling.
In any case this is an unexpected edge case where resourcemonitor fails to access the data from psutil, so the 'right' fix would be to figure out why it's not working (I'm guessing a python package is missing on some of our builders in CI).

Thanks for looking into it!

from profiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.