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

Native crash while trying to do Call.execute #1952

Closed
purvivaidya opened this issue Oct 29, 2015 · 9 comments
Closed

Native crash while trying to do Call.execute #1952

purvivaidya opened this issue Oct 29, 2015 · 9 comments

Comments

@purvivaidya
Copy link

I am using OkHttp 2.5 in my android app and intermittenly while trying to do Call.execute, we see the following native crash. Any idea as to what could be going wrong here?

signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'FORTIFY_SOURCE: FD_SET: file descriptor >= FD_SETSIZE. Calling abort().'
r0 00000000 r1 00002887 r2 00000006 r3 00000000
r4 a2532dd8 r5 00000006 r6 0000000b r7 0000010c
r8 00000000 r9 a2532388 sl 00000002 fp a253243c
ip 00002887 sp a2532240 lr b6d86de9 pc b6daccc0 cpsr 600f0010
d0 ffffffffffffffff d1 ffffffffffffffff
d2 20726f7470697263 d3 45535f4446203d3e
d4 65d3cbdee9ba621a d5 4f8b9729bb1732d7
d6 0000000080000000 d7 0000018000000000
d8 0000000000000000 d9 0000000000000000
d10 0000000000000000 d11 0000000000000000
d12 0000000000000000 d13 0000000000000000
d14 0000000000000000 d15 0000000000000000
d16 0000000000000000 d17 2874726f62612067
d18 16000a0009001800 d19 0700060008001700
d20 0500040015001400 d21 0200010013001200
d22 110010000f000300 d23 1700100000002300
d24 d8da5d13e10f07b8 d25 f4e11d57ccd0097a
d26 2dcc36254e9ee0b9 d27 9de73735fda2e7c1
d28 5a8279995a827999 d29 5a8279995a827999
d30 0000000000000000 d31 0000000000000000
scr 60000011

backtrace:
#00 pc 0003ccc0 /system/lib/libc.so (tgkill+12)
#1 pc 00016de5 /system/lib/libc.so (pthread_kill+52)
#2 pc 00017a03 /system/lib/libc.so (raise+10)
#3 pc 00014281 /system/lib/libc.so (__libc_android_abort+36)
#4 pc 000126ec /system/lib/libc.so (abort+4)
#5 pc 000154d3 /system/lib/libc.so (__libc_fatal+16)
#6 pc 000154eb /system/lib/libc.so (__fortify_chk_fail+18)
#7 pc 00041249 /system/lib/libc.so (__FD_SET_chk+24)
#8 pc 0000a9b7 /system/lib/libjavacrypto.so
#9 pc 0000f53b /system/lib/libjavacrypto.so
#10 pc 0030901b /system/framework/arm/boot.oat

stack:
a2532200 b7a25250 [heap]
a2532204 b7e61858 [heap]
a2532208 00000001
a253220c 00430000
a2532210 00550000
a2532214 b7fe0310 [heap]
a2532218 ffffffdf
a253221c 00000000
a2532220 00001204
a2532224 00000000
a2532228 a2532dd8 [stack:10375]
a253222c 00000006
a2532230 0000000b
a2532234 00002887
a2532238 00000000
a253223c b6d86de1 /system/lib/libc.so (pthread_kill+48)
#00 a2532240 a2532dd0 [stack:10375]
........ ........
#1 a2532240 a2532dd0 [stack:10375]
a2532244 00000006
a2532248 00000000
a253224c a2532268 [stack:10375]
a2532250 00000406
a2532254 b6d87a07 /system/lib/libc.so (raise+14)
#2 a2532258 a2532264 [stack:10375]
a253225c b6d84285 /system/lib/libc.so (__libc_android_abort+40)
#3 a2532260 a25324b0 [stack:10375]
a2532264 ffffffdf
a2532268 00000000
a253226c b7e61858 [heap]
a2532270 b7e8b1c8 [heap]
a2532274 297a37f0 /dev/ashmem/dalvik-main space (deleted)
a2532278 b6dbf5ba /system/lib/libc.so
a253227c a25322e8 [stack:10375]
a2532280 a2532308 [stack:10375]
a2532284 b6d826f0 /system/lib/libc.so (__bionic_clone)
#4 a2532288 00000000
a253228c b6d854d7 /system/lib/libc.so
#5 a2532290 b6dbb829 /system/lib/libc.so
a2532294 a25322a4 [stack:10375]
a2532298 00000080
a253229c b6d854ef /system/lib/libc.so (__fortify_chk_fail+22)
a25322a0 b6dbb829 /system/lib/libc.so
a25322a4 b6dbf5ba /system/lib/libc.so
a25322a8 00000080
a25322ac 000003e8
#6 a25322b0 b80e1fa0 [heap]
a25322b4 b6db124d /system/lib/libc.so (__FD_SET_chk+28)
#7 a25322b8 000003e8
a25322b aca309bb /system/lib/libjavacrypto.so
#8 a25322c0 b5136a80 /system/lib/libart.so
a25322c4 b5135fd4 /system/lib/libart.so
a25322c8 b5135fe8 /system/lib/libart.so
a25322cc b5ed23c3 /system/lib/libssl.so
a25322d0 0000000a
a25322d4 00000000
a25322d8 b7e8b1c8 [heap]
a25322dc a25324b0 [stack:10375]
a25322e0 00430000
a25322e4 2dcc3625 /dev/ashmem/dalvik-main space (deleted)
a25322e8 b7e8b1c8 [heap]
a25322ec a25324b0 [stack:10375]
a25322f0 00000406
a25322f4 c0000000
a25322f8 b6c261d4 /system/lib/libcrypto.so
a25322fc b843eb68 [heap]
........ ........
#9 a2532430 00002710
a2532434 00000000
a2532438 00000001
a253243c 00000002
a2532440 00000000
a2532444 b7e8b1c8 [heap]
a2532448 a25324b0 [stack:10375]
a253244c 00000406
a2532450 ffffffff
a2532454 00000000
a2532458 00000000
a253245c 00000032
a2532460 240de980 /dev/ashmem/dalvik-main space (deleted)
a2532464 240de980 /dev/ashmem/dalvik-main space (deleted)
a2532468 7027d670 /data/dalvik-cache/arm/system@framework@boot.art
a253246c 24248150 /dev/ashmem/dalvik-main space (deleted)
........ ........
#10 a2532480 a25324b0 [stack:10375]
a2532484 a25324b4 [stack:10375]
a2532488 00002710
a253248c 00000001
a2532490 00000000
a2532494 00000000
a2532498 00001006
a253249c 72e4be8b /system/framework/arm/boot.oat
a25324a0 70b12258 /data/dalvik-cache/arm/system@framework@boot.art
a25324a4 00000000
a25324a8 00000005
a25324ac 70ae7380 /data/dalvik-cache/arm/system@framework@boot.art
a25324b0 23976710 /dev/ashmem/dalvik-main space (deleted)
a25324b4 240de980 /dev/ashmem/dalvik-main space (deleted)
a25324b8 00000000
a25324bc 00000000

@swankjesse
Copy link
Collaborator

FYI @kruton

@kruton
Copy link
Contributor

kruton commented Oct 30, 2015

Just curious: what type of device is this?

@kruton
Copy link
Contributor

kruton commented Oct 30, 2015

I have a feeling your application is leaking file descriptors somewhere and the number of open files is getting above 1024.

I just uploaded a change to Conscrypt to avoid this situation:
https://android-review.googlesource.com/179674

@purvivaidya
Copy link
Author

Thanks Kenny. I am not sure what does "leaking file descriptors" means. Can you please clarify? Ours is an Android app that uses OkHttp to make http requests. All our code is written in java. I am trying to understand where to look for whether we are "leaking file descriptors"

Also thanks for the quick change. How can I avail of this change in OkHttp library that we use?

@kruton
Copy link
Contributor

kruton commented Oct 30, 2015

Leaking file descriptors means your app might be leaving open files or sockets open somewhere. Android typically has a limit of 1024 open file descriptors per app.

The change isn't in okhttp, but the latest Conscrypt version can be used with the ProviderInstaller API in Google Play Services.

@kruton
Copy link
Contributor

kruton commented Oct 30, 2015

Also even if you get the fix for Conscrypt, your app will crash in a different way because something is opening up 1024 files or sockets and not closing them. I'd recommend looking at your app and figuring out what is opening them up and not closing them!

@swankjesse
Copy link
Collaborator

No action to take in OkHttp.

@kypeli
Copy link

kypeli commented Jun 18, 2016

Could your issue be related to this: #2636 ?

@swankjesse
Copy link
Collaborator

@kypeli only slightly. This is on OkHttp 2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants