curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: Strange very long time in curl_multi_cleanup() after an SSL request

From: Frédéric BOITEUX via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 13 Nov 2023 15:05:24 +0000

        Hello Daniel,

Thanks for your help!

I’m using OpenSSL backend (as Debian’s default).

My program actually blocks in the socket read. I tried to add some traces, but failed : I’ve tried CURL_TRC_CF() and info() tracing functions, but I didn’t get traces, probably because there is no more easy handle ever available, as my problem comes in curl_multi_cleanup(), after all easy_handles have been cleanup…

But I send it a 6 signal to get a core, and here is the backtrace when my program is stuck :

(gdb) bt
#0 __libc_recv (flags=<optimized out>, len=5, buf=0x5639c2314eb3, fd=6)
    at ../sysdeps/unix/sysv/linux/recv.c:28
#1 __libc_recv (fd=6, buf=0x5639c2314eb3, len=5, flags=0)
    at ../sysdeps/unix/sysv/linux/recv.c:23
#2 0x00005639c2210e12 in nw_in_read ()
#3 0x00005639c2210f53 in cf_socket_recv ()
#4 0x00005639c2209f21 in ossl_bio_cf_in_read ()
#5 0x00007f70f8b09967 in bread_conv (bio=<optimized out>,
    data=<optimized out>, datal=<optimized out>, readbytes=0x7ffd3a57be00)
    at ../crypto/bio/bio_meth.c:123
#6 0x00007f70f8b07f86 in bio_read_intern (b=0x5639c2311fc0,
    data=0x5639c2314eb3, data_at_entry=0xd5aabae1ce39, dlen=5,
    dlen_at_entry=18446744072672583616, readbytes=readbytes_at_entry=0x7ffd3a57be00)
    at ../crypto/bio/bio_lib.c:292
#7 0x00007f70f8b086f3 in BIO_read (dlen=-1036968000, data=0xd5aabae1ce39,
    b=<optimized out>) at ../crypto/bio/bio_lib.c:318
#8 BIO_read (b=<optimized out>, data=data_at_entry=0x5639c2314eb3,
    dlen=dlen_at_entry=5) at ../crypto/bio/bio_lib.c:310
#9 0x00007f70f9207a70 in ssl3_read_n (s=s_at_entry=0x5639c23130f0, n=n_at_entry=5,
    max=5, extend=extend_at_entry=0, clearold=clearold_at_entry=1,
    readbytes=readbytes_at_entry=0x7ffd3a57bec8)
    at ../ssl/record/rec_layer_s3.c:293
#10 0x00007f70f920af5d in ssl3_get_record (s=s_at_entry=0x5639c23130f0)
    at ../ssl/record/ssl3_record.c:210
#11 0x00007f70f9209b70 in ssl3_read_bytes (s=<optimized out>, type=23,
    recvd_type=0x0, buf=0x7ffd3a57c060 "\030\016\"\3029V", len=1024, peek=0,
    readbytes=0x7ffd3a57c030) at ../ssl/record/rec_layer_s3.c:1350
#12 0x00007f70f91deb2e in ssl3_read_internal (s=0x5639c23130f0,
    buf=0x7ffd3a57c060, len=1024, peek=0, readbytes=0x7ffd3a57c030)
    at ../ssl/s3_lib.c:4462
#13 0x00007f70f91ea773 in SSL_read (s=<optimized out>, buf=<optimized out>,
    num=<optimized out>) at ../ssl/ssl_lib.c:1885
#14 0x00005639c2207128 in ossl_close ()
#15 0x00005639c21c855a in ssl_cf_close ()
#16 0x00005639c21d438a in cf_setup_close ()
#17 0x00005639c220fde2 in cf_hc_close ()
#18 0x00005639c21beb3a in Curl_disconnect ()
#19 0x00005639c21d3fc6 in Curl_conncache_close_all_connections ()
#20 0x00005639c21ae540 in curl_multi_cleanup ()
#21 0x00005639c2196b12 in web_curl_term () at web_curl.c:236
#22 0x00005639c2190ceb in sortie_g_web () at g_web.c:880
#23 0x00007f70f92df335 in sortie (sig=0, change=false) at a_main.c:958
#24 0x00007f70f92dec36 in t_stop (change=false) at a_main.c:721
#25 0x00007f70f92dea0e in t_message (m=0x5639c22bd600 "se", lng=3,
    pcl=0x7ffd3a57cdc0) at a_main.c:665
#26 0x00007f70f92de6f8 in traite_ev () at a_main.c:552
#27 0x00007f70f92dd781 in main (c=1, v=0x7ffd3a57cf58) at a_main.c:134


        Regards,
                Fred.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-11-13