Closed Bug 1089658 Opened 7 years ago Closed 7 years ago

NFC: b2g crashes when trying to read MIFARE Classic tag

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox36 wontfix, firefox37 wontfix, firefox38 fixed, b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S5 (6feb)
Tracking Status
firefox36 --- wontfix
firefox37 --- wontfix
firefox38 --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: tauzen, Assigned: dimi)

References

Details

Attachments

(6 files, 2 obsolete files)

Recently I've noticed that each time I try to read a MIFARE Classic tag, b2g crashes. I know that we don't support MIFARE Classic, but trying to read it should not cause such problem.

In the attached log you can see a segmentation fault just after nfcd tries to notify gecko about the discovered tag:
>D/NfcNci  (  299): doCheckNdefResult: flag all unknown
>D/NfcNci  (  299): doCheckNdef: exit; status=0x3
>E/NfcNci  (  299): doReadNdefInfo: Check NDEF Failed - status = 3
>D/nfcd    (  299): processNotificaton notification=2001
>D/nfcd    (  299): void NfcIpcSocket::writeToOutgoingQueue(uint8_t*, size_t) enter, data=0xb7dcdd68, dataLen=28
>D/nfcd    (  299): Writing 28 bytes to gecko 
>D/NfcNci  (  299): doPresenceCheck
>I/BrcmNfcNfa(  299): NFA_RwPresenceCheck
>I/BrcmNfcNfa(  299): NFC_Deactivate 5 (OPEN) deactivate_type:1
>F/libc    (  294): Fatal signal 11 (SIGSEGV) at 0x00000380 (code=1), thread 294 (b2g)
Assignee: nobody → dlee
Blocks: b2g-nfcd
Hi Krzysztof,
Could you help update the attached nfcd and add |-v theadtime| to dump log again ? Thanks for help
Sure, but could you paste the command needed update nfcd? (I haven't done this before myslef)
Flags: needinfo?(dlee)
Ok, figured this out. 
But actually, after doing ./repo sync -d and full build the error does not happen anymore. I assume this might be related to switching back and forth form QCRIL image to regular master. I'll leave this open for couple more days and if it won't occur I'll close this bug as invalid if it's ok with you.
Sorry for all the trouble.
Flags: needinfo?(dlee)
Yes

Bug if this bug is reproduced,
You can use "adb push nfcd /system/bin/" to update nfcd, and then reboot device dump the log again, please also add -v threadtime when dumping adb log, thanks
Hi krzysztof,
Can this issue still be reproduced ? If not, i would suggest we close this bug.
Flags: needinfo?(kmioduszewski)
I actually had experienced this yesterday on a Friday build. I just want to do a fresh build today, if everything will be ok I'll close this. Will remove ni, once I did the final test.
Ok, i replicated this once more on todays build:
Gecko:
commit 1e0235c7b7f910135090e4f72f9f30ae74c12162
Merge: 4a1ad5b 00198ea
Author: Wes Kocher <wkocher@mozilla.com>
Date:   Mon Nov 10 18:14:04 2014 -0800

    Merge b2g-inbound to m-c a=merge

nfcd:
commit 91a2872824a81dea949f0b57a1399dade5d4d1ea
Merge: 2cb1db1 d65b31e
Author: Yoshi Huang <allstars.chh@gmail.com>
Date:   Fri Nov 7 19:50:54 2014 +0800

    Merge pull request #72 from allstarschh/Bug1055460
    
    Bug 1055460 - replace config with power request. r=dimi
Log with debug nfcd and threadtime
Flags: needinfo?(kmioduszewski)
Hi krzysztof,
Is this issue 100% reproducible when tap the tag ?
I saw this on my debug build.

12-10 22:31:59.420: A/MOZ_Assert(916): Assertion failure: tech < NFCTechType::EndGuard_, at ../../../gecko/dom/nfc/gonk/NfcService.cpp:130
Depends on: 1120321
Depends on: 1120841
Attachment #8554362 - Flags: review?(allstars.chh)
Attached patch WebIDL change v1 (obsolete) — Splinter Review
Attachment #8554363 - Flags: review?(allstars.chh)
Comment on attachment 8554363 [details] [diff] [review]
WebIDL change v1

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

need review from a DOM peer.
Attachment #8554363 - Flags: review?(allstars.chh) → review+
Attachment #8554362 - Flags: review?(allstars.chh) → review+
Comment on attachment 8554363 [details] [diff] [review]
WebIDL change v1

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

r? to smaug for WebIDL change
Attachment #8554363 - Flags: review?(bugs)
Attachment #8554363 - Flags: review?(bugs) → review+
Attached patch WebIDL change v2Splinter Review
Update patch description
Attachment #8554363 - Attachment is obsolete: true
Attachment #8554971 - Flags: review+
Keywords: checkin-needed
need rebased nfcd base on bug 1125041
Keywords: checkin-needed
Hi Yoshi,
Please help review again because there is some changed due to rebase on bug 1125041
Attachment #8554362 - Attachment is obsolete: true
Attachment #8555076 - Flags: review?(allstars.chh)
Attachment #8555076 - Flags: review?(allstars.chh) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9b56103db0ce
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S5 (6feb)
Comment on attachment 8554971 [details] [diff] [review]
WebIDL change v2

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
New bug

User impact if declined: 
b2g crash when reading NFC mifare-classic tag type

Testing completed: 
Manually test with mifare-classic tag

String or UUID changes made by this patch:
None
Attachment #8554971 - Flags: approval-mozilla-b2g37?
Comment on attachment 8555594 [details] [review]
pull request to mozilla-b2g/platform_system_nfcd 2.2

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
New bug

User impact if declined: 
b2g crash when reading NFC mifare-classic tag type

Testing completed: 
Manually test with mifare-classic tag

String or UUID changes made by this patch:
None
Attachment #8555594 - Flags: approval-mozilla-b2g37?
Attachment #8554971 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Attachment #8555594 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
You need to log in before you can comment on or make changes to this bug.