Why Apache bench-marking tool (ab) crashes due to double free() when SSL request fails and -v 2 option is used ?

Solution Verified - Updated -

Issue

  • ab command core dumps when SSL request fails and -v 2 option is used.

Eg:

$ ab -v 2 https://www.example.com/clientconsole/javascript/jquery.js
...
SSL read failed - closing connection
*** glibc detected *** ab: munmap_chunk(): invalid pointer: 0x00007f9ff2518c90 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75366)[0x7f9ff1d46366]
/usr/lib64/libcrypto.so.10(CRYPTO_free+0x1d)[0x7f9ff24daa8d]
/usr/lib64/libcrypto.so.10(ASN1_STRING_free+0x2d)[0x7f9ff255d48d]
/usr/lib64/libcrypto.so.10(ASN1_primitive_free+0x7d)[0x7f9ff25520ad]
/usr/lib64/libcrypto.so.10(ASN1_template_free+0x8f)[0x7f9ff255248f]
/usr/lib64/libcrypto.so.10(+0xd5376)[0x7f9ff2552376]
/usr/lib64/libcrypto.so.10(ASN1_item_free+0x15)[0x7f9ff25524c5]
/usr/lib64/libcrypto.so.10(sk_pop_free+0x30)[0x7f9ff2533cf0]
/usr/lib64/libssl.so.10(ssl_sess_cert_free+0x54)[0x7f9ff28508a4]
/usr/lib64/libssl.so.10(SSL_SESSION_free+0x87)[0x7f9ff2851637]
/usr/lib64/libssl.so.10(SSL_free+0xed)[0x7f9ff284f6bd]
ab(+0x5c18)[0x7f9ff41a8c18]
ab(+0x6d93)[0x7f9ff41a9d93]
ab(main+0x9b5)[0x7f9ff41ab395]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f9ff1cefcdd]
ab(+0x35c9)[0x7f9ff41a65c9]
======= Memory map: ========
7f9ff02c8000-7f9ff02de000 r-xp 00000000 fc:01 266960                     /lib64/libgcc_s-4.4.6-20120305.so.1
7f9ff02de000-7f9ff04dd000 ---p 00016000 fc:01 266960                     /lib64/libgcc_s-4.4.6-20120305.so.1
7f9ff04dd000-7f9ff04de000 rw-p 00015000 fc:01 266960                     /lib64/libgcc_s-4.4.6-20120305.so.1
7f9ff04de000-7f9ff04e3000 r-xp 00000000 fc:01 260641                     /lib64/libnss_dns-2.12.so
7f9ff04e3000-7f9ff06e2000 ---p 00005000 fc:01 260641                     /lib64/libnss_dns-2.12.so
7f9ff06e2000-7f9ff06e3000 r--p 00004000 fc:01 260641                     /lib64/libnss_dns-2.12.so
7f9ff06e3000-7f9ff06e4000 rw-p 00005000 fc:01 260641                     /lib64/libnss_dns-2.12.so
7f9ff06e4000-7f9ff06f0000 r-xp 00000000 fc:01 260643                     /lib64/libnss_files-2.12.so
7f9ff06f0000-7f9ff08f0000 ---p 0000c000 fc:01 260643                     /lib64/libnss_files-2.12.so
7f9ff08f0000-7f9ff08f1000 r--p 0000c000 fc:01 260643                     /lib64/libnss_files-2.12.so
7f9ff08f1000-7f9ff08f2000 rw-p 0000d000 fc:01 260643                     /lib64/libnss_files-2.12.so
7f9ff08f2000-7f9ff0908000 r-xp 00000000 fc:01 260653                     /lib64/libresolv-2.12.so
7f9ff0908000-7f9ff0b08000 ---p 00016000 fc:01 260653                     /lib64/libresolv-2.12.so
7f9ff0b08000-7f9ff0b09000 r--p 00016000 fc:01 260653                     /lib64/libresolv-2.12.so
7f9ff0b09000-7f9ff0b0a000 rw-p 00017000 fc:01 260653                     /lib64/libresolv-2.12.so
7f9ff0b0a000-7f9ff0b0c000 rw-p 00000000 00:00 0 
7f9ff0b0c000-7f9ff0b0e000 r-xp 00000000 fc:01 260969                     /lib64/libkeyutils.so.1.3
7f9ff0b0e000-7f9ff0d0d000 ---p 00002000 fc:01 260969                     /lib64/libkeyutils.so.1.3
7f9ff0d0d000-7f9ff0d0e000 r--p 00001000 fc:01 260969                     /lib64/libkeyutils.so.1.3
7f9ff0d0e000-7f9ff0d0f000 rw-p 00002000 fc:01 260969                     /lib64/libkeyutils.so.1.3
7f9ff0d0f000-7f9ff0d19000 r-xp 00000000 fc:01 267030                     /lib64/libkrb5support.so.0.1
7f9ff0d19000-7f9ff0f18000 ---p 0000a000 fc:01 267030                     /lib64/libkrb5support.so.0.1
7f9ff0f18000-7f9ff0f19000 r--p 00009000 fc:01 267030                     /lib64/libkrb5support.so.0.1
7f9ff0f19000-7f9ff0f1a000 rw-p 0000a000 fc:01 267030                     /lib64/libkrb5support.so.0.1
7f9ff0f1a000-7f9ff0f44000 r-xp 00000000 fc:01 260974                     /lib64/libk5crypto.so.3.1
7f9ff0f44000-7f9ff1143000 ---p 0002a000 fc:01 260974                     /lib64/libk5crypto.so.3.1
7f9ff1143000-7f9ff1145000 r--p 00029000 fc:01 260974                     /lib64/libk5crypto.so.3.1
7f9ff1145000-7f9ff1146000 rw-p 0002b000 fc:01 260974                     /lib64/libk5crypto.so.3.1
7f9ff1146000-7f9ff1149000 r-xp 00000000 fc:01 260673                     /lib64/libcom_err.so.2.1
7f9ff1149000-7f9ff1348000 ---p 00003000 fc:01 260673                     /lib64/libcom_err.so.2.1
7f9ff1348000-7f9ff1349000 r--p 00002000 fc:01 260673                     /lib64/libcom_err.so.2.1
7f9ff1349000-7f9ff134a000 rw-p 00003000 fc:01 260673                     /lib64/libcom_err.so.2.1
7f9ff134a000-7f9ff141e000 r-xp 00000000 fc:01 267028                     /lib64/libkrb5.so.3.3
7f9ff141e000-7f9ff161e000 ---p 000d4000 fc:01 267028                     /lib64/libkrb5.so.3.3
7f9ff161e000-7f9ff1627000 r--p 000d4000 fc:01 267028                     /lib64/libkrb5.so.3.3
7f9ff1627000-7f9ff1629000 rw-p 000dd000 fc:01 267028                     /lib64/libkrb5.so.3.3
7f9ff1629000-7f9ff1668000 r-xp 00000000 fc:01 267024                     /lib64/libgssapi_krb5.so.2.2
7f9ff1668000-7f9ff1868000 ---p 0003f000 fc:01 267024                     /lib64/libgssapi_krb5.so.2.2
7f9ff1868000-7f9ff1869000 r--p 0003f000 fc:01 267024                     /lib64/libgssapi_krb5.so.2.2
7f9ff1869000-7f9ff186b000 rw-p 00040000 fc:01 267024                     /lib64/libgssapi_krb5.so.2.2
7f9ff186b000-7f9ff18c8000 r-xp 00000000 fc:01 260619                     /lib64/libfreebl3.so
7f9ff18c8000-7f9ff1ac7000 ---p 0005d000 fc:01 260619                     /lib64/libfreebl3.so
7f9ff1ac7000-7f9ff1ac8000 r--p 0005c000 fc:01 260619                     /lib64/libfreebl3.so
7f9ff1ac8000-7f9ff1ac9000 rw-p 0005d000 fc:01 260619                     /lib64/libfreebl3.so
7f9ff1ac9000-7f9ff1acd000 rw-p 00000000 00:00 0 
7f9ff1acd000-7f9ff1ad1000 r-xp 00000000 fc:01 260689                     /lib64/libuuid.so.1.3.0
7f9ff1ad1000-7f9ff1cd0000 ---p 00004000 fc:01 260689                     /lib64/libuuid.so.1.3.0
7f9ff1cd0000-7f9ff1cd1000 rw-p 00003000 fc:01 260689                     /lib64/libuuid.so.1.3.0
7f9ff1cd1000-7f9ff1e5a000 r-xp 00000000 fc:01 260627                     /lib64/libc-2.12.so
7f9ff1e5a000-7f9ff2059000 ---p 00189000 fc:01 260627                     /lib64/libc-2.12.so
7f9ff2059000-7f9ff205d000 r--p 00188000 fc:01 260627                     /lib64/libc-2.12.so
7f9ff205d000-7f9ff205e000 rw-p 0018c000 fc:01 260627                     /lib64/libc-2.12.so
7f9ff205e000-7f9ff2063000 rw-p 00000000 00:00 0 
7f9ff2063000-7f9ff2078000 r-xp 00000000 fc:01 260671                     /lib64/libz.so.1.2.3
7f9ff2078000-7f9ff2277000 ---p 00015000 fc:01 260671                     /lib64/libz.so.1.2.3
7f9ff2277000-7f9ff2278000 r--p 00014000 fc:01 260671                     /lib64/libz.so.1.2.3
7f9ff2278000-7f9ff2279000 rw-p 00015000 fc:01 260671                     /lib64/libz.so.1.2.3
7f9ff2279000-7f9ff227b000 r-xp 00000000 fc:01 260633                     /lib64/libdl-2.12.so
7f9ff227b000-7f9ff247b000 ---p 00002000 fc:01 260633                     /lib64/libdl-2.12.so
7f9ff247b000-7f9ff247c000 r--p 00002000 fc:01 260633                     /lib64/libdl-2.12.so
7f9ff247c000-7f9ff247d000 rw-p 00003000 fc:01 260633                     /lib64/libdl-2.12.so
7f9ff247d000-7f9ff25f0000 r-xp 00000000 fc:01 6054                       /usr/lib64/libcrypto.so.1.0.0
7f9ff25f0000-7f9ff27f0000 ---p 00173000 fc:01 6054                       /usr/lib64/libcrypto.so.1.0.0
7f9ff27f0000-7f9ff2809000 r--p 00173000 fc:01 6054                       /usr/lib64/libcrypto.so.1.0.0
7f9ff2809000-7f9ff2813000 rw-p 0018c000 fc:01 6054                       /usr/lib64/libcrypto.so.1.0.0Aborted (core dumped)

Environment

  • Red Hat Enterprise Linux 6
  • httpd-tools-2.2.15-16.el6_3.x86_64 or earlier.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In