Skip to content

fs.mkdir/mkdirSync recursive hang with invalid windows character #31177

Description

@fraxken

Hi,

The following issue: #28599 doesn't seem to be resolved. I just encountered the problem on a project i work on since few days where we generate reports (some reports name has the ':' symbol in the name which is not good... i guess my collaborators are not working on Windows 😅)

Version: Node.js 13.3.0
Platform: Windows 10 - 64 Bit

How to reproduce (work with mkdirSync and mkdir promises):

const { mkdirSync } = require("fs");

console.log("A");
mkdirSync("test:lol", { recursive: true });
console.log("B");

mkdirSync never return. This should throw an Error.

Best Regards,
Thomas

Activity

  1. added
    fsIssues and PRs related to file-system APIs and the fs module.
    windowsIssues and PRs related to the Windows platform.
    on Jan 3, 2020
  2. Trott commented on Jan 4, 2020

    @Trott
    Member
  3. cjihrig commented on Jan 4, 2020

    @cjihrig
    Contributor

    Were the @ mentions because of recursive rmdir() (not mkdir()), or something else?

    Also cc: @bzoz (for working on #28599).

  4. Trott commented on Jan 4, 2020

    @Trott
    Member

    Were the @ mentions because of recursive rmdir() (not mkdir()), or something else?

    @cjihrig In your case, I @-mentioned you because the linked issue (#28599) was closed by #29070, which you authored, so I thought you might have insight as to what's going on here. (I didn't look too closely at things. Sorry if the ping was a bit over-eager of me.)

  5. bcoe commented on Jan 5, 2020

    @bcoe
    Contributor

    @addaleax is there any reason we can't upstream this libuv patch into Node?

  6. addaleax commented on Jan 5, 2020

    @addaleax
    Member

    @bcoe I think that libuv patch is already included in the relevant Node.js versions, so it’s probably a different (?) issue? I can try to check the next time I’m on Windows.

  7. targos commented on Jan 5, 2020

    @targos
    Member

    I'm trying to debug with visual studio (first time :D). The value of err for the invalid path here is UV_ENOENT. It then reaches the condition dirname != next_path, which is true so it adds dirname and next_path to the queue.
    Then dirname is handled (it exists).
    Then next_path is handled, and we're back to the previous behavior -> infinite loop

  8. vtjnash commented on Aug 18, 2020

    @vtjnash
    Contributor

    Please review libuv/libuv#2601

  9. added
    libuvIssues and PRs related to the libuv dependency or the uv binding.
    on Dec 30, 2020
  10. santigimeno commented on Nov 14, 2022

    @santigimeno
    Member

    This was already fixed in libuv and released in libuv@1.41.0.

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

    fsIssues and PRs related to file-system APIs and the fs module.libuvIssues and PRs related to the libuv dependency or the uv binding.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions