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

segfault in /system/lib/libssl.so (SSL_CTX_set_alpn_protos+20) #647

Closed
andaag opened this issue Mar 13, 2014 · 8 comments
Closed

segfault in /system/lib/libssl.so (SSL_CTX_set_alpn_protos+20) #647

andaag opened this issue Mar 13, 2014 · 8 comments
Labels
bug Bug in existing code
Milestone

Comments

@andaag
Copy link

andaag commented Mar 13, 2014

We just upgraded to 1.5.1 (from 1.3.x) and got this segfault. Note that it doesn't seem to happen every time.

I/dalvikvm(27850): Could not find method com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getContentLengthLong, referenced from method com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getContentLengthLong
W/dalvikvm(27850): VFY: unable to resolve virtual method 49698: Lcom/squareup/okhttp/internal/http/HttpURLConnectionImpl;.getContentLengthLong ()J
D/dalvikvm(27850): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(27850): Could not find method com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getHeaderFieldLong, referenced from method com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getHeaderFieldLong
W/dalvikvm(27850): VFY: unable to resolve virtual method 49703: Lcom/squareup/okhttp/internal/http/HttpURLConnectionImpl;.getHeaderFieldLong (Ljava/lang/String;J)J
D/dalvikvm(27850): VFY: replacing opcode 0x6e at 0x0002
F/libc    (27850): invalid address or address of corrupt block 0x66f754c8 passed to dlfree
F/libc    (27850): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 27864 (Thread-2377)
I/DEBUG   (  121): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  121): Build fingerprint: 'google/nakasi/grouper:4.4.2/KOT49H/937116:user/release-keys'
I/DEBUG   (  121): Revision: '0'
I/DEBUG   (  121): pid: 27850, tid: 27864, name: Thread-2377  >>> no.finn.android.dev <<<
I/DEBUG   (  121): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG   (  121): Abort message: 'invalid address or address of corrupt block 0x66f754c8 passed to dlfree'
I/Icing   (11232): Indexing CE2D14F63478D1679F2297E790F6F269F7160014 from com.google.android.googlequicksearchbox
I/Icing   (11232): Indexing done CE2D14F63478D1679F2297E790F6F269F7160014
I/DEBUG   (  121):     r0 00000000  r1 401a0036  r2 deadbaad  r3 401a3b78
I/DEBUG   (  121):     r4 66f754c8  r5 401ae180  r6 40002000  r7 66f754d0
I/DEBUG   (  121):     r8 6b632b0c  r9 40075c70  sl 40051020  fp 6b632b24
I/DEBUG   (  121):     ip 00000001  sp 6b632aa8  lr 40171783  pc 40171784  cpsr 600d0030
I/DEBUG   (  121):     d0  2064657372666c64  d1  2073736572646461
I/DEBUG   (  121):     d2  657264646120726f  d3  6f6320666f207373
I/DEBUG   (  121):     d4  0921090d0e0f022c  d5  0a0a0b090b090a04
I/DEBUG   (  121):     d6  21185420f90a3132  d7  0a0b090b090a0431
I/DEBUG   (  121):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (  121):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (  121):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (  121):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (  121):     d16 0000000000000000  d17 0000000000000000
I/DEBUG   (  121):     d18 0000000000000000  d19 0000000000000000
I/DEBUG   (  121):     d20 0000000000000000  d21 0009000000090000
I/DEBUG   (  121):     d22 0000000000000000  d23 0000000000000000
I/DEBUG   (  121):     d24 0000000000000000  d25 0000002300000022
I/DEBUG   (  121):     d26 0707070703030303  d27 991f1f1f991f1f1f
I/DEBUG   (  121):     d28 991f1f1f991f1f1f  d29 0000002200000021
I/DEBUG   (  121):     d30 0082c021007e4020  d31 008bc02300874022
I/DEBUG   (  121):     scr 60000010
I/DEBUG   (  121): 
I/DEBUG   (  121): backtrace:
I/DEBUG   (  121):     #00  pc 00011784  /system/lib/libc.so (dlfree+1191)
I/DEBUG   (  121):     #01  pc 0000dcc3  /system/lib/libc.so (free+10)
I/DEBUG   (  121):     #02  pc 00083943  /system/lib/libcrypto.so (CRYPTO_free+34)
I/DEBUG   (  121):     #03  pc 00026fb5  /system/lib/libssl.so (SSL_CTX_set_alpn_protos+16)
I/DEBUG   (  121):     #04  pc 00008b7f  /system/lib/libjavacrypto.so
I/DEBUG   (  121):     #05  pc 0001dbcc  /system/lib/libdvm.so (dvmPlatformInvoke+112)
I/DEBUG   (  121):     #06  pc 0004e123  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
I/DEBUG   (  121):     #07  pc 00026fe0  /system/lib/libdvm.so
I/DEBUG   (  121):     #08  pc 0002dfa0  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
I/DEBUG   (  121):     #09  pc 0002b638  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
I/DEBUG   (  121):     #10  pc 00060581  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
I/DEBUG   (  121):     #11  pc 000605a5  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
I/DEBUG   (  121):     #12  pc 0005528b  /system/lib/libdvm.so
I/DEBUG   (  121):     #13  pc 0000d228  /system/lib/libc.so (__thread_entry+72)
I/DEBUG   (  121):     #14  pc 0000d3c0  /system/lib/libc.so (pthread_create+240)
I/DEBUG   (  121): 
I/DEBUG   (  121): stack:
I/DEBUG   (  121):          6b632a68  00000002  
I/DEBUG   (  121):          6b632a6c  66f16fd5  /system/lib/libjavacrypto.so
I/DEBUG   (  121):          6b632a70  40a75f6c  /system/lib/libcrypto.so
I/DEBUG   (  121):          6b632a74  1ad2a28a  
I/DEBUG   (  121):          6b632a78  66f754c8  
I/DEBUG   (  121):          6b632a7c  401ae180  
I/DEBUG   (  121):          6b632a80  40002000  
I/DEBUG   (  121):          6b632a84  40172af9  /system/lib/libc.so
I/DEBUG   (  121):          6b632a88  401a0036  /system/lib/libc.so
I/DEBUG   (  121):          6b632a8c  6b632a9c  
I/DEBUG   (  121):          6b632a90  401a3b78  /system/lib/libc.so
I/DEBUG   (  121):          6b632a94  40171783  /system/lib/libc.so (dlfree+1190)
I/DEBUG   (  121):          6b632a98  401a0036  /system/lib/libc.so
I/DEBUG   (  121):          6b632a9c  66f754c8  
I/DEBUG   (  121):          6b632aa0  401a3b78  /system/lib/libc.so
I/DEBUG   (  121):          6b632aa4  00000000  
I/DEBUG   (  121):     #00  6b632aa8  401aa000  /system/lib/libc.so
I/DEBUG   (  121):          6b632aac  66f754d0  
I/DEBUG   (  121):          6b632ab0  0000711c  
I/DEBUG   (  121):          6b632ab4  40a9ae64  /system/lib/libcrypto.so
I/DEBUG   (  121):          6b632ab8  40075c7c  
I/DEBUG   (  121):          6b632abc  4016dcc5  /system/lib/libc.so (free+12)
I/DEBUG   (  121):     #01  6b632ac0  1e300005  
I/DEBUG   (  121):          6b632ac4  40a3a945  /system/lib/libcrypto.so (CRYPTO_free+36)
I/DEBUG   (  121):     #02  6b632ac8  00000024  
I/DEBUG   (  121):          6b632acc  4005dcd8  
I/DEBUG   (  121):          6b632ad0  41ef8e00  /dev/ashmem/dalvik-heap (deleted)
I/DEBUG   (  121):          6b632ad4  40ac9fb9  /system/lib/libssl.so (SSL_CTX_set_alpn_protos+20)
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r1:
I/DEBUG   (  121):     401a0014 69747075 64206e6f 63657465 20646574  
I/DEBUG   (  121):     401a0024 25207962 696c0073 6d5f6362 6f6c6c61  
I/DEBUG   (  121):     401a0034 6e690063 696c6176 64612064 73657264  
I/DEBUG   (  121):     401a0044 726f2073 64646120 73736572 20666f20  
I/DEBUG   (  121):     401a0054 72726f63 20747075 636f6c62 7025206b  
I/DEBUG   (  121):     401a0064 73617020 20646573 25206f74 616d0073  
I/DEBUG   (  121):     401a0074 79732078 6d657473 74796220 3d207365  
I/DEBUG   (  121):     401a0084 30312520 000a756c 74737973 62206d65  
I/DEBUG   (  121):     401a0094 73657479 20202020 25203d20 756c3031  
I/DEBUG   (  121):     401a00a4 6e69000a 65737520 74796220 20207365  
I/DEBUG   (  121):     401a00b4 3d202020 30312520 000a756c 63617473  
I/DEBUG   (  121):     401a00c4 6f63206b 70757272 6e6f6974 74656420  
I/DEBUG   (  121):     401a00d4 65746365 73250064 3a64253a 73736120  
I/DEBUG   (  121):     401a00e4 69747265 22206e6f 20227325 6c696166  
I/DEBUG   (  121):     401a00f4 25006465 64253a73 7325203a 7361203a  
I/DEBUG   (  121):     401a0104 74726573 206e6f69 22732522 69616620  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r3:
I/DEBUG   (  121):     401a3b58 20646572 7262696c 0a797261 746e6900  
I/DEBUG   (  121):     401a3b68 616e7265 75625f6c 665f6b6c 00656572  
I/DEBUG   (  121):     401a3b78 72666c64 74006565 6c6c616d 735f636f  
I/DEBUG   (  121):     401a3b88 6c6c616d 616d7400 636f6c6c 72616c5f  
I/DEBUG   (  121):     401a3b98 64006567 6c616d6c 00636f6c 5f797274  
I/DEBUG   (  121):     401a3ba8 6c616572 5f636f6c 6e756863 6964006b  
I/DEBUG   (  121):     401a3bb8 736f7073 68635f65 006b6e75 5f646461  
I/DEBUG   (  121):     401a3bc8 6d676573 00746e65 70657270 5f646e65  
I/DEBUG   (  121):     401a3bd8 6f6c6c61 65720063 7361656c 6e755f65  
I/DEBUG   (  121):     401a3be8 64657375 6765735f 746e656d 6e6d0073  
I/DEBUG   (  121):     401a3bf8 746e6574 6567202a 746e6d74 28746e65  
I/DEBUG   (  121):     401a3c08 454c4946 6900292a 7420746e 616e7974  
I/DEBUG   (  121):     401a3c18 725f656d 746e6928 6863202c 2c2a7261  
I/DEBUG   (  121):     401a3c28 7a697320 29745f65 696f7600 6e652064  
I/DEBUG   (  121):     401a3c38 65777064 2928746e 61686300 67202a72  
I/DEBUG   (  121):     401a3c48 73757465 68737265 286c6c65 6f760029  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r4:
I/DEBUG   (  121):     66f754a8 00000000 00000000 41ecbd80 00000000  
I/DEBUG   (  121):     66f754b8 00000000 66f75480 00000000 00000000  
I/DEBUG   (  121):     66f754c8 00000074 00000029 401ae1d0 401ae1d0  
I/DEBUG   (  121):     66f754d8 412d4153 32315345 48532d38 2f790041  
I/DEBUG   (  121):     66f754e8 08312e33 70747468 00000028 00000012  
I/DEBUG   (  121):     66f754f8 00000000 40068510 00000000 0000001b  
I/DEBUG   (  121):     66f75508 407c2ec0 00000005 00000008 00000000  
I/DEBUG   (  121):     66f75518 40061008 0000004b 48903ae0 e2df4781  
I/DEBUG   (  121):     66f75528 765eea2d fb1133cf bfab434f 8cd79eb6  
I/DEBUG   (  121):     66f75538 a8fa5c13 635278a1 6037168a 37ec0639  
I/DEBUG   (  121):     66f75548 76a7c8bf 82aaf616 f8b35f00 693f6d8c  
I/DEBUG   (  121):     66f75558 37a1e084 82cb8efb 00000000 0000004b  
I/DEBUG   (  121):     66f75568 d5e3e1eb 3064e39c b49a70da e8871561  
I/DEBUG   (  121):     66f75578 93ed6535 0665ffdb b02476ad e8b42c0a  
I/DEBUG   (  121):     66f75588 2ad3abd6 a58aa3d8 f5c5745c 798106d1  
I/DEBUG   (  121):     66f75598 d089de84 60d32c02 9b80b1b0 7c60c220  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r5:
I/DEBUG   (  121):     401ae160 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     401ae170 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     401ae180 0000012c 000000e4 00000158 000048c8  
I/DEBUG   (  121):     401ae190 40002000 4000dea8 66fb1710 00200000  
I/DEBUG   (  121):     401ae1a0 00000df3 6d382f88 00000000 00000000  
I/DEBUG   (  121):     401ae1b0 401ae1a8 401ae1a8 401ae1b0 401ae1b0  
I/DEBUG   (  121):     401ae1c0 66f659d8 66f66108 4001e9f0 66f64590  
I/DEBUG   (  121):     401ae1d0 4001e558 4001e558 66f754c8 66f754c8  
I/DEBUG   (  121):     401ae1e0 40068338 40068338 66f754c8 66f754c8  
I/DEBUG   (  121):     401ae1f0 4001e998 4001e998 66f659a0 66f659a0  
I/DEBUG   (  121):     401ae200 66f65998 66f65998 4001e9f0 4001e9f0  
I/DEBUG   (  121):     401ae210 66f65988 66f65988 4001e970 4001e970  
I/DEBUG   (  121):     401ae220 400683c8 400683c8 66f65970 66f65970  
I/DEBUG   (  121):     401ae230 66f645a8 66f645a8 400684f0 400684f0  
I/DEBUG   (  121):     401ae240 4001ecb0 4001ecb0 400683a0 400683a0  
I/DEBUG   (  121):     401ae250 40061e30 40061e30 66f65940 66f65940  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r6:
I/DEBUG   (  121):     40001fe0 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     40001ff0 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     40002000 00000000 000006f3 408fdb70 407c2ba8  
I/DEBUG   (  121):     40002010 0000002e 00000000 00000000 00000000  
I/DEBUG   (  121):     40002020 00000000 00000000 02010000 407c2ba8  
I/DEBUG   (  121):     40002030 0000002c 00000000 00000000 00000000  
I/DEBUG   (  121):     40002040 00000000 00000000 02010000 407c2ba8  
I/DEBUG   (  121):     40002050 0000003b 00000000 00000000 00000000  
I/DEBUG   (  121):     40002060 00000000 00000000 02010000 407c2ba8  
I/DEBUG   (  121):     40002070 00000025 00000000 00000000 00000000  
I/DEBUG   (  121):     40002080 00000000 00000000 02010000 407c2ba8  
I/DEBUG   (  121):     40002090 00000030 00000000 00000000 00000000  
I/DEBUG   (  121):     400020a0 00000000 00000000 02010000 407c2ba8  
I/DEBUG   (  121):     400020b0 00000023 00000000 00000000 00000000  
I/DEBUG   (  121):     400020c0 00000000 00000000 02010000 407c2ba8  
I/DEBUG   (  121):     400020d0 0000002d 00000000 00000000 00000000  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r7:
I/DEBUG   (  121):     66f754b0 41ecbd80 00000000 00000000 66f75480  
I/DEBUG   (  121):     66f754c0 00000000 00000000 00000074 00000029  
I/DEBUG   (  121):     66f754d0 401ae1d0 401ae1d0 412d4153 32315345  
I/DEBUG   (  121):     66f754e0 48532d38 2f790041 08312e33 70747468  
I/DEBUG   (  121):     66f754f0 00000028 00000012 00000000 40068510  
I/DEBUG   (  121):     66f75500 00000000 0000001b 407c2ec0 00000005  
I/DEBUG   (  121):     66f75510 00000008 00000000 40061008 0000004b  
I/DEBUG   (  121):     66f75520 48903ae0 e2df4781 765eea2d fb1133cf  
I/DEBUG   (  121):     66f75530 bfab434f 8cd79eb6 a8fa5c13 635278a1  
I/DEBUG   (  121):     66f75540 6037168a 37ec0639 76a7c8bf 82aaf616  
I/DEBUG   (  121):     66f75550 f8b35f00 693f6d8c 37a1e084 82cb8efb  
I/DEBUG   (  121):     66f75560 00000000 0000004b d5e3e1eb 3064e39c  
I/DEBUG   (  121):     66f75570 b49a70da e8871561 93ed6535 0665ffdb  
I/DEBUG   (  121):     66f75580 b02476ad e8b42c0a 2ad3abd6 a58aa3d8  
I/DEBUG   (  121):     66f75590 f5c5745c 798106d1 d089de84 60d32c02  
I/DEBUG   (  121):     66f755a0 9b80b1b0 7c60c220 2e6d6367 0000004b  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r8:
I/DEBUG   (  121):     6b632aec 59df1300 1e300005 41ef8e00 41ef8df0  
I/DEBUG   (  121):     6b632afc 62b48088 40051010 41521bd0 1e300005  
I/DEBUG   (  121):     6b632b0c 4154d111 40075c70 00000001 4162f22f  
I/DEBUG   (  121):     6b632b1c 4185aa98 41e74900 41552127 40075c70  
I/DEBUG   (  121):     6b632b2c 4162f22c 66f18b51 40051020 00000000  
I/DEBUG   (  121):     6b632b3c 00000000 1ec00001 00000000 00000000  
I/DEBUG   (  121):     6b632b4c 401ae384 00000000 00000000 00000000  
I/DEBUG   (  121):     6b632b5c 00000000 00000000 00000080 00000080  
I/DEBUG   (  121):     6b632b6c 41e24008 00000000 00000080 415b31f0  
I/DEBUG   (  121):     6b632b7c 40075c04 4005137c 41ef9180 fffffea0  
I/DEBUG   (  121):     6b632b8c 40051010 41ef9180 00000080 00000000  
I/DEBUG   (  121):     6b632b9c 415598f9 41ef9180 00000000 41ef9180  
I/DEBUG   (  121):     6b632bac 415b31f0 00000080 4152de40 00000000  
I/DEBUG   (  121):     6b632bbc 0000001c 0000001c 415aec74 416b39f8  
I/DEBUG   (  121):     6b632bcc 0000001c 00000080 4156d0af 41e74900  
I/DEBUG   (  121):     6b632bdc 41ef9160 ffffffff 41ef9160 416b12d0  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near r9:
I/DEBUG   (  121):     40075c50 41ef90d0 40075c90 4161cea8 40075c90  
I/DEBUG   (  121):     40075c60 4161cedc 62b48088 00000000 00000000  
I/DEBUG   (  121):     40075c70 4005dcd8 00000000 1e300005 40075d48  
I/DEBUG   (  121):     40075c80 6ae1d9c8 629c14a8 4161cedc 00000000  
I/DEBUG   (  121):     40075c90 4005dcd8 00000000 41ef8df0 41737af0  
I/DEBUG   (  121):     40075ca0 00000000 41eac228 41ef6450 00000001  
I/DEBUG   (  121):     40075cb0 4174d4c8 41e31d28 416b22a8 00000023  
I/DEBUG   (  121):     40075cc0 00000000 40075d18 6af5dfe0 6287c5e8  
I/DEBUG   (  121):     40075cd0 6391e6ee 00000000 00000000 41ef6450  
I/DEBUG   (  121):     40075ce0 41ef8da0 4174d4c8 00000001 416b22a8  
I/DEBUG   (  121):     40075cf0 00000023 00000000 41eac228 41ef6450  
I/DEBUG   (  121):     40075d00 41ef8da0 40075d48 6ae1d9c2 00000000  
I/DEBUG   (  121):     40075d10 00000400 00000000 6ae1d9b2 4005dcd8  
I/DEBUG   (  121):     40075d20 00000000 41ef8df0 41e6d4c0 41ef6450  
I/DEBUG   (  121):     40075d30 41ef6450 40075d90 6ae1dc06 62c20640  
I/DEBUG   (  121):     40075d40 6ae1d9c8 00000000 62b70cc0 41e6d4c0  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near sl:
I/DEBUG   (  121):     40051000 66f514d5 00000029 00000000 0000045b  
I/DEBUG   (  121):     40051010 6ad67bd8 40075c70 629c14a8 41654000  
I/DEBUG   (  121):     40051020 41ef9160 00000000 6b632c40 00000000  
I/DEBUG   (  121):     40051030 6b632c94 0000000c 00000000 41521d40  
I/DEBUG   (  121):     40051040 00000000 00000000 61d41a70 40072300  
I/DEBUG   (  121):     40051050 00000000 00000000 00000001 00004000  
I/DEBUG   (  121):     40051060 00000000 40051468 41521d40 41526c00  
I/DEBUG   (  121):     40051070 00000000 4152acfc 4152ad70 4152ac20  
I/DEBUG   (  121):     40051080 4152ac40 4152ac9c 00000000 00000000  
I/DEBUG   (  121):     40051090 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     400510a0 00000000 00000000 00002000 415b391c  
I/DEBUG   (  121):     400510b0 00000000 00000000 00000002 400516b0  
I/DEBUG   (  121):     400510c0 00000001 00000040 00000200 00000000  
I/DEBUG   (  121):     400510d0 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     400510e0 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     400510f0 00000000 00000000 00000000 00000000  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near fp:
I/DEBUG   (  121):     6b632b04 41521bd0 1e300005 4154d111 40075c70  
I/DEBUG   (  121):     6b632b14 00000001 4162f22f 4185aa98 41e74900  
I/DEBUG   (  121):     6b632b24 41552127 40075c70 4162f22c 66f18b51  
I/DEBUG   (  121):     6b632b34 40051020 00000000 00000000 1ec00001  
I/DEBUG   (  121):     6b632b44 00000000 00000000 401ae384 00000000  
I/DEBUG   (  121):     6b632b54 00000000 00000000 00000000 00000000  
I/DEBUG   (  121):     6b632b64 00000080 00000080 41e24008 00000000  
I/DEBUG   (  121):     6b632b74 00000080 415b31f0 40075c04 4005137c  
I/DEBUG   (  121):     6b632b84 41ef9180 fffffea0 40051010 41ef9180  
I/DEBUG   (  121):     6b632b94 00000080 00000000 415598f9 41ef9180  
I/DEBUG   (  121):     6b632ba4 00000000 41ef9180 415b31f0 00000080  
I/DEBUG   (  121):     6b632bb4 4152de40 00000000 0000001c 0000001c  
I/DEBUG   (  121):     6b632bc4 415aec74 416b39f8 0000001c 00000080  
I/DEBUG   (  121):     6b632bd4 4156d0af 41e74900 41ef9160 ffffffff  
I/DEBUG   (  121):     6b632be4 41ef9160 416b12d0 4157719d 4005137c  
I/DEBUG   (  121):     6b632bf4 415559a3 40051010 4155994b 41ef9180  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory near sp:
I/DEBUG   (  121):     6b632a88 401a0036 6b632a9c 401a3b78 40171783  
I/DEBUG   (  121):     6b632a98 401a0036 66f754c8 401a3b78 00000000  
I/DEBUG   (  121):     6b632aa8 401aa000 66f754d0 0000711c 40a9ae64  
I/DEBUG   (  121):     6b632ab8 40075c7c 4016dcc5 1e300005 40a3a945  
I/DEBUG   (  121):     6b632ac8 00000024 4005dcd8 41ef8e00 40ac9fb9  
I/DEBUG   (  121):     6b632ad8 4005dcd8 41ef8e00 00000004 66f18b83  
I/DEBUG   (  121):     6b632ae8 00000003 59df1300 1e300005 41ef8e00  
I/DEBUG   (  121):     6b632af8 41ef8df0 62b48088 40051010 41521bd0  
I/DEBUG   (  121):     6b632b08 1e300005 4154d111 40075c70 00000001  
I/DEBUG   (  121):     6b632b18 4162f22f 4185aa98 41e74900 41552127  
I/DEBUG   (  121):     6b632b28 40075c70 4162f22c 66f18b51 40051020  
I/DEBUG   (  121):     6b632b38 00000000 00000000 1ec00001 00000000  
I/DEBUG   (  121):     6b632b48 00000000 401ae384 00000000 00000000  
I/DEBUG   (  121):     6b632b58 00000000 00000000 00000000 00000080  
I/DEBUG   (  121):     6b632b68 00000080 41e24008 00000000 00000080  
I/DEBUG   (  121):     6b632b78 415b31f0 40075c04 4005137c 41ef9180  
I/DEBUG   (  121): 
I/DEBUG   (  121): code around pc:
I/DEBUG   (  121):     40171764 6a014478 62021e4a f7fdb95a e008fd39  
I/DEBUG   (  121):     40171774 4621482a 44784a2a f001447a 4a13f9b3  
I/DEBUG   (  121):     40171784 49286014 f8d14479 079a31bc f501d51c  
I/DEBUG   (  121):     40171794 e8bd70e0 f02c40f8 4823b879 f7fd4478  
I/DEBUG   (  121):     401717a4 4822fd0d e7fa4478 42b7688f ae10f43f  
I/DEBUG   (  121):     401717b4 481fe611 e7f24478 4478481e 6888e7ef  
I/DEBUG   (  121):     401717c4 f43f4298 e606aed4 bf00bdf8 deadbaad  
I/DEBUG   (  121):     401717d4 0003ce8e 0003ce80 0003cde8 00032796  
I/DEBUG   (  121):     401717e4 0003cd5c 0003cd4a 0003ccd2 0003ccb0  
I/DEBUG   (  121):     401717f4 0003cc54 0003cc3e 0003cbd8 0003cbc0  
I/DEBUG   (  121):     40171804 0003cbae 0003cb56 0003cb30 0003caa6  
I/DEBUG   (  121):     40171814 0003ca50 0003ca36 0003ca18 0002e8b8  
I/DEBUG   (  121):     40171824 000323f8 0003c9f4 000323d4 000323cc  
I/DEBUG   (  121):     40171834 000323bc 000323b6 460db538 b1704601  
I/DEBUG   (  121):     40171844 0200ea45 f405fb00 04030c10 4620b143  
I/DEBUG   (  121):     40171854 ef08f028 bf1842a8 34fff04f 4604e000  
I/DEBUG   (  121): 
I/DEBUG   (  121): code around lr:
I/DEBUG   (  121):     40171760 482e61a3 6a014478 62021e4a f7fdb95a  
I/DEBUG   (  121):     40171770 e008fd39 4621482a 44784a2a f001447a  
I/DEBUG   (  121):     40171780 4a13f9b3 49286014 f8d14479 079a31bc  
I/DEBUG   (  121):     40171790 f501d51c e8bd70e0 f02c40f8 4823b879  
I/DEBUG   (  121):     401717a0 f7fd4478 4822fd0d e7fa4478 42b7688f  
I/DEBUG   (  121):     401717b0 ae10f43f 481fe611 e7f24478 4478481e  
I/DEBUG   (  121):     401717c0 6888e7ef f43f4298 e606aed4 bf00bdf8  
I/DEBUG   (  121):     401717d0 deadbaad 0003ce8e 0003ce80 0003cde8  
I/DEBUG   (  121):     401717e0 00032796 0003cd5c 0003cd4a 0003ccd2  
I/DEBUG   (  121):     401717f0 0003ccb0 0003cc54 0003cc3e 0003cbd8  
I/DEBUG   (  121):     40171800 0003cbc0 0003cbae 0003cb56 0003cb30  
I/DEBUG   (  121):     40171810 0003caa6 0003ca50 0003ca36 0003ca18  
I/DEBUG   (  121):     40171820 0002e8b8 000323f8 0003c9f4 000323d4  
I/DEBUG   (  121):     40171830 000323cc 000323bc 000323b6 460db538  
I/DEBUG   (  121):     40171840 b1704601 0200ea45 f405fb00 04030c10  
I/DEBUG   (  121):     40171850 4620b143 ef08f028 bf1842a8 34fff04f  
I/DEBUG   (  121): 
I/DEBUG   (  121): memory map around fault addr deadbaad:
I/DEBUG   (  121):     beb56000-beb77000 rw- [stack]
I/DEBUG   (  121):     (no map for address)
I/DEBUG   (  121):     ffff0000-ffff1000 r-x [vectors]
I/BootReceiver(  508): Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
W/ActivityManager(  508):   Force finishing activity no.finn.android.dev/no.finn.android.ui.activity.HomeActivity
D/Zygote  (  123): Process 27850 terminated by signal (11)
@swankjesse
Copy link
Collaborator

@andaag which version of Android? I think this is a dalvik bug and I'd like to report it upstream.

(That said, we can probably do something to work-around in OkHttp.)

@nfuller
Copy link
Collaborator

nfuller commented Mar 13, 2014

getContentLengthLong() and getHeaderFieldLong() won't exist in Android until the next release. They were not in KitKat.

https://android-review.googlesource.com/#/c/82755/

If you can tell: Did the problem occur at class load time or in response to a call to one of the actual methods? I had figured it would be ok providing OkHttp avoided the calls and nobody attempted to use reflection on OkHttp's HttpURLConnectionImpl. I'm clearly wrong about something. Perhaps another thing for Platform?

@andaag
Copy link
Author

andaag commented Mar 14, 2014

@swankjesse It's on a nexus7, 4.2.2.

@nfuller It happened on startup, but I strongly suspect it was on a method call. I THINK I saw a progress bar before the crash. I'm not sure though, wish I could be more helpfull there. If I'm able to reproduce it and get any more information I'll let you know.

@nfuller
Copy link
Collaborator

nfuller commented Mar 14, 2014

I couldn't see any calls to those methods within the snapshot of OkHttp I have so that's why I think it is either a call your app is making, or some kind of linkage problem I hadn't anticipated.

A Java 1.6 development environment won't have those methods either. Are you using Java 1.7 for development, or down-casting and HttpURLConnection to an okhttp.internal.http.HttpURLConnectionImpl or something like that?

As a short term fix, if you do make calls to getHeaderFieldLong() / getContentLengthLong() from your app you can change it to use getContentLength() / getHeaderFieldInt(), or getHeaderField() + Long.parseLong() instead.

Longer term, if there is a chance of those calls being made then OkHttp could implement these methods via Platform, which would be able to do the right thing based on reflection. That said, I hadn't anticipated the need so I'd definitely be interested in more details when you have them.

@swankjesse
Copy link
Collaborator

I think the warning is a red herring. The crash contains this:

I/DEBUG   (  121):     #00  pc 00011784  /system/lib/libc.so (dlfree+1191)
I/DEBUG   (  121):     #01  pc 0000dcc3  /system/lib/libc.so (free+10)
I/DEBUG   (  121):     #02  pc 00083943  /system/lib/libcrypto.so (CRYPTO_free+34)
I/DEBUG   (  121):     #03  pc 00026fb5  /system/lib/libssl.so (SSL_CTX_set_alpn_protos+16)
I/DEBUG   (  121):     #04  pc 00008b7f  /system/lib/libjavacrypto.so

So it's something to do with ALPN...

@swankjesse swankjesse added the bug label Mar 14, 2014
@andaag
Copy link
Author

andaag commented Mar 15, 2014

We've got version.jdk set to 1.6 in our maven build environment, I've seen some weird issues in production builds when targeting 1.7 which I haven't been able to look into yet. (I strongly suspect it's a quick fix though).

We're not casting anything to anything in okhttp.internal. And we're not using get*Long in our code. It might be in one of our dependencies, but I really doubt it. Our network stack consists of volley+okhttp, but we also have some dependencies with their own network stack. Such as google analytics and adobe analytics (which is a nice binary blob.. although I know from previous debugging experiments it's not obfuscated ;) ).

@swankjesse
Copy link
Collaborator

@andaag the problem is unrelated to getHeaderFieldLong. What's happening is that you're using the same SSLContext for an OkHttp request and a non-OkHttp request. This doesn't work because of a (recently-fixed) bug in Android's SSL library.

In theory, running this code before anything else should solve the problem:

   OkHttpClient okHttpClient = new OkHttpClient();
   URL.setURLStreamHandlerFactory(okHttpClient);

The best place to do this is in an Application subclass.

@swankjesse swankjesse added this to the 2.0 milestone Mar 15, 2014
@andaag
Copy link
Author

andaag commented Mar 15, 2014

@swankjesse Ahhh. We had a workaround for ssl issues (from #184), which I thought I wouldn't need anymore after okhttp 1.5. I'll add this fix to our app, thank you both 👍 .

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

No branches or pull requests

3 participants