Closed Bug 1037258 Opened 10 years ago Closed 10 years ago

[B2G][Homescreen][Smart Collection] Smart Collection icons will not appear on the Homescreen when all Smart Collections are added at once.

Categories

(Firefox OS Graveyard :: Gaia::Everything.me, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.1 verified)

VERIFIED FIXED
2.0 S6 (18july)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- verified
b2g-v2.1 --- verified

People

(Reporter: Marty, Assigned: kgrandon)

References

()

Details

(Whiteboard: [273MB-Flame-Support], [2.0-exploratory] [systemsfe])

Attachments

(4 files)

Attached file logcat.txt
Description:
After removing the default Smart Collections (Games, Music, Social), if the player then decides to add all of the Smart Collections at once, the phone will be on the "loading' screen for about 1 minute, then return the user to the Homescreen, but none of the Smart Collections will be present.  If the user tries to add the Smart Collections again, only "Custom" will be available.

Note: This seems to happen when adding as few as 10 Smart Collections at once.

Occasionally, only 3-5 Smart Collections are visible, but usually, none are visible.

Repro Steps:
1) Update a Flame to 20140710000201
2) Long tap on the "Social" and remove all three default Smart Collections from the Homescreen.
3) Long tap on an empty part of the Homescreen, then select "Add Smart Collections"
4) Select all of the Smart Collections except "Custom" then tap "Ok"


Actual:
The Smart Collection icons don't appear on the Homescreen.


Expected:
All Smart Collection icons are visible on the Homescreen.

Environmental Variables:
Device: Flame v2.0 (273mb)
Build ID: 20140710000201
Gaia: 35a9b715e7348ec738ff6c8a59f50190390a06f2
Gecko: 94714370dfc3
Version: 32.0a2 (2.0)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0


Keywords:Homescreen, Smart Collections, Icons

Repro frequency: 90%
See attached: video (URL), logcat
This issue DOES occur on Flame v2.1 (273mb)

Environmental Variables:
Device: Flame Master (273mb)
Build ID: 20140710040201
Gaia: 4e4e579b4b1e35f863ed43ef6ba840f49bfd761c
Gecko: cb75d6cfb004
Version: 33.0a1 (Master)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0

Smart Collection icons do not appear on the Homescreen when all Smart Collections are added at once.

---------------------------------------------------

This issue does NOT occur on Buri v2.0, Buri v2.1, Open-C v2.0, Open-C v2.1, Flame v1.4 (273mb), or Flame 2.0 (512mb).

Environmental Variables:
Device: Flame v2.0 (512mb)
BuildID: 20140710000201
Gaia: 35a9b715e7348ec738ff6c8a59f50190390a06f2
Gecko: 94714370dfc3
Version: 32.0a2 (2.0) 
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0

Environmental Variables:
Device: Flame v1.4 (273mb)
Build ID: 20140710000202
Gaia: b0e9b4bdb39c5eb93a6783a34624ffc84f62b126
Gecko: ccabaf8826a4
Version: 30.0 (1.4)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0

Environmental Variables:
Device: Buri Master
Build ID: 20140710071930
Gaia: 09642e74e250fbc62db860c808ef188628fca55d
Gecko: f93c0ef45597
Version: 33.0a1 (Master)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0

Environmental Variables:
Device: Buri v2.0 MOZ ril
Build ID: 20140710000201
Gaia: 35a9b715e7348ec738ff6c8a59f50190390a06f2
Gecko: 94714370dfc3
Version: 32.0a2 (2.0)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0

Environmental Variables:
Device: Open_C Master
Build ID: 20140710071928
Gaia: 09642e74e250fbc62db860c808ef188628fca55d
Gecko: f93c0ef45597
Version: 33.0a1 (Master)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:33.0) Gecko/33.0 Firefox/33.0

Environmental Variables:
Device: Open_C v2.0 MOZ ril
Build ID: 20140710000201
Gaia: 35a9b715e7348ec738ff6c8a59f50190390a06f2
Gecko: 94714370dfc3
Version: 32.0a2 (2.0)
Firmware Version: P821A10V1.0.0B06_LOG_DL
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0

All Smart Collection icons appear properly on the Homescreen.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Blocks: 1015336
blocking-b2g: --- → 2.0?
QA Whiteboard: [QAnalyst-Triage?] → [VH-FL-blocking-][VH-FC-blocking+][QAnalyst-Triage?]
Whiteboard: [273MB-Flame-Support], [2.0-exploratory] → [273MB-Flame-Support], [2.0-exploratory] [systemsfe]
blocking-b2g: 2.0? → 2.0+
Attached file logcat2.txt
I'm also seeing a number of additional logged messages from both indexedDB and mozApps. When we save a collection we leverage mozApps and datastore (which uses IDB under the hood I believe).

Ni? for now on Ben/Baku for help here. It looks like we're getting into this line: http://mxr.mozilla.org/mozilla-central/source/dom/indexedDB/IDBTransaction.cpp#869

Do you guys know what would cause us to take that path?
Flags: needinfo?(bent.mozilla)
Flags: needinfo?(amarchesini)
Ted, can you do some investigation here? You touched this code before.
Assignee: nobody → tclancy
Target Milestone: --- → 2.0 S6 (18july)
"Invalidated" in IDB-land means that an active transaction was running when the window that owned it was closed. In such a case we abort the transaction if we can.

Most likely whatever event you're waiting on todecide that it is time to "return the user to the Homescreen" (comment 0) is not sufficient, and you should instead wait for the transaction.oncomplete handler instead.
Flags: needinfo?(bent.mozilla)
Flags: needinfo?(amarchesini)
I'm fairly sure this is because the collection app is sending an IAC message to homescreen, and homescreen is getting OOMed in the middle of a transaction. I will add some additional logging to verify, and comment here later.
Turns out this is actually happening when making put requests to the collections datastore. Seems like we try to save things, then everything OOMs including the collection app and homescreen app.
Component: Gaia::Homescreen → Gaia::Everything.me
This patch is not quite ideal as it has a huge performance tradeoff due to instead of fetching everything at once, we do so in queue. Performance is likely much worse on a linear scale, and we would need to profile both approaches to understand the tradeoffs. I'm also not 100% sure it actually fixes the issue in every case. Perhaps a product decision could be made to limit creation to 3-4 collections at any one time?

I would like to investigate to see if there any other platform fixes we can do in the meantime.
This is not representative of a real device as the resolution of the flame is much more than the open 2. We are trying to load @1.5x images here which causes a huge difference in memory usage. We should see if this would reproduce on a real device as this is not representative of a real use case, with a device DPI that is roughly in line with the memory.
Assignee: tclancy → nobody
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
(In reply to Kevin Grandon :kgrandon from comment #8)
> This is not representative of a real device as the resolution of the flame
> is much more than the open 2. We are trying to load @1.5x images here which
> causes a huge difference in memory usage. We should see if this would
> reproduce on a real device as this is not representative of a real use case,
> with a device DPI that is roughly in line with the memory.

This argument is irrelevant. Flame 273 MB *is* the reference solution for testing low memory right now, so we have to fix this bug until another solution is presented that QA can take advantage for low memory testing.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking+][QAnalyst-Triage?] → [VH-FL-blocking-][VH-FC-blocking+][QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Could we please have someone in Taipei QA with an Open 2 test and repro this for us with info
Flags: needinfo?(khu)
Keywords: qawanted
Brian, what do you think? Is it something you can help? Thanks.
Flags: needinfo?(khu) → needinfo?(brhuang)
Kevin, we don't have Open 2 to repro this. If there is any Open 2 that can be used by us, then we can try to repro it.
Flags: needinfo?(brhuang)
Vance, Do you know who has the Open 2 and we can borrow to do test?
Flags: needinfo?(vchen)
Already put 2 Open II on your desk, thanks
Flags: needinfo?(vchen)
(In reply to Candice Serran (:cserran) from comment #10)
> Could we please have someone in Taipei QA with an Open 2 test and repro this
> for us with info

Why are you pinging people to test this on Open II? We already concluded at a drivers' level that Flame 273 MB *must* be supported, except with a configuration close to the QRD. We should not be asking for qawanted requests for Open II.
Keywords: qawanted
Discussed offline - we're granting this as a one-off request, but we're not fully committed to doing this consistently.
Flags: needinfo?(brhuang)
Keywords: qawanted
edward, pls have someone in our team to check this.
Flags: needinfo?(brhuang) → needinfo?(edchen)
Even I fresh open II to 2.0 for testing this issue, but one thing you guys should be known that build belong to moz, its not QC build. We cannot 100% use the same environment with QC to do verify this issue.

[Environment]
Gaia      aa4f795b81c6147d67c4f06009e166debcf8856e
Gecko     https://hg.mozilla.org/releases/mozilla-aurora/rev/0ec0b9ac39f0
BuildID   20140716160201
Version   32.0a2
ro.build.version.incremental=eng.chencong.20140715.162404
ro.build.date=Tue Jul 15 16:25:44 CST 2014


[Result]
1. This bug can reproduce on Open II 
2. When user long tap homescreen, the all collections icons will be shown.
3. Collections function is normally.
Flags: needinfo?(edchen)
Keywords: qawanted
(In reply to Edward Chen[:edchen] from comment #18)
> Even I fresh open II to 2.0 for testing this issue, but one thing you guys
> should be known that build belong to moz, its not QC build. We cannot 100%
> use the same environment with QC to do verify this issue.
> 
> [Environment]
> Gaia      aa4f795b81c6147d67c4f06009e166debcf8856e
> Gecko     https://hg.mozilla.org/releases/mozilla-aurora/rev/0ec0b9ac39f0
> BuildID   20140716160201
> Version   32.0a2
> ro.build.version.incremental=eng.chencong.20140715.162404
> ro.build.date=Tue Jul 15 16:25:44 CST 2014
> 
> 
> [Result]
> 1. This bug can reproduce on Open II 
> 2. When user long tap homescreen, the all collections icons will be shown.
> 3. Collections function is normally.

Is this still a bug? Your results say "function is normal"....can you please confirm?
The situation still a bug because collection icons will not appear when user select all of the collections and add to homescreen. 

I mentioned before about "function is normal" means when user long tap any icons that will show all of collections immediately, after tap home button, user can use collections.
It seems that bug 1029902 will fix this regardless as the homescreen uses a lot less memory (does not get oom'd)
Assignee: nobody → kgrandon
Status: REOPENED → ASSIGNED
Depends on: 1029902
Now that we have landed bug 1040070, this is working fine for me due to homescreen memory savings.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Attached video video
This issue has been verified successfully on Flame 2.0 & 2.1
See attachment: Verify_video.MP4
Reproducing rate: 0/10

Flame2.0 build:
Gaia-Rev        8d1e868864c8a8f1e037685f0656d1da70d08c06
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/c756bd8bf3c3
Build-ID        20141127000203
Version         32.0

Flame2.1 build:
Gaia-Rev        5372b675e018b6aac97d95ff5db8d4bd16addb9b
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/f34377ae402b
Build-ID        20141127001201
Version         34.0
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: