F/MOZ_Assert( 2060): Assertion failure: sSensorStatus[index].count == 0 || mActivate, at /Volumes/mac/moz/b2ggecko/hal/gonk/GonkSensor.cpp:210

RESOLVED FIXED in mozilla16

Status

()

Core
Hardware Abstraction Layer (HAL)
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gwagner, Assigned: slee)

Tracking

unspecified
mozilla16
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
seen on current mc tip during startup with a debug build on the device.
(Reporter)

Comment 1

5 years ago
I added a log message. mActivate is false.
I/GonkSensor( 1835): index: 5, type: 5, mActivate: 1
I/Gecko   ( 1835): WARNING: 1 sort operation has occurred for the SQL statement '0xca9940'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file /Volumes/mac/moz/iB2G/storage/src/mozStoragePrivateHelpers.cpp, line 110
I/GonkSensor( 1835): index: 1, type: 1, mActivate: 1
I/GonkSensor( 1835): index: 4, type: 4, mActivate: 1
I/wpa_supplicant( 2042): wlan0: Trying to associate with d8:c7:c8:eb:0b:b1 (SSID='Mozilla Guest' freq=2462 MHz)
I/wpa_supplicant( 2042): wlan0: Associated with d8:c7:c8:eb:0b:b1
I/wpa_supplicant( 2042): wlan0: CTRL-EVENT-CONNECTED - Connection to d8:c7:c8:eb:0b:b1 completed (auth) [id=0 id_str=]
I/Gecko   ( 1835): WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111: file /Volumes/mac/moz/iB2G/uriloader/prefetch/nsOfflineCacheUpdate.cpp, line 1071
E/lights  ( 1835): write_int: path /sys/class/backlight/panel/brightness, value 51
E/lights  ( 1835): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 1
I/Gecko   ( 1835): RIL Worker: ICC_EF_MSISDN: invalid length of BCD number/SSC contents - 255
I/Gecko   ( 1835): RIL Worker: ICC_EF_MSISDN: invalid length of BCD number/SSC contents - 255
I/Gecko   ( 1835): WARNING: Unable to test style tree integrity -- no content node: file /Volumes/mac/moz/iB2G/layout/base/nsCSSFrameConstructor.cpp, line 8018
I/Gecko   ( 1835): WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111: file /Volumes/mac/moz/iB2G/uriloader/prefetch/nsOfflineCacheUpdate.cpp, line 1071
I/GonkSensor( 1835): index: 1, type: 1, mActivate: 0
F/MOZ_Assert( 1835): Assertion failure: sSensorStatus[index].count == 0 || mActivate, at /Volumes/mac/moz/iB2G/hal/gonk/GonkSensor.cpp:210
F/libc    ( 1835): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
I/DEBUG   ( 1823): debuggerd committing suicide to free the zombie!
I/DEBUG   ( 2059): debuggerd: May 18 2012 13:59:56
(Reporter)

Comment 2

5 years ago
and sSensorStatus[index].count is 1 when we assert.
What does the count field track? The number of activations?
But why do we assert on count == 0 when we disable? Is just the assertion code wrong?
(Reporter)

Comment 3

5 years ago
Michael you reviewed the code and requested a change in this assertion. I don't think that is what we want here.

Updated

5 years ago
Component: General → Hardware Abstraction Layer (HAL)
Product: Boot2Gecko → Core
QA Contact: general → hal

Updated

5 years ago
Hardware: x86 → All

Comment 4

5 years ago
(In reply to Gregor Wagner [:gwagner] from comment #3)
> Michael you reviewed the code and requested a change in this assertion. I
> don't think that is what we want here.

No, we want it. That means someone isn't balancing their enable/disable sensor calls. Number of deactivations cannot exceed the number of activations.
(Reporter)

Comment 5

5 years ago
(In reply to Michael Wu [:mwu] from comment #4)
> (In reply to Gregor Wagner [:gwagner] from comment #3)
> > Michael you reviewed the code and requested a change in this assertion. I
> > don't think that is what we want here.
> 
> No, we want it. That means someone isn't balancing their enable/disable
> sensor calls. Number of deactivations cannot exceed the number of
> activations.

I am not questioning the assert. I don't know the background of the enable/disable sensor logic but how can somebody disable a sensor?
So if we enable, we increase count.

If we disable, we should have a count > 0 and mActivate false.
Then we assert sSensorStatus[index].count == 0 || mActivate.

Comment 6

5 years ago
(In reply to Gregor Wagner [:gwagner] from comment #5)
> I am not questioning the assert. I don't know the background of the
> enable/disable sensor logic but how can somebody disable a sensor?
> So if we enable, we increase count.
> 
> If we disable, we should have a count > 0 and mActivate false.
> Then we assert sSensorStatus[index].count == 0 || mActivate.

Huh, I misread the code. You're right, that's totally wrong, it should be count > 0.

Uh, which I apparently already noticed in the review. The review was conditional on this assertion being fixed. https://bugzilla.mozilla.org/show_bug.cgi?id=734869#c18
Assignee: nobody → slee
(Assignee)

Comment 7

5 years ago
Created attachment 630807 [details] [diff] [review]
Fixed assertion failure

Hi Michael,
I fixed the assertion that you requested in Bug 734869. Sorry for mindless fault.
Attachment #630807 - Flags: review?(mwu)

Updated

5 years ago
Attachment #630807 - Flags: review?(mwu) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
(Reporter)

Comment 8

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/18e5d968ad10
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/18e5d968ad10

(Merged by Ed Morley)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.