Closed Bug 761796 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: Hardware Abstraction Layer (HAL), defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: gwagner, Assigned: slee)

Details

Attachments

(1 file)

seen on current mc tip during startup with a debug build on the device.
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
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?
Michael you reviewed the code and requested a change in this assertion. I don't think that is what we want here.
Component: General → Hardware Abstraction Layer (HAL)
Product: Boot2Gecko → Core
QA Contact: general → hal
Hardware: x86 → All
(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.
(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.
(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
Hi Michael, I fixed the assertion that you requested in Bug 734869. Sorry for mindless fault.
Attachment #630807 - Flags: review?(mwu)
Attachment #630807 - Flags: review?(mwu) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: