libc : invalid pthread_t 0xccf3b970 passed to libc

2E7F63 06-01 17:39:19.760  2737  2737 F libc    : invalid pthread_t 0xccf3b970 passed to libc
2E7F7C 06-01 17:39:19.764  2737  2737 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 2737 (baidu.appsearch), pid 2737 (baidu.appsearch)
2E806F 06-01 17:39:19.994  3364  3364 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2E8070 06-01 17:39:19.994  3364  3364 F DEBUG   : Native Crash TIME: 113131087
2E8071 06-01 17:39:19.994  3364  3364 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2E8072 06-01 17:39:19.994  3364  3364 F DEBUG   : Build fingerprint: 'Itel/F6308/itel-L6002P:9/PPR1.180610.011/OP-V009-20190529:user/release-keys'
2E8073 06-01 17:39:19.994  3364  3364 F DEBUG   : Revision: '0'
2E8074 06-01 17:39:19.994  3364  3364 F DEBUG   : ABI: 'arm'
2E8075 06-01 17:39:19.994  3364  3364 F DEBUG   : pid: 2737, tid: 2737, name: baidu.appsearch  >>> com.baidu.appsearch <<<
2E8076 06-01 17:39:19.994  3364  3364 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2E8077 06-01 17:39:19.995  3364  3364 F DEBUG   : Abort message: 'invalid pthread_t 0xccf3b970 passed to libc'
2E8078 06-01 17:39:19.995  3364  3364 F DEBUG   :     r0  00000000  r1  00000ab1  r2  00000006  r3  00000008
2E8079 06-01 17:39:19.995  3364  3364 F DEBUG   :     r4  00000ab1  r5  00000ab1  r6  ffd31f14  r7  0000010c
2E807A 06-01 17:39:19.995  3364  3364 F DEBUG   :     r8  00000000  r9  c5601928  r10 ffd320c8  r11 ffd32054
2E807B 06-01 17:39:19.995  3364  3364 F DEBUG   :     ip  00000041  sp  ffd31f00  lr  eff3206d  pc  eff29d96
2E807E 06-01 17:39:20.009  3364  3364 F DEBUG   : 
06-01 17:39:20.009  3364  3364 F DEBUG   : backtrace:
2E807F 06-01 17:39:20.009  3364  3364 F DEBUG   :     #00 pc 0001cd96  /system/lib/libc.so (abort+58)
2E8080 06-01 17:39:20.009  3364  3364 F DEBUG   :     #01 pc 00064771  /system/lib/libc.so (__pthread_internal_find(long)+104)
2E8081 06-01 17:39:20.009  3364  3364 F DEBUG   :     #02 pc 000647ad  /system/lib/libc.so (pthread_join+28)
2E8082 06-01 17:39:20.009  3364  3364 F DEBUG   :     #03 pc 00011d61  /data/data/com.baidu.appsearch/files/cybermedia/libs/6.3.2.9/libcyber-sdl.so
2E8083 06-01 17:39:20.009  3364  3364 F DEBUG   :     #04 pc 0002e58d  /data/data/com.baidu.appsearch/files/cybermedia/libs/6.3.2.9/libcyber-player.so
2E8084 06-01 17:39:20.009  3364  3364 F DEBUG   :     #05 pc 0002ffa3  /data/data/com.baidu.appsearch/files/cybermedia/libs/6.3.2.9/libcyber-player.so
2E8085 06-01 17:39:20.009  3364  3364 F DEBUG   :     #06 pc 000385c5  /data/data/com.baidu.appsearch/files/cybermedia/libs/6.3.2.9/libcyber-player.so
2E8086 06-01 17:39:20.009  3364  3364 F DEBUG   :     #07 pc 0003c4e1  /data/data/com.baidu.appsearch/files/cybermedia/libs/6.3.2.9/libcyber-player.so
2E8087 06-01 17:39:20.009  3364  3364 F DEBUG   :     #08 pc 0000073b  /data/data/com.baidu.appsearch/files/cybermedia/libs/6.3.2.9/oat/arm/cyber-media-dex.odex (offset 0x2000)
2E8A8A 06-01 17:39:35.875  3414  3746 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x69646e7d in tid 3746 (Thread-63), pid 3414 (baidu.appsearch)
2E8A8F 06-01 17:39:36.063  3922  3922 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

 

https://www.jianshu.com/p/348d6aa63feb

一、Android 8.0遇到的问题

1. 线程中断:

  • 描述:软件中一个长期挂载执行的命令轮询线程,中断了
  • 原因:Android 8.0判断软件处于未活跃状态,会释放软件持有的所有Wake Lock,恰巧线程中调用Lock.wait,同步锁,被系统唤醒后,线程结束
  • 处理:增加运行标签,重新启动线程机制,增加sleep机制

2. invalid pthread_t 0x2243df2546 passed to libc

  • 处理:经检测发现,由于c++代码中不严谨的写法导致了该问题,未启动线程(未传入线程指针)前,调用了pthread_join的方法,在以前的版本中,软件没有崩溃,所以没有检测到,修改后无问题

解决方法:

获取当前系统版本,大于等于26的话,不再调用 pthread_detach

https://blog.csdn.net/hyl999/article/details/80620305

This error occurs when a condition_variable is waiting for a notification, but the underlying condition is not valid. This can happen if the function is called with an invalid argument or if the condition was not initialized properly. To fix this error, you need to check the arguments being passed to the condition_variable and ensure that they are valid. You may also need to initialize the condition properly before using it. Here's an example of how to use a condition_variable: ``` #include <iostream> #include <condition_variable> #include <mutex> #include <thread> std::condition_variable cv; std::mutex mtx; bool ready = false; void thread_func() { std::unique_lock<std::mutex> lock(mtx); ready = true; cv.notify_one(); } int main() { std::thread t(thread_func); std::unique_lock<std::mutex> lock(mtx); while (!ready) { cv.wait(lock); } t.join(); return 0; } ``` In this example, we create a condition_variable named `cv`, a mutex named `mtx`, and a boolean flag called `ready`. We start a new thread that sets the `ready` flag to true and notifies the condition_variable. In the main thread, we wait for the notification by calling `cv.wait(lock)` in a loop. Note that we need to acquire the lock before calling `cv.wait()` or `cv.notify_one()`. This ensures that the condition is modified atomically and prevents race conditions. If you are still experiencing the error after checking your code, you may need to consult the documentation for the specific function that is throwing the exception to see if there are any known issues or limitations.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值