Multiple profiler traces get same base_id

Bug #1777486 reported by Stuart Grace
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Stuart Grace

Bug Description

OpenStack Queens release.

With developer panel and profiler enabled, you can select "Profile Current Page" to create a new profiler trace. That initializes a profiler instance here:

https://github.com/openstack/horizon/blob/master/openstack_dashboard/contrib/developer/profiler/middleware.py#L64

That instance is never deleted. The next time you select "Profile Current Page", the test here finds the previous instance and returns it, instead of creating a new instance:

https://github.com/openstack/osprofiler/blob/master/osprofiler/profiler.py#L59

So the previous base_id is reused for the new trace. When the trace details are retrieved from the profiler database by searching for the base_id, events from both first and second traces are returned.

Changed in horizon:
assignee: nobody → Stuart Grace (stuartgrace)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/575793
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2e2ef6a8d045c150116242a5b0bed635483fc7c8
Submitter: Zuul
Branch: master

commit 2e2ef6a8d045c150116242a5b0bed635483fc7c8
Author: Stuart Grace <email address hidden>
Date: Fri Jun 15 17:56:25 2018 +0100

    Delete profiler object when request completes

    When a request that is being profiled completes and the response is
    received, the middleware expires the profiling cookie. It also needs
    to delete the profiling object that holds the base_id UUID so a new
    base_id will be created for the next profile. Otherwise the same
    base_id is used for subsequent queries and they become merged togther
    in the database.

    Change-Id: I379cebfa2ed5282c96df0e255a8ba04c65a8523c
    Closes-Bug: #1777486
    Depends-On: https://review.openstack.org/578362

Changed in horizon:
status: In Progress → Fix Released
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Medium
milestone: none → rocky-rc1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.