Skip to content

resume.cfg may be written before the tool fully validates or flushes the current processing #2345

Closed

Description

@ayuxsec

httpx version:

v1.7.4 (latest)

Current Behavior:

After interrupting httpx with CTRL+C, resuming with r resume.cfg does resume execution, but some URLs that were not fully processed before interruption are skipped. The resumed run does not reprocess all remaining targets, resulting in missing output compared to normal run.

Expected Behavior:

Running httpx -r resume.cfg should resume processing the remaining targets from the resume file and produce output accordingly.


Steps To Reproduce:

  1. Run httpx with input from stdin:

    cat subs.txt | httpx
  2. Interrupt execution using CTRL+C after partial output.

  3. Observe that resume.cfg is created.

  4. Attempt to resume execution:

    cat subs.txt | httpx -r resume.cfg
  5. Observer that some targets are not present compared to the output in normal run

Anything else:

Full terminal output:

ayux@pop-os:/tmp$ cat subs.txt | httpx

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

        projectdiscovery.io

[INF] Current httpx version v1.7.4 (latest)
[WRN] UI Dashboard is disabled, Use -dashboard option to enable
https://example.com
https://test.io
https://google.com
https://youtube.com
ayux@pop-os:/tmp$ cat subs.txt | httpx

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

        projectdiscovery.io

[INF] Current httpx version v1.7.4 (latest)
[WRN] UI Dashboard is disabled, Use -dashboard option to enable
https://example.com
https://test.io
^C[INF] CTRL+C pressed: Exiting
[INF] Creating resume file: resume.cfg
[ble: exit 1]
ayux@pop-os:/tmp$ cat subs.txt | httpx -r resume.cfg

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

        projectdiscovery.io

[INF] Current httpx version v1.7.4 (latest)
[WRN] UI Dashboard is disabled, Use -dashboard option to enable

Possible Cause (Speculation):

It appears that resume.cfg may be written before the tool fully validates or flushes the current processing state (including remaining targets and/or output state). As a result, the resume file may be incomplete or inconsistent, causing httpx -r resume.cfg to start without any remaining work to process.

Activity

  1. added
    Type: Bug
    on Dec 27, 2025
  2. coderabbitai commented on Dec 27, 2025

    @coderabbitai

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. ayuxsec commented on Jan 4, 2026

    @ayuxsec
    ContributorAuthor

    From my additional tests it seems that even the resume logic is broken apart from incorrectly writing wrong index & input in resume.cfg file (mb the flag for resume is -resume not -r)

    ayux@pop-os:~$ cat subs.txt 
    example.com
    test.com
    facebook.com
    hackerone.com
    google.com
    
    ayux@pop-os:~$ cat resume.cfg 
    resume_from=test.com
    index=5
    ayux@pop-os:~$ sed -i 's/index=.*/index=2/' resume.cfg
    ayux@pop-os:~$ cat resume.cfg 
    resume_from=test.com
    index=2
    ayux@pop-os:~$ httpx -l subs.txt -r resume.cfg -v
    
        __    __  __       _  __
       / /_  / /_/ /_____ | |/ /
      / __ \/ __/ __/ __ \|   /
     / / / / /_/ /_/ /_/ /   |
    /_/ /_/\__/\__/ .___/_/|_|
                 /_/
    
    		projectdiscovery.io
    
    [INF] Current httpx version v1.7.4 (latest)
    [DBG] Using resolvers: resume_from=test.com,index=2
    [WRN] UI Dashboard is disabled, Use -dashboard option to enable
    [DBG] Failed 'http://test.com': Get "http://test.com": cause="no address found for host"
    [DBG] Failed 'http://google.com': Get "http://google.com": cause="no address found for host"
    [DBG] Failed 'http://facebook.com': Get "http://facebook.com": cause="no address found for host"
    [DBG] Failed 'http://example.com': Get "http://example.com": cause="no address found for host"
    [DBG] Failed
  4. linked a pull request that will close this issueFix incorrect resume cfg write #2352on Jan 4, 2026
  5. dogancanbakir commented on Feb 2, 2026

    @dogancanbakir
    Member

    /bounty $75

  6. algora-pbc commented on Feb 2, 2026

    @algora-pbc

    💎 $75 bounty • ProjectDiscovery Bounty Available

    How to Participate:

    • Claim attempt: Comment /attempt #2345 on this issue. Multiple participants can attempt, but only the first to submit a complete, mergeable solution will receive the reward.
    • Work on the issue: Follow the Contribution Guidelines and ensure your solution fully addresses the issue requirements.
    • Submit your PR: Open a pull request to projectdiscovery/httpx and include /claim #2345 in the PR body.
    • Receive payment: Upon successful merge, you will receive 100% of the bounty through Algora within 2-5 days.

    Thank you for contributing to projectdiscovery/httpx and helping us democratize security!


    PR Requirements

    Your PR must include the following. PRs that don't meet these requirements may not be reviewed and could be closed.

    Proposed Changes

    Describe the overall picture of your modifications to help maintainers understand the pull request.

    Proof

    Demonstrate your changes work. Include before/after examples, screenshots, or terminal output showing the fix/feature in action.

    Checklist

    • PR created against the correct branch (usually dev)
    • All checks passed (lint, unit/integration/regression tests)
    • Tests added that prove the fix is effective or feature works
    • Documentation added (if appropriate)

    Add a bounty • Share on socials

    Attempt Started (UTC) Solution Actions
    🟢 @erdogan98 Feb 02, 2026, 05:32:35 PM #2388 Reward
    🟢 @Simplereally Feb 02, 2026, 11:31:26 PM #2390 Reward
    🟢 @assakafpix Feb 04, 2026, 09:28:39 PM #2393 Reward
    🟢 @ohmygod20260203 Feb 05, 2026, 05:47:08 PM #2394 Reward
    🟢 @thecafetron-ctrl Feb 08, 2026, 11:59:53 AM WIP
  7. added a commit that references this issue on Feb 2, 2026
    7fd4886
  8. Simplereally commented on Feb 2, 2026

    @Simplereally

    /attempt #2345

  9. erdogan98 commented on Feb 2, 2026

    @erdogan98

    /attempt #2345

  10. added 2 commits that reference this issue on Feb 2, 2026
    977419e
    396c3e6
  11. Simplereally commented on Feb 3, 2026

    @Simplereally

    Submitted PR #2391 with complete fix for resume state capture issue.

    The fix ensures resume.cfg is written with the last completed output rather than the currently processing item, preventing targets from being skipped on resume.

  12. dogancanbakir commented on Feb 3, 2026

    @dogancanbakir
    Member

    Hey contributors! Please make sure your PR follows the PR template and includes proof that your changes work (before/after examples, screenshots, or terminal output). Reviewer time is limited! Incomplete PRs may be closed without review. Thanks!

  13. removed their assignment
    on Feb 4, 2026
  14. assakafpix commented on Feb 4, 2026

    @assakafpix

    /attempt #2345

  15. ohmygod20260203 commented on Feb 5, 2026

    @ohmygod20260203

    /attempt #2345

    I've submitted PR #2394 with a fix for this issue.

    The fix adds separate tracking for the last completed item (vs the currently processing item) to ensure resume.cfg only reflects items that have been fully queued for processing. This prevents in-progress items from being skipped when resuming.

  16. energypantry commented on Feb 7, 2026

    @energypantry

    Hi! I can take this on with a fast turnaround. Do you accept USDC/USDT (any EVM chain) for payment? If yes, I can start immediately.

  17. energypantry commented on Feb 7, 2026

    @energypantry

    Hi! I can take this on with a fast turnaround. Do you accept USDC/USDT (any EVM chain) for payment? If yes, I can start immediately.

  18. thecafetron-ctrl commented on Feb 8, 2026

    @thecafetron-ctrl

    /attempt

    I’m taking this on. Will add a unit/integration test around resume.cfg write timing and ensure it is only written after successful validation / after all workers flush.

  19. thecafetron-ctrl commented on Feb 8, 2026

    @thecafetron-ctrl

    /attempt #2345\n\nPlan: ensure resume.cfg is written only after validation/flush, add regression test using temp dir + controlled writer to avoid partial writes.

  20. algora-pbc commented on Feb 9, 2026

    @algora-pbc

    @assakafpix: You've been awarded a $75 by ProjectDiscovery! 👉 Complete your Algora onboarding to collect the bounty.

  21. algora-pbc commented on Feb 9, 2026

    @algora-pbc

    🎉🎈 @assakafpix has been awarded $75 by ProjectDiscovery! 🎈🎊

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

    $75Type: Bug💎 Bounty💰 Rewarded

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions