Bug 1334954 - UI freezes with a spinning logo forever
Summary: UI freezes with a spinning logo forever
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: GA
: 5.6.0
Assignee: Martin Hradil
QA Contact: Einat Pacifici
URL:
Whiteboard: ui:spinner:rest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-10 22:45 UTC by Dafna Ron
Modified: 2018-04-17 07:47 UTC (History)
7 users (show)

Fixed In Version: 5.6.0.8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 16:01:35 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs and screenshot (5.58 MB, application/x-gzip)
2016-05-10 22:45 UTC, Dafna Ron
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Dafna Ron 2016-05-10 22:45:27 UTC
Created attachment 1155898 [details]
logs and screenshot

Description of problem:

I randomly pressed the sort buttons on the columns in the tables listing the container projects and the screen froze. 
I managed to reproduce it again by doing the same thing.
Looking in inspect elements it seems that every time it freezes there is an api request.   


Version-Release number of selected component (if applicable):

cfme-5.6.0.5-beta2.4.1.el7cf.x86_64

How reproducible:

100%

Steps to Reproduce:
1. in the projects page (compute -> containers -> projects) randomly press the headline of the different columns to sort the objects. 
2.
3.

Actual results:

after about 30 seconds the screen would freeze 
I noticed that every time it happens its when an api request is sent. 

Expected results:

screen should not freeze. 

Additional info:
logs and screen shots

Comment 2 Federico Simoncelli 2016-05-11 22:22:28 UTC
Dan it seems a race between the "/container_project/show_list?sortby=X" request and the "/api" request.

Is the recurring "/api" request (every minute) involving somehow the spinner?

On the backend side it seems all OK:

[----] I, [2016-05-10T18:29:30.369305 #3032:176bc30]  INFO -- : Started POST "/container_project/show_list?sortby=4&" for 127.0.0.1 at 2016-05-10 18:29:30 -0400
[----] I, [2016-05-10T18:29:30.370706 #3032:176bc30]  INFO -- : Processing by ContainerProjectController#show_list as JS
[----] I, [2016-05-10T18:29:30.370771 #3032:176bc30]  INFO -- :   Parameters: {"sortby"=>"4"}
[----] I, [2016-05-10T18:29:30.621176 #3032:176bc30]  INFO -- :   Rendered layouts/_flash_msg.html.haml (0.1ms)
[----] I, [2016-05-10T18:29:30.621943 #3032:176bc30]  INFO -- :   Rendered layouts/_info_msg.html.haml (0.1ms)
[----] I, [2016-05-10T18:29:30.622050 #3032:176bc30]  INFO -- :   Rendered layouts/listnav/_show_list.html.haml (0.3ms)
[----] I, [2016-05-10T18:29:30.622135 #3032:176bc30]  INFO -- :   Rendered layouts/_listnav.html.haml (0.5ms)
[----] I, [2016-05-10T18:29:30.625673 #3032:176bc30]  INFO -- :   Rendered layouts/_list_grid.html.haml (3.2ms)
[----] I, [2016-05-10T18:29:30.627436 #3032:176bc30]  INFO -- :   Rendered layouts/_pagingcontrols.html.haml (0.8ms)
[----] I, [2016-05-10T18:29:30.632972 #3032:176bc30]  INFO -- : Completed 200 OK in 262ms (Views: 7.6ms | ActiveRecord: 0.0ms)
[----] I, [2016-05-10T18:29:32.618952 #3032:176a0c4]  INFO -- : Started POST "/container_project/show_list?sortby=2&" for 127.0.0.1 at 2016-05-10 18:29:32 -0400
[----] I, [2016-05-10T18:29:32.620441 #3032:176a0c4]  INFO -- : Processing by ContainerProjectController#show_list as JS
[----] I, [2016-05-10T18:29:32.620525 #3032:176a0c4]  INFO -- :   Parameters: {"sortby"=>"2"}
[----] I, [2016-05-10T18:29:32.944180 #3032:176a0c4]  INFO -- :   Rendered layouts/_flash_msg.html.haml (0.1ms)
[----] I, [2016-05-10T18:29:32.945000 #3032:176a0c4]  INFO -- :   Rendered layouts/_info_msg.html.haml (0.1ms)
[----] I, [2016-05-10T18:29:32.945099 #3032:176a0c4]  INFO -- :   Rendered layouts/listnav/_show_list.html.haml (0.3ms)
[----] I, [2016-05-10T18:29:32.945188 #3032:176a0c4]  INFO -- :   Rendered layouts/_listnav.html.haml (0.6ms)
[----] I, [2016-05-10T18:29:32.948945 #3032:176a0c4]  INFO -- :   Rendered layouts/_list_grid.html.haml (3.4ms)
[----] I, [2016-05-10T18:29:32.950697 #3032:176a0c4]  INFO -- :   Rendered layouts/_pagingcontrols.html.haml (0.9ms)
[----] I, [2016-05-10T18:29:32.956350 #3032:176a0c4]  INFO -- : Completed 200 OK in 336ms (Views: 7.9ms | ActiveRecord: 0.0ms)
[----] I, [2016-05-10T18:29:33.327316 #3045:174079c]  INFO -- : Started GET "/api" for 127.0.0.1 at 2016-05-10 18:29:33 -0400
[----] I, [2016-05-10T18:29:33.357161 #3045:174079c]  INFO -- : Processing by ApiController#show as JSON
[----] I, [2016-05-10T18:29:33.484713 #3045:174079c]  INFO -- : Completed 200 OK in 127ms (Views: 0.5ms | ActiveRecord: 0.0ms)
[----] I, [2016-05-10T18:30:32.733013 #3045:17404e0]  INFO -- : Started GET "/api" for 127.0.0.1 at 2016-05-10 18:30:32 -0400
[----] I, [2016-05-10T18:30:32.756148 #3045:17404e0]  INFO -- : Processing by ApiController#show as JSON
[----] I, [2016-05-10T18:30:32.876420 #3045:17404e0]  INFO -- : Completed 200 OK in 120ms (Views: 0.5ms | ActiveRecord: 0.0ms)


So I tend to believe that it's some race in the frontend.

Comment 5 Martin Hradil 2016-05-20 13:31:16 UTC
https://github.com/ManageIQ/manageiq/pull/8851

Comment 6 CFME Bot 2016-05-20 19:30:55 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/339f16b9397861f7840910dc02b58ec48aa11a17

commit 339f16b9397861f7840910dc02b58ec48aa11a17
Author:     Martin Hradil <mhradil>
AuthorDate: Fri May 20 13:22:55 2016 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Fri May 20 13:22:55 2016 +0000

    Add a window.fetch polyfill
    
    the is a polyfill for the [Fetch API](https://fetch.spec.whatwg.org/)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1334954

 app/assets/javascripts/application.js | 1 +
 bower.json                            | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comment 7 CFME Bot 2016-05-20 19:31:00 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/65444bc7fe4e8ac50f2de9617e4e5b527811a600

commit 65444bc7fe4e8ac50f2de9617e4e5b527811a600
Author:     Martin Hradil <mhradil>
AuthorDate: Fri May 20 13:25:30 2016 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Fri May 20 13:25:30 2016 +0000

    JS API.* - use fetch instead of $.ajax
    
    By using the fetch api (either native, or polyfilled on top of XMLHttpRequest), instead of jQuery ajax, the API requests won't get counted in $.active.
    
    Thus, miqSparkle(false) works even if an API request is running at the same time..
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1334954

 app/assets/javascripts/miq_api.js | 62 ++++++++++++++++++++++++++++-----------
 1 file changed, 45 insertions(+), 17 deletions(-)

Comment 8 Dafna Ron 2016-05-26 13:28:48 UTC
verified on cfme-5.6.0.8-rc1.1.el7cf.x86_64

I had other requests running during api call and UI did not freeze.

Comment 10 errata-xmlrpc 2016-06-29 16:01:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348


Note You need to log in before you can comment on or make changes to this bug.