Closed Bug 1119727 Opened 5 years ago Closed 5 years ago

JavaScript Error: "Settings queue head blocked at {ID} for X secs, Settings API may be soft lockup"

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
FxOS-S3 (24Jul)
Tracking Status
firefox42 --- fixed

People

(Reporter: jlorenzo, Assigned: gerard-majax)

References

Details

(Whiteboard: [systemsfe])

Attachments

(2 files, 1 obsolete file)

Attached file Logcat
Build info
Gaia-Rev        82b534791a72ad59c78363df80459e18d35b48f8
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/d480b3542cc2
Build-ID        20150108160401
Version         37.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.jlorenzo.20141211.144125
FW-Date         Thu Dec 11 14:41:42 CET 2014
Bootloader      L1TC000118D0


STR
1. Restart your device
2. See this line appearing multiple times in the logcat:

> 01-09 02:30:01.020   213   213 W GeckoConsole: [JavaScript Error: "Settings queue head blocked at {e2cf8e5e-58d4-4a35-bf7a-dad0ee34e565} for 1420694096.139 secs, Settings API may be soft lockup. Lock from: SettingsServiceLock@jar:file:///system/b2g/omni.ja!/components/SettingsService.js:80:17

> 01-09 10:45:43.445   213   213 I Gecko   : -*- SettingsRequestManager: Settings queue head blocked at {cae91662-5bf2-477a-be2d-bda9336ff236} for 29712.325 secs, Settings API may be soft lockup. Lock from: SettingsLock@jar:file:///system/b2g/omni.ja!/components/SettingsManager.js:73:17
Do you guys have an idea about these potential lockups?
Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(kyle)
Flags: needinfo?(gsvelto)
Johan, as I already said on IRC those looks like false positive, given the time the lock is reported to be held for.

We are using the date to detect soft lockup.
Flags: needinfo?(lissyx+mozillians)
Depends on: 1061797
Whiteboard: [systemsfe]
Cancelling ni? since it was answered in Comment 2
Flags: needinfo?(kyle)
Flags: needinfo?(gsvelto)
Just want to mention I had the issue after flashing a gecko+gaia without removing my user data.

In addition to this, the phone wouldn't boot at all. But this could be unrelated.
This problem also happens while using |./run-emulator.sh| on recently emulator-kk builds.
(In reply to SUN Haitao from comment #5)
> This problem also happens while using |./run-emulator.sh| on recently
> emulator-kk builds.

Can you be more clear?
Flags: needinfo?(sunhaitao)
The full reproducing steps are:

0. Make a new clone of the B2G repository. Open the top directory in terminal.
1. run |./config.sh emulator-kk|
2. run |./build.sh|
3. run |adb logcat| in another terminal.
4. run |./run-emulator|

The emulator boot to the screen says 'Based on Mozilla technology' then freeze.
And near the end of the log, there are some messages like the following that appear several times:

I/Gecko   (   62): -*- SettingsRequestManager: Settings queue head blocked at {b70c4f95-ee7b-4990-8be9-621b7cac4a38} for 33.998 secs, Settings API may be soft lockup. Lock from: SettingsServiceLock@jar:file:///system/b2g/omni.ja!/components/SettingsService.js:80:17
I/Gecko   (   62): createLock@jar:file:///system/b2g/omni.ja!/components/SettingsService.js:291:16
I/Gecko   (   62): 
W/GeckoConsole(   62): [JavaScript Error: "Settings queue head blocked at {b70c4f95-ee7b-4990-8be9-621b7cac4a38} for 34.004 secs, Settings API may be soft lockup. Lock from: SettingsServiceLock@jar:file:///system/b2g/omni.ja!/components/SettingsService.js:80:17
W/GeckoConsole(   62): createLock@jar:file:///system/b2g/omni.ja!/components/SettingsService.js:291:16
W/GeckoConsole(   62): " {file: "resource://gre/modules/SettingsRequestManager.jsm" line: 1031}]
Flags: needinfo?(sunhaitao)
As far as I know, emulators builds do work, but it's just slow. In this case, this message is harmless: it's just taking a very long time to process.
Depends on: 1110010
No longer depends on: 1061797
I see this spew a lot as well - in local emulator runs, device builds, and in tryserver logs. Can we make the threshold at which it gets dumped a little more lax?
Duplicate of this bug: 1186113
Attachment #8636719 - Attachment is obsolete: true
Attachment #8636720 - Flags: review?(anygregor)
Assignee: nobody → lissyx+mozillians
Target Milestone: --- → FxOS-S3 (24Jul)
Comment on attachment 8636720 [details] [diff] [review]
Make Settings Soft Lockup threshold configurable

This should help, you can change the pref value when running tests.
Attachment #8636720 - Flags: feedback?(erahm)
Attachment #8636720 - Flags: review?(anygregor) → review+
Comment on attachment 8636720 [details] [diff] [review]
Make Settings Soft Lockup threshold configurable

Review of attachment 8636720 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me, this should allow us to take care of a majority of the output.

::: dom/settings/SettingsRequestManager.jsm
@@ +58,4 @@
>  // Time, in seconds, to consider the API is starting to jam
> +let kSoftLockupDelta = 30;
> +try {
> +  kSoftLockupDelta = Services.prefs.getIntPref("dom.mozSettings.softLockupDelta");

Should we also add a default to b2g.js?
Attachment #8636720 - Flags: feedback?(erahm) → feedback+
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/076402b44295
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
See Also: → 1208725
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.