Skip to content

Torture test failures #12834

Description

@dfandrich

I did this

I ran a full set of torture tests (instead of a shallow one) and found that the following test showed failures:

20 241 356 412 413 507 534 1060 1061 1083 1084 1085 1553 1557 1592 1632 1908

More than half of these failed when the strdup() at asyn-thread.c:627 errored out, so there may not be that many root causes to these failures.

I expected the following

No torture test failures.

curl/libcurl version

curl 8.6.0

operating system

Linux x86_64

Activity

  1. dfandrich commented on Feb 1, 2024

    @dfandrich
    ContributorAuthor

    W.r.t. the asyn-thread failures (e.g. 241), this failure is reported as a close-without-open of a FD, but it might be a false positive. The failure occurs in a HAVE_PIPE build which means that instead of a socketpair, a pipe is opened at asyn-thread.c:254; however, it's closed in this error path using sclose at asyn-thread.c:584. sclose is replaced by the memdebug subsystem and seen by it but pipe is not, so it appears to the leak checker like a close without an open.

    Building with HAVE_PIPE means it creates a socketpair instead of a pipe, except that socketpair is also not tracked by the memory tracker so once again it sees a close without an open.

    I don't know how this ever passed the leak checker. Every test using the resolver ought to error out here.

    On a related not, I don't think the sclose() at asyn-thread.c:584 is right; I think it should be wakeup_close. Although, that won't fix the torture test because it seems to be a limitation fo the leak checker.

  2. bagder commented on Feb 1, 2024

    @bagder
    Member

    I don't know how this ever passed the leak checker

    Because we used to disable the memory tracking with the threaded resolver due to problems with the logging from multiple threads. I'm not entirely sure those problems are gone now.

  3. bagder commented on Feb 1, 2024

    @bagder
    Member

    When I re-run this torture test failure on test 20 with valgrind enabled, valgrind says nothing. This might hint that the problem is rather with the logging itself.

  4. bagder commented on Feb 1, 2024

    @bagder
    Member

    Combine this with CURLOPT_QUICK_EXIT set. It allows leaks on exit, which is probably the biggest explanation here. We need to avoid setting this option when doing torture tests.

  5. added 2 commits that reference this issue on Feb 1, 2024
    be408a2
    c6cb312
  6. dfandrich commented on Feb 2, 2024

    @dfandrich
    ContributorAuthor

    Torture tests are all succeeding for me! Thanks.

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