Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows: graphify update can hang in tempfile.mkstemp while saving manifest

Open
#3,646 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #3663 by @nikhilsaxena04 — closed without merging

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
cli, devtools

Research direction

Start in graphify/paths.py at _atomic_replace() and write_json_atomic(), then trace their callers in graphify/detect.py and graphify/watch.py. Review linked PR #3663 and reproduce graphify update . on Windows; done means the command completes or reports a visible, actionable error naming the manifest target.

Written by the indexing model from the issue text.

Description

Summary

On Windows, graphify update . can stop after AST extraction and never return. A faulthandler dump shows that Graphify is blocked in tempfile.mkstemp() while saving manifest.json.

Environment

  • graphifyy 0.9.63
  • Python 3.11.15, 64-bit
  • Windows 11 Pro, version 10.0.26200, build 26200
  • Target manifest path length: 55 characters (local project path redacted)

Reproduction

  1. Use a project with an existing graphify-out/ directory and roughly 1,090 code files.

  2. Run:

    graphify update .

  3. The command reports progress through AST extraction, for example:

    AST extraction: 1000/1088 uncached files (91%)

  4. It then remains active without printing a completion message or returning.

A 20-second faulthandler timeout captured this stack:

File "...\Lib\tempfile.py", line 257 in _mkstemp_inner
File "...\Lib\tempfile.py", line 358 in mkstemp
File "...\graphify\paths.py", line 120 in _atomic_replace
File "...\graphify\paths.py", line 165 in write_json_atomic
File "...\graphify\detect.py", line 2418 in save_manifest
File "...\graphify\watch.py", line 1988 in _rebuild_code

Expected behavior

graphify update . completes or fails with a visible error and an actionable target path.

Actual behavior

The process blocks indefinitely in temporary-file creation. There is no final success or failure output.

Additional observations

  • The graph artifacts had already been written and the resulting graph was valid (11,158 nodes, 40,276 edges; no missing or dangling endpoints).
  • The manifest target is deliberately short, so this does not appear to be the Windows path-length issue described in #3351.
  • In the current code, _atomic_replace() calls tempfile.mkstemp(dir=str(real.parent), prefix=".gfy-", suffix=".tmp") directly. The existing fallback around the later os.replace() step cannot handle a block before that point.

A bounded retry/timeout around temporary-file creation, plus explicit diagnostic output naming the target file, would make this failure mode recoverable.

Dominant language
Python
Stars
124k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Graphify-Labs/graphify

All issues in Graphify-Labs/graphify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.