Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHSAFM crashed with Fatal signal 6 (SIGABRT) #91

Closed
edWin-m opened this issue Feb 28, 2023 · 8 comments
Closed

GHSAFM crashed with Fatal signal 6 (SIGABRT) #91

edWin-m opened this issue Feb 28, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@edWin-m
Copy link
Contributor

edWin-m commented Feb 28, 2023

@pierredelisle The issue started when I switched from polling to device state change subscriptions.
I have noticed there is an issue with shutting subscriptions at the moment.

Utils.kt (line 291-293)

// We currently have issues with terminating subscriptions.
// Toggle this switch to test both behaviors.
const val UNSUBSCRIBE_ENABLED = false

Could this be related to the crash?🤔

The crash log(log_level = error) is shown below. I have also uploaded a larger log file showing all the debug logs leading to the **SIGABRT**

2023-02-28 16:19:23.106 22897-10318 DMG                     com.google.homesampleapp.default     E  Subscription Liveness timeout with SubscriptionID = 0x3de99ed0, Peer = 01:0000000000000003
---------------------------- PROCESS ENDED (22897) for package com.google.homesampleapp.default ----------------------------
2023-02-28 16:19:27.804 22897-10122 DL                      com.google.homesampleapp.default     E  Chip stack locking error at '../../src/transport/Session.h:187'. Code is unsafe/racy
2023-02-28 16:19:27.804 22897-10122 -                       com.google.homesampleapp.default     E  chipDie chipDie chipDie
2023-02-28 16:19:27.805 22897-10122 libc                    com.google.homesampleapp.default     A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 10122 (FinalizerDaemon), pid 22897 (mpleapp.default)
2023-02-28 16:19:27.844 10547-10547 DEBUG                   pid-10547                            A  pid: 22897, tid: 10122, name: FinalizerDaemon  >>> com.google.homesampleapp.default <<<
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #01 pc 0000000000830908  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chipAbort+12)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #02 pc 00000000016e4c68  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chipDie+56)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #03 pc 00000000016e4bf4  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::Platform::Internal::AssertChipStackLockedByCurrentThread(char const*, int)+100)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #04 pc 00000000016f8714  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::Transport::Session::RemoveHolder(chip::SessionHolder&)+40)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #05 pc 00000000016f80ac  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::SessionHolder::Release()+60)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #06 pc 00000000016f8048  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::SessionHolder::~SessionHolder()+40)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #07 pc 000000000084e064  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::app::ReadPrepareParams::~ReadPrepareParams()+36)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #08 pc 0000000001678d50  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::app::ReadClient::~ReadClient()+104)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #09 pc 000000000082c0e8  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (void chip::Platform::Delete<chip::app::ReadClient>(chip::app::ReadClient*)+44)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #10 pc 000000000082c08c  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::Controller::ReportCallback::~ReportCallback()+216)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #11 pc 000000000082c1bc  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (chip::Controller::ReportCallback::~ReportCallback()+32)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #12 pc 000000000082add0  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/base.apk (offset 0x100f000) (Java_chip_devicecontroller_ReportCallbackJni_deleteCallback+132)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #13 pc 0000000000049a34  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/oat/arm64/base.odex (art_jni_trampoline+132)
2023-02-28 16:19:27.920 10547-10547 DEBUG                   pid-10547                            A        #20 pc 0000000000400e0a  /data/app/~~IPRKzMBSc8cXgdyPJArmjQ==/com.google.homesampleapp.default-h93aTJRYcr2aBvZ-pKE1-A==/oat/arm64/base.vdex (chip.devicecontroller.ReportCallbackJni.finalize+22)

Steps to Reproduce

  1. Commission color temperature light(ESP32 light example) to GHSAFM
  2. Toggle between the HomeFragment and the DeviceFragmnet continuously

Complete Log

2023-02-28.GHSA.Crash.log

@pierredelisle
Copy link
Contributor

@edWin-m If you have details on how to reproduce, that would be useful. Have not personally experienced that issue yet.

@edWin-m
Copy link
Contributor Author

edWin-m commented Mar 4, 2023

@pierredelisle to reproduce this crash, open the device fragment and close it (this should take you back to the home fragment). Repeat this action a couple of times (I know this is not a solid test plan). However, right now due to #93, I can not test this at the moment so we might just have to go with that until I can commission my test device.

@pierredelisle
Copy link
Contributor

OK, have been able to reproduce. Will be looking into it.

@pierredelisle
Copy link
Contributor

For the record, crash report:

--------- beginning of crash
03-04 13:00:08.867 14228 14240 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 14240 (FinalizerDaemon), pid 14228 (mpleapp.default)
03-04 13:00:09.445 14328 14328 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-04 13:00:09.445 14328 14328 F DEBUG   : Build fingerprint: 'google/sunfish/sunfish:12/SQ1A.220205.002/8010174:userdebug/dev-keys'
03-04 13:00:09.445 14328 14328 F DEBUG   : Revision: 'MP1.0'
03-04 13:00:09.445 14328 14328 F DEBUG   : ABI: 'arm64'
03-04 13:00:09.445 14328 14328 F DEBUG   : Timestamp: 2023-03-04 13:00:08.991908961-0800
03-04 13:00:09.445 14328 14328 F DEBUG   : Process uptime: 0s
03-04 13:00:09.445 14328 14328 F DEBUG   : Cmdline: com.google.homesampleapp.default
03-04 13:00:09.445 14328 14328 F DEBUG   : pid: 14228, tid: 14240, name: FinalizerDaemon  >>> com.google.homesampleapp.default <<<
03-04 13:00:09.445 14328 14328 F DEBUG   : uid: 10401
03-04 13:00:09.445 14328 14328 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
03-04 13:00:09.445 14328 14328 F DEBUG   :     x0  0000000000000000  x1  00000000000037a0  x2  0000000000000006  x3  0000006f2b5fa210
03-04 13:00:09.445 14328 14328 F DEBUG   :     x4  0000000000000010  x5  0000000000000010  x6  0000000000000010  x7  7f7f7f7f7f7f7f7f
03-04 13:00:09.445 14328 14328 F DEBUG   :     x8  00000000000000f0  x9  427f5ba19071c8e8  x10 0000000000000000  x11 ffffff80fffffbdf
03-04 13:00:09.445 14328 14328 F DEBUG   :     x12 0000000000000001  x13 0000000000000018  x14 0000006f2b5f9c88  x15 00000000023a67c2
03-04 13:00:09.445 14328 14328 F DEBUG   :     x16 000000724634e050  x17 000000724632aeb0  x18 0000006f29744000  x19 0000000000003794
03-04 13:00:09.445 14328 14328 F DEBUG   :     x20 00000000000037a0  x21 00000000ffffffff  x22 0000006f23815216  x23 0000006f23a4c405
03-04 13:00:09.445 14328 14328 F DEBUG   :     x24 0000006f9ca00880  x25 0000006f2b5fa578  x26 0000006f2b5fa590  x27 0000006f2b5fa578
03-04 13:00:09.445 14328 14328 F DEBUG   :     x28 0000006f2b5fa470  x29 0000006f2b5fa290
03-04 13:00:09.445 14328 14328 F DEBUG   :     lr  00000072462ddba0  sp  0000006f2b5fa1f0  pc  00000072462ddbcc  pst 0000000000000000
03-04 13:00:09.445 14328 14328 F DEBUG   : backtrace:
03-04 13:00:09.445 14328 14328 F DEBUG   :       #00 pc 000000000004fbcc  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: ba489d4985c0cf173209da67405662f9)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #01 pc 0000000000865bd8  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chipAbort+12)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #02 pc 00000000017aca10  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chipDie+56)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #03 pc 00000000017ac99c  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::Platform::Internal::AssertChipStackLockedByCurrentThread(char const*, int)+100)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #04 pc 00000000017c0748  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::Transport::Session::RemoveHolder(chip::SessionHolder&)+40)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #05 pc 00000000017c00e0  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::SessionHolder::Release()+60)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #06 pc 00000000017c007c  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::SessionHolder::~SessionHolder()+40)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #07 pc 0000000000883468  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::app::ReadPrepareParams::~ReadPrepareParams()+36)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #08 pc 0000000001740cd4  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::app::ReadClient::~ReadClient()+104)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #09 pc 00000000008613b8  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (void chip::Platform::Delete<chip::app::ReadClient>(chip::app::ReadClient*)+44)
03-04 13:00:09.445 14328 14328 F DEBUG   :       #10 pc 000000000086135c  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::Controller::ReportCallback::~ReportCallback()+216)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #11 pc 000000000086148c  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (chip::Controller::ReportCallback::~ReportCallback()+32)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #12 pc 0000000000860080  /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk (Java_chip_devicecontroller_ReportCallbackJni_deleteCallback+132)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #13 pc 000000000043e154  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #14 pc 000000000020a910  /apex/com.android.art/lib64/libart.so (nterp_helper+5648) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #15 pc 00000000003a3216  [anon:dalvik-classes.dex extracted in memory from /data/app/~~5FVqcjHkb_REUPz_0zOK3w==/com.google.homesampleapp.default-clx1-InXsAAB4V2HDTRViw==/base.apk] (chip.devicecontroller.ReportCallbackJni.finalize+22)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #16 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #17 pc 000000000002a73a  /apex/com.android.art/javalib/core-libart.jar (java.lang.Daemons$FinalizerDaemon.doFinalize+22)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #18 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #19 pc 000000000002a83c  /apex/com.android.art/javalib/core-libart.jar (java.lang.Daemons$FinalizerDaemon.runInternal+180)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #20 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #21 pc 000000000002a4f2  /apex/com.android.art/javalib/core-libart.jar (java.lang.Daemons$Daemon.run+50)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #22 pc 000000000020b074  /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #23 pc 00000000000f6740  /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run+8)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #24 pc 000000000043476c  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+556) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #25 pc 0000000000466538  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+156) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #26 pc 0000000000466220  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+388) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #27 pc 0000000000613a44  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1668) (BuildId: 28c5aa8a2e8fc5df069f717d6e94f7fe)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #28 pc 00000000000b1910  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: ba489d4985c0cf173209da67405662f9)
03-04 13:00:09.446 14328 14328 F DEBUG   :       #29 pc 00000000000513f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ba489d4985c0cf173209da67405662f9)

@edWin-m
Copy link
Contributor Author

edWin-m commented Mar 6, 2023

@pierredelisle thanks

@pierredelisle
Copy link
Contributor

Waiting for project-chip/connectedhomeip#25505 to be merged, and hopefully this will fix the issue.

@edWin-m
Copy link
Contributor Author

edWin-m commented Mar 8, 2023

@pierredelisle Sure thing.

@pierredelisle pierredelisle added the bug Something isn't working label Mar 9, 2023
pierredelisle added a commit that referenced this issue Mar 10, 2023
- Pull in latest Matter SDK (SHA: 3c6bed3bb2) which includes required fixes for subscriptions (project-chip/connectedhomeip#25505, project-chip/connectedhomeip#25623, project-chip/connectedhomeip#25625)
- Strip the .so's prior to copying them to jniLibs. libCHIPController.so now has a reasonable size (went from 352MB to 26MB).
- Made SubscriptionHelper functions that interact with a device as "suspend" functions so that the coroutine scope is established by the caller.
- Removed flag UNSUBSCRIBE_ENABLED since shutdownSubscriptions has now been fixed in the Matter SDK.
pierredelisle added a commit that referenced this issue Mar 11, 2023
- Pull in latest Matter SDK (SHA: 3c6bed3bb2) which includes required fixes for subscriptions (project-chip/connectedhomeip#25505, project-chip/connectedhomeip#25623, project-chip/connectedhomeip#25625)
- Strip the .so's prior to copying them to jniLibs. libCHIPController.so now has a reasonable size (went from 352MB to 26MB).
- Made SubscriptionHelper functions that interact with a device as "suspend" functions so that the coroutine scope is established by the caller.
- Removed flag UNSUBSCRIBE_ENABLED since shutdownSubscriptions has now been fixed in the Matter SDK.
@pierredelisle
Copy link
Contributor

Should be fixed in #98.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants