Skip to content

torture test fails in 951 #20465

Closed
Closed

Description

@icing

I did this

Running torture test 951 on master:

********* System characteristics ********
* curl 8.19.0-DEV (x86_64-apple-darwin24.6.0)
* libcurl/8.19.0-DEV OpenSSL/3.5.4 zlib/1.2.12 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 libssh2/1.11.1_DEV nghttp2/1.67.1 ngtcp2/1.17.0 nghttp3/1.12.0 librtmp/2.3 mit-krb5/1.7-prerelease OpenLDAP/2.6.10
* Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt mqtts pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp ws wss
* Features: alt-svc AppleSecTrust AsynchDNS brotli Debug GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IDN IPv6 Kerberos Largefile libz PSL SPNEGO SSL SSLS-EXPORT threadsafe UnixSockets zstd
* Disabled: win32-ca-searchpath, win32-ca-search-safe, override-dns
* Host: resistance.fritz.box
* System: Darwin resistance.fritz.box 24.6.0 Darwin Kernel Version 24.6.0: Wed Nov  5 21:30:23 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_X86_64 x86_64
* OS: darwin
* Perl: v5.34.1 (perl)
* Args: -t 951
* Env: nghttpx-h3
* Seed: 240522
* Servers: SSL HTTP-IPv6 HTTP-unix FTP-IPv6
*****************************************
test 0951...[SMTP data with dot as first character]
 114 functions to make fail
** MEMORY FAILURE
Leak detected: memory still allocated: 64 bytes
At 600002748328, there is 64 bytes.
 allocated by curl_addrinfo.c:137
LIMIT hostip.c:584 calloc reached memlimit
 951: torture FAILED: function number 88 in test.
 invoke with "-t88" to repeat this single case.

 - abort tests
TESTDONE: 1 tests were considered during 10 seconds.
TESTDONE: 0 tests out of 1 reported OK: 0%

FAIL 951: 'SMTP data with dot as first character' SMTP

TESTFAIL: These test cases failed: 951

I expected the following

test passing

curl/libcurl version

master

operating system

macOS

Activity

  1. vszakats commented on Jan 28, 2026

    @vszakats
    Member

    Could reproduce. With -DENABLE_THREADED_RESOLVER=OFF (--disable-threaded-resolver) the leak goes away.

  2. vszakats commented on Jan 28, 2026

    @vszakats
    Member

    This issue predates the ability to run torture tests with the threaded resolver enabled, finalized via fb7033d.

  3. bagder commented on Jan 28, 2026

    @bagder
    Member

    I can't seem to reproduce on Linux!

  4. bagder commented on Jan 28, 2026

    @bagder
    Member

    Does libbacktrace work on macOS? Can you reproduce using a build with that enabled and then attach the tests/log/memdump file for the torture fail?

  5. vszakats commented on Jan 28, 2026

    @vszakats
    Member

    curl builds and links fine with libbacktrace (both Apple clang and llvm/clang), but their memdump look like this:

    MEM curl/lib/getenv.c:67 strdup(0x16b82e563) (2) = 0x6000026c7548
    MEM curl/lib/escape.c:191 free(0x6000026c7548)
    MEM curl/src/tool_cfgable.c:39 calloc(1,1192) = 0x15800ce08
    LIMIT curl/lib/easy.c:196 malloc reached memlimit
    compile with -g
    compile with -g
    compile with -g
    compile with -g
    compile with -g
    compile with -g
    compile with -g
    LIMIT curl/src/tool_paramhlp.c:37 calloc reached memlimit
    compile with -g                                                              
    compile with -g                                                              
    compile with -g                                                              
    compile with -g                                                              
    compile with -g                                                              
    compile with -g                                                                               
    compile with -g                                                                               
    compile with -g                                                                               
    compile with -g                                                                               
    compile with -g
    MEM curl/src/tool_cfgable.c:202 free(0x15800ce08)
    

    (source is compiled with -g, as confirmed by verbose log)

    When compiled with gcc-15 with libbacktrace enabled, memdump and test output looks identical to a non-libbacktrace-enabled build.

    In theory libbacktrace should recognize mach-o DWARF.
    I tried applying suggestions from ElementsProject/lightning#8431 via ianlancetaylor/libbacktrace#158, which made the result the same as with gcc-15, i.e. no backtraces :(

    edit: how does libbacktrace output look like when working correctly?

  6. bagder commented on Jan 29, 2026

    @bagder
    Member

    edit: how does libbacktrace output look like when working correctly?

    It provides a stack trace. Source file name, line number and function name all the way from the function until the main() call.

  7. bagder commented on Jan 29, 2026

    @bagder
    Member

    Here's what the memdump file looks like on my Linux machine after I ran runtests.pl -n -t13 1

    memdump-stacktrace.txt

  8. added a commit that references this issue on Jan 29, 2026
  9. icing commented on Jan 29, 2026

    @icing
    ContributorAuthor

    Fix in #20468

  10. vszakats commented on Jan 29, 2026

    @vszakats
    Member

    I confirm #20468 fixes the test failure.

  11. added a commit that references this issue on Feb 2, 2026
    ffdbc04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions