Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Crash in grpc using QT



  • Crash in grpc
    using QT 5.9 and GRPC 1.17 works well (A test app built in android studio without QT using GRPC1.24 also works).
    using QT 5.9 and GRPC 1.24 (both secure and unsecure) with NDK 16 or 19 causes crash in grpc/scr/core/lib/iomgr/combiner.cc

    --------- beginning of crash
    10-21 12:23:32.969 F/libc (19942): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 19974 (QtThread)
    10-21 12:23:32.972 W/ ( 3196): debuggerd: handling request: pid=19942 uid=10193 gid=10193 tid=19974
    10-21 12:23:33.081 F/DEBUG (19984): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    10-21 12:23:33.083 F/DEBUG (19984): Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXU1DQJ2:user/release-keys'
    10-21 12:23:33.083 F/DEBUG (19984): Revision: '8'
    10-21 12:23:33.084 F/DEBUG (19984): ABI: 'arm'
    10-21 12:23:33.086 F/DEBUG (19984): pid: 19942, tid: 19974, name: QtThread >>> org.qtproject.example.rpccommunication <<<
    10-21 12:23:33.086 F/DEBUG (19984): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
    10-21 12:23:33.087 F/DEBUG (19984): r0 00000000 r1 cae7eb48 r2 00000001 r3 e117b4ac
    10-21 12:23:33.087 F/DEBUG (19984): r4 cae7dc28 r5 00000000 r6 cae7dd5c r7 cae7dbf0
    10-21 12:23:33.087 F/DEBUG (19984): r8 00000000 r9 00000000 sl 00000018 fp 00000000
    10-21 12:23:33.087 F/DEBUG (19984): ip ccd34fe8 sp cae7dbd8 lr cccff6ad pc ccc92c56 cpsr 80030030
    10-21 12:23:33.099 F/DEBUG (19984):
    10-21 12:23:33.099 F/DEBUG (19984): backtrace:
    10-21 12:23:33.099 F/DEBUG (19984): #00 pc 00051c56 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libgrpc_unsecure.so (_Z31grpc_combiner_continue_exec_ctxv+21)
    10-21 12:23:33.099 F/DEBUG (19984): #01 pc 0005581d /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libgrpc_unsecure.so (_ZN9grpc_core7ExecCtx5FlushEv+60)
    10-21 12:23:33.100 F/DEBUG (19984): #02 pc 00041237 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libgrpc++_unsecure.so (_ZN9grpc_core7ExecCtxD2Ev+26)
    10-21 12:23:33.100 F/DEBUG (19984): #03 pc 00041793 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libgrpc++_unsecure.so (_ZN9grpc_impl16ChannelArgumentsD1Ev+54)
    10-21 12:23:33.100 F/DEBUG (19984): #04 pc 0003a001 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libgrpc++_unsecure.so (_ZN9grpc_impl17CreateChannelImplERKSsRKSt10shared_ptrINS_18ChannelCredentialsEE+48)
    10-21 12:23:33.100 F/DEBUG (19984): #05 pc 0001c193 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/librpccommunication.so
    10-21 12:23:33.100 F/DEBUG (19984): #06 pc 0001b377 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/librpccommunication.so (_ZN5Tests34TcGrpcClientDecodingStandaloneTest24testInitializeGrpcClientEv+566)
    10-21 12:23:33.100 F/DEBUG (19984): #07 pc 0001b0c3 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/librpccommunication.so
    10-21 12:23:33.100 F/DEBUG (19984): #08 pc 001978e5 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libQt5Core.so (ZNK11QMetaMethod6invokeEP7QObjectN2Qt14ConnectionTypeE22QGenericReturnArgument16QGenericArgumentS5_S5_S5_S5_S5_S5_S5_S5_S5+432)
    10-21 12:23:33.100 F/DEBUG (19984): #09 pc 0000b5ff /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libQt5Test.so
    10-21 12:23:33.101 F/DEBUG (19984): #10 pc 0000be35 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libQt5Test.so
    10-21 12:23:33.101 F/DEBUG (19984): #11 pc 0000c6a7 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libQt5Test.so
    10-21 12:23:33.101 F/DEBUG (19984): #12 pc 0000ce77 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/libQt5Test.so (_ZN5QTest5qExecEP7QObjectiPPc+690)
    10-21 12:23:33.101 F/DEBUG (19984): #13 pc 0001ed11 /data/app/org.qtproject.example.rpccommunication-1/lib/arm/librpccommunication.so (main+212)
    10-21 12:23:33.101 F/DEBUG (19984): #14 pc 00018fbd /data/data/org.qtproject.example.rpccommunication/qt-reserved-files/plugins/platforms/android/libqtforandroid.so

    Any ide?



  • The problem was solved by changing the tread to pthread


Log in to reply