Occasionally crash with _nano_malloc_check_clear

1.5k Views Asked by At

The crash is SIGABRT, which is not "selector not found". May be over release. But the crash only occurs on arm64 devices and stacks are not the same.

I also find _nano_malloc_check_clear source, http://opensource.apple.com/source/libmalloc/libmalloc-53.1.1/src/nano_malloc.c

Another suspending crash related with _nano_malloc_check_clear is, https://stackoverflow.com/questions/30802134/app-crashes-entering-foreground-with-uistatusbar

Such kind of crashes never happened in previous versions or 32bit devices. I use 10 threads simultaneously with infinite loop on iPhone6 plus to reproduce, but failed.

Log 1:

Exception Type:  SIGABRT
Exception Codes: #0 at 0x195217270
Crashed Thread:  0

Thread 0 Crashed:
0   libsystem_kernel.dylib              0x0000000195217270 __pthread_kill + 8
1   libsystem_c.dylib                   0x000000019518eb18 abort + 112
2   libsystem_malloc.dylib              0x00000001952523e4 _nano_malloc_check_clear + 0
3   libsystem_malloc.dylib              0x00000001952512f8 nano_free + 192
4   CoreFoundation                      0x0000000184225444 CFRelease + 1064
5   CoreFoundation                      0x00000001842cdcc8 __CFBinaryPlistCreateObjectFiltered + 2480
6   CoreFoundation                      0x00000001842ceb10 __CFBinaryPlistCreateObjectFiltered + 6136
7   CoreFoundation                      0x00000001842cf06c __CFTryParseBinaryPlist + 204
8   CoreFoundation                      0x0000000184222f04 _CFPropertyListCreateWithData + 124
9   CoreFoundation                      0x000000018424f2fc CFPropertyListCreateWithData + 104
10  Foundation                          0x000000018514f1d8 +[NSPropertyListSerialization propertyListWithData:options:format:error:] + 112
11  AlipayWallet                        0x00000001012e2160 decodeObjectFromData + 148

Log 2:

Thread 36 Crashed:
0   libsystem_kernel.dylib              0x0000000197a13270 __pthread_kill + 8
1   libsystem_c.dylib                   0x000000019798ab18 abort + 112
2   libsystem_malloc.dylib              0x0000000197a4e3e4 _nano_malloc_check_clear + 0
3   libsystem_malloc.dylib              0x0000000197a4d2f8 nano_free + 192
4   libsqlite3.dylib                    0x000000019765689c 0x1975a8000 + 714908
5   libsqlite3.dylib                    0x000000019761606c 0x1975a8000 + 450668
6   libsqlite3.dylib                    0x0000000197670fc8 0x1975a8000 + 823240
7   libsqlite3.dylib                    0x00000001975c9f90 0x1975a8000 + 139152
8   libsqlite3.dylib                    0x00000001975f0cf0 0x1975a8000 + 298224
9   libsqlite3.dylib                    0x00000001975e3368 sqlite3_step + 528
10  AlipayWallet                        0x00000001012fe038 -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] + 1756
11  AlipayWallet                        0x00000001012fe41c -[FMDatabase executeUpdate:withArgumentsInArray:] + 76

Log 3:

Thread 36 Crashed:
0   libsystem_kernel.dylib              0x0000000195f97270 __pthread_kill + 8
1   libsystem_c.dylib                   0x0000000195f0eb18 abort + 112
2   libsystem_malloc.dylib              0x0000000195fd23e4 _nano_malloc_check_clear + 0
3   libsystem_malloc.dylib              0x0000000195fd12f8 nano_free + 192
4   CoreFoundation                      0x0000000183fb4d40 __CFArrayReleaseValues + 492
5   CoreFoundation                      0x0000000183f11394 CFRelease + 328
6   CoreFoundation                      0x0000000183fb9948 __CFBinaryPlistWriteOrPresize + 504
7   Foundation                          0x0000000184eb2668 -[NSKeyedArchiver finishEncoding] + 604
8   Foundation                          0x0000000184eb8370 +[NSKeyedArchiver archivedDataWithRootObject:] + 212
0

There are 0 best solutions below