[B2G][Helix][Bluetooth][HanCheng]B2G crash in mozilla::dom::bluetooth::BluetoothDBusService::AddReservedServicesInternal

RESOLVED FIXED

Status

Firefox OS
Bluetooth
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: lecky, Assigned: gyeh)

Tracking

unspecified

Firefox Tracking Flags

(blocking-b2g:hd+, b2g18 wontfix, b2g-v1.1hd fixed, b2g-v1.2 unaffected, b2g-v1.3 unaffected)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

4 years ago
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; aff-kingsoft-ciba; .NET4.0C; .NET4.0E)

Steps to reproduce:

* Description:
  B2G crash when open bluetooth.

* Reproduction steps:
  1. Open Airplane mode.
  2. Open Bluetooth.

* Expected result:
  Bluetooth can be opened and can search for devices.

* Actual result:
  B2G Crash. We only find this issue once.

* Reproduction build:( V1.1.0 hd/2013-11-14)

* Analyze
1. From the minidump, we saw B2G crash at mozilla::dom::bluetooth::BluetoothDBusService::AddReservedServicesInternal. [RawDBusConnection.h : 35 + 0x0]

The code:

BluetoothDBusService::AddReservedServicesInternal()
{
    ...
    dbus_func_args(gThreadConnection->GetConnection(),  // Crashed here
    ...

2. We try to disassemble libxul.so, but still can't find the root cause. Could you please give some suggestion about how to analyze the disassemble.txt?
(Reporter)

Comment 1

4 years ago
Created attachment 8348488 [details]
Log&minidump&disassemble for bt crash.rar

Crash happens at "12-16 12:09:21".

In kmsgcat-log:
12-16 12:09:21 <7>[1903, BluetoothCmd] [  508.331729] BluetoothCmd: unhandled page fault (11) at 0x00000000, code 0x017
(Reporter)

Updated

4 years ago
Flags: needinfo?(wchang)
There's no need to NI me.
Flags: needinfo?(wchang)
(Assignee)

Comment 3

4 years ago
I follow the STR hundreds of times but had no luck to reproduce.

However, the information from reporter caught my attention, I think that we can and we should do some check before using |gThreadConnection->GetConnection()|.
(Assignee)

Comment 4

4 years ago
This issue should be reproducible only on branch v1.1.0hd since we've already handled similar cases on other branches. Nominate hd?
blocking-b2g: --- → hd?
(Reporter)

Comment 5

4 years ago
Hi Gina:
   Which similar case? Can we merge into v1.1.0hd?
(Assignee)

Comment 6

4 years ago
Several bugs are involved and the patches are quite big. I would recommend to generate a patch for v1.1.0hd.
(Assignee)

Comment 7

4 years ago
Created attachment 8350556 [details] [diff] [review]
[v1.1.0hd] Patch 1: Check dbus connection before sending dbus message

This patch checks the dbus connection before sending out dbus message. In other words, if the connection is no longer existed, we report error back rather than using the broken connection which introduced crash.
Assignee: nobody → gyeh
Flags: needinfo?(lecky.wanglei)
(Reporter)

Comment 8

4 years ago
ok.Thanks!
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Flags: needinfo?(lecky.wanglei)
Resolution: --- → INVALID
Since this is a required code correction we should land this fix on our branch for correctness.
blocking-b2g: hd? → hd+
(Assignee)

Comment 10

4 years ago
Please do not close it until the patch is landed.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
(Assignee)

Comment 11

4 years ago
Comment on attachment 8350556 [details] [diff] [review]
[v1.1.0hd] Patch 1: Check dbus connection before sending dbus message

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

Eric, the patch is really really small. Please take a look when you get a minute. Thanks.
Attachment #8350556 - Flags: review?(echou)
Attachment #8350556 - Flags: review?(echou) → review+
(Assignee)

Comment 12

4 years ago
Created attachment 8356042 [details] [diff] [review]
[v1.1.0hd] Patch 1: Check dbus connection before sending dbus message, r=echou
Attachment #8350556 - Attachment is obsolete: true
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/releases/mozilla-b2g18_v1_1_0_hd/rev/2978f95130ee
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago4 years ago
status-b2g18: --- → wontfix
status-b2g-v1.1hd: --- → fixed
status-b2g-v1.2: --- → unaffected
status-b2g-v1.3: --- → unaffected
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.