drmemory icon indicating copy to clipboard operation
drmemory copied to clipboard

drstrace fails on Windows UNC paths

Open gisburn opened this issue 1 year ago • 2 comments

Describe the bug drstrace fails on UNC paths, but works on paths which have a traditional X:\path syntax

To Reproduce Steps to reproduce the behavior (using Cygwin UNC path //foo/bar/path, but powershell \foo\bar\path gives the same result):

  1. Pick a network filesystem (SMB, MS-NFSv3, ms-nfs41-client, ...) from $ net use # output
  2. CWD into such a filesystem cd //derfw1fs10.global.loc/copy/Mainz/wingrendeltest1
  3. Run drstrace $ drstrace -- "$(cygpath -w "$PWD/sbin/nfs_mount")" <Using system call file C:\Program Files (x86)\Dr. Memory\drmemory\logs\symcache\syscalls_x64.txt> ASSERT FAILURE: D:\a\drmemory\drmemory\drstrace\drstrace.c:589: outf != INVALID_FILE (failed to open log file)

Expected behavior drmemory should run

Actual behavior drmemory fails with "ASSERT FAILURE: D:\a\drmemory\drmemory\drstrace\drstrace.c:589: outf != INVALID_FILE (failed to open log file)"

Versions

  • What version of Dr. Memory are you using? $ drmemory -version Dr. Memory version 2.6.19989 -- build 0

  • Does the latest build from https://drmemory.org/page_download.html#sec_latest_build solve the problem?

No

  • What operating system version are you running on? ("Windows 10" is not sufficient: give the release number.)

$ cmd /C 'ver' Microsoft Windows [Version 10.0.19045.4957]

  • Is your application 32-bit or 64-bit?

64bit

gisburn avatar Oct 02 '24 11:10 gisburn

Turns out no network share is required, just plan UNC paths.

  1. Example (Cygwin shell): cd //localhost/c$/cygwin64/home/roland_mainz/tmp/drstracetest $ drstrace -debug -- "$(cygpath -w /home/roland_mainz/work/msnfs41_uidmapping/ms-nfs41-client/destdir/cygdrive/c/cygwin64/sbin/nfs_mount)" <Using system call file C:\Program Files (x86)\Dr. Memory\drmemory\logs\symcache\syscalls_x64.txt> ASSERT FAILURE: D:\a\drmemory\drmemory\drstrace\drstrace.c:589: outf != INVALID_FILE (failed to open log file)

  2. Example (Powershell): cd '\localhost\c$\cygwin64\home\roland_mainz\tmp\drstracetest' drstrace -debug -- 'C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\destdir\cygdrive\c\cygwin64\sbin\nfs_mount.exe' <Using system call file C:\Program Files (x86)\Dr. Memory\drmemory\logs\symcache\syscalls_x64.txt> ASSERT FAILURE: D:\a\drmemory\drmemory\drstrace\drstrace.c:589: outf != INVALID_FILE (failed to open log file)

gisburn avatar Oct 02 '24 12:10 gisburn

Correction: Powershell path syntax for local drive C: is '\localhost\c$\cygwin64\home\roland_mainz\tmp\drstracetest' in this case

gisburn avatar Oct 02 '24 13:10 gisburn