Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update drstrace and drltrace to use auto-generated syscall number files #1983

Closed
emmanueltsukerman opened this issue Apr 24, 2017 · 14 comments · Fixed by #2211
Closed

Update drstrace and drltrace to use auto-generated syscall number files #1983

emmanueltsukerman opened this issue Apr 24, 2017 · 14 comments · Fixed by #2211

Comments

@emmanueltsukerman
Copy link

I have a fresh installation of Dr. Memory on a Windows 10 VM. When I run
bin\drstrace -- calc
and
bin64\drstrace -- calc
in cmd with administrator privilege I receive the error
ASSERT FAILURE: D:\drmemory_package\drstrace\drstrace.c:670: false (drsys failed to init)
and no output is produced.

@derekbruening
Copy link
Contributor

Unfortunately "Windows 10" doesn't tell us enough as its updates are major despite still being called "Windows 10": is this the just-out "Creators Update" 1703?

If so, and the return value from drsys_init is DRMF_WARNING_UNSUPPORTED_KERNEL, this is not surprising. We should put the error message and syscall text file support that Dr. Memory uses from #1908 (xref e81c1cd) into drstrace to support major Windows updates with just a data file update.

@emmanueltsukerman
Copy link
Author

emmanueltsukerman commented Apr 25, 2017

Yes, it is the new update:
Windows 10 Enterprise Evaluation
Version 1703
OS Build 15063.138

I see only the assertion bug; no additional output is given (see image).
drstract_assert_failure

The syscalls file is present in bin64
drstrace_syscallsfile

@derekbruening
Copy link
Contributor

Right, but we never put the support into drstrace to read the syscall file: unfortunately it is only in drmemory right now.

Putting a note into #1848 to include drstrace (and drltrace) in the solution there as well.

@emmanueltsukerman
Copy link
Author

Thanks for the quick reply.

  1. Do you have any recommendations on work-arounds? Are the only two feasible options to rewind the windows update or wait for the fix?
  2. Do you have an estimate on how long it will take to fix the issue (on the order of days, weeks or months?)

@DarkHunterer
Copy link

Up,

is there anything we can do to make drstrace work on Windows 10?
If not, would you recommend any other solution to trace Windows API calls?

@derekbruening
Copy link
Contributor

You could take a stab at pointing to the syscall text file when drstrace initializes drsyscall, which is not much code: see the patch to drmemory/syscall.c from e81c1cd

@DarkHunterer
Copy link

I was willing to do that but unfortunately I am not able to succesfuly build this project with command line on Windows

@newgre
Copy link

newgre commented Oct 13, 2017

I have the same problem - drstrace fails with above error. Using 64bit Windows 10: Microsoft Windows [Version 10.0.15063]

@AlexanderSamoilov
Copy link

The Windows build for the version 1.11.17622-1 available at https://github.com/DynamoRIO/drmemory/releases/download/cronbuild-1.11.17622/DrMemory-Windows-1.11.17622-1.zip does not contain this issue. Tested today on Windows 10 64bit.

@vjardin
Copy link

vjardin commented Jul 31, 2018

The problem still occurs with this build:
C:\Program Files (x86)\Dr. Memory\bin64>drstrace.exe -version
Dr. Memory drstrace version 1.11.17622 -- build 1

C:\Program Files (x86)\Dr. Memory\bin64>drstrace.exe -- calc.exe
WARNING: fetching symbol information (procedure may take some time).
WARNING: symbol fetching failed. Symbol lookup will be disabled.
ASSERT FAILURE: ....\drstrace\drstrace.c:670: false (drsys failed to init)
C:\Program Files (x86)\Dr. Memory\bin64>

PS C:\Users\vjard> [System.Environment]::OSVersion.Version
Major Minor Build Revision


10 0 17134 0

@AlexanderSamoilov
Copy link

This sound strange, because for me this version works fine. Perhaps, it depends not only on the Dr.Memory version?

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\asa>C:\Tools\DrMemory-Windows-1.11.17622-1\bin64\drstrace.exe -version
Dr. Memory drstrace version 1.11.17622 -- build 1

C:\Users\asa>C:\Tools\DrMemory-Windows-1.11.17622-1\bin64\drstrace.exe -- calc.exe
WARNING: fetching symbol information (procedure may take some time).
WARNING: symbol fetching failed.  Symbol lookup will be disabled.
<drstrace log file is .\drstrace.calc.exe.12300.0000.log>

C:\Users\asa>echo %ERRORLEVEL%
0

@vjardin
Copy link

vjardin commented Jul 31, 2018

Yours is 10.0.15063
Mine is 10.0.17134.165

What could I do to gather proper logs during init ?

@derekbruening
Copy link
Contributor

derekbruening commented Apr 2, 2019

The future plan is to use auto-generated syscall numbers via #1848 rather than relying on tables that we have to manually update every 6 months for new Windows releases. This is already in Dr. Memory 2.1.0. This issue covers changing drstrace to use auto-generated syscall number files.

@derekbruening derekbruening changed the title ASSERT FAILURE: D:\drmemory_package\drstrace\drstrace.c:670: false (drsys failed to init) Update drstrace and drltrace to use auto-generated syscall number files Apr 2, 2019
@derekbruening derekbruening self-assigned this Jul 6, 2019
derekbruening added a commit that referenced this issue Jul 6, 2019
Adds support for reading system call numbers from a text file to both
drstrace and drltrace.  Adds support for auto-generating that file,
just like is done in Dr. Memory.

Updates DR to 1713c2d2 to fix a decoder assert that breaks the
auto-generation.

Fixes #1983
derekbruening added a commit that referenced this issue Jul 6, 2019
Adds support for reading system call numbers from a text file to both
drstrace and drltrace.  Adds support for auto-generating that file,
just like is done in Dr. Memory.

Updates DR to 1713c2d2 to fix a decoder assert that breaks the
auto-generation.

Fixes #1983
@derekbruening
Copy link
Contributor

The fix didn't make it for the July 5 cronbuild. It will be in the July 12 cronbuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants