Checbox-touch hangs after running the package resource job on desktop

Bug #1477423 reported by Sylvain Pineau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Converged
Fix Released
Critical
Sylvain Pineau

Bug Description

Steps to reproduce:

Select the smoke test plan, and only the package resource job.
The ui will go grey and 100%cpu is used.

Tested on both trusty and vivid.

From the stdout logs, it seems the job completed as the last line reported by the resource execution is a package starting with 'z'.

Tags: convergence

Related branches

Changed in checkbox-touch:
milestone: none → 1.3
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Once greyed out, trying to close the app returns:

qmlscene: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.

Ara Pulido (ara)
tags: added: desktop
Ara Pulido (ara)
tags: added: convergence
removed: desktop
Changed in checkbox-touch:
assignee: nobody → Sylvain Pineau (sylvain-pineau)
status: Confirmed → In Progress
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

On desktop systems the package resource job can output data for more than 2500 packages (1000 for ubuntu-touch on my N7).
it makes a huge difference as pytherside send async event to the command output handler which updates the textarea of the command output page even if not visible for every line received.

The bottleneck is not the string concat but access to the textarea.text property for each event.

A solution could be a buffered string property and textarea updates based on a qml timer, the buffer being updated by the event handler for each line.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Note that ECMAscript to not fix a maximum size for string var, so it all depends on possible QML limitations or memory

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Hmm, do we send the delta (the new event) or just the whole load of text each time. If we send (and compute each time) the full text then this is simply a quadratic problem hidden beneath the layers.

Your fix will hide the problem a little but not fix it. Please work with Maciek to ensure we're using the delta interface there (essentially tie to on_chunk/on_line and this will be okay and should scale to any size without having to compute the buffer text periodically.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

We react on the on_line signal IIRC, so only the delta (or the line) is sent by pyotherside.send().
But every 300ms, the whole textarea is is updated indeed.

Changed in checkbox-touch:
status: In Progress → Fix Committed
Changed in checkbox-converged:
milestone: 1.3 → none
status: Fix Committed → Fix Released
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.