-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Issues with ASAN in Windows 10 Ubuntu subsystem #708
Comments
Ouch. I am sorry for that. |
Some information about the issue. ASAN expects procmaps to be formatted as follows Example of output on Windows:
|
The problem seems pretty minor and we could accept a patch, but we have no way to test it :( |
We can totally test it. Just give MemoryMappingLayout a test-only
constructor that accepts a text buffer, and pass a saved copy of
/proc/self/maps from Windows.
…On Thu, Apr 20, 2017 at 4:31 PM, Kostya Serebryany ***@***.*** > wrote:
The problem seems pretty minor and we could accept, but we have no way to
test it :(
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#708 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZuShwhpvY6je69uWUAN3lCUJk2cbI3ks5rx-rmgaJpZM4JeKvn>
.
|
Not worth until they fix performance issues with large memory mappings. It is just so slow that I can't even run empty main, because it takes forever to init everything. I left it for an hour and it was still in asan init code. ASAN maps 20TB and it kills current WSL. See microsoft/WSL#1671 which seems to be the same issue with large mmap. |
Sounds like the same problem that we have with native asan-on-windows, where we can't mmap the shadow properly and instead need to mmap it partially in SEGV handler. This sucks utterly. @rnk FYI |
Makes sense. I think we need to investigate how control flow guard maps massive amounts of virtual memory efficiently. I agree with @kcc, if your app is portable, for now you'll get better mileage running it natively on Windows or Linux, and not using the Windows subsystem for Linux. |
Just wanted to drop by to say that I'm also very interested in running thread sanitizer on WSL. But from the comments it sounds as if there is not a lot you can do about it. |
@kcc How exactly is the memory being mapped in the native windows version? Are you memory mapping an actual file, are you creating a shared mapping to be shared with other processes, or are you just allocating virtual memory? If it is the third option, then the efficient option is to use |
@retep998 Yes, we use VirtualAlloc to reserve 1/8 the address space. However, if we try to commit that much address space, the kernel usually returns an error. Instead, on Windows, we effectively do our own page fault handling for shadow memory with a vectored exception handler. I suspect that the Windows subsystem for Linux will also fail or perform poorly if you ask it to mmap 1/8 the address space. |
@kcc @rnk See Release Notes You "may" be able to further increase interop and performance now. Also see WSL/121 |
ASAN should work now as of Insider build 17093, see above link for Release Notes and WSL issue for more details. If there are any failings, perform an strace and provide in WSL/121 as linked above.
With AF_Unix on Windows and now has interop with WSL, are you able to take advantage of this capability to change your current page fault handling configuration? If so, I'd recommend making the change but still make the current implementation available in case it proves too buggy until there's more support in AF_Unix for Windows. Also, since we're mentioning performance, the Meltdown fix has slowed it down to a noticeable point (but not noticeable enough for normal users), (it was significantly faster after the release that came out at the time my post above was made). |
Confirmed as fixed as of 17093 by another person so this can be marked closed. |
Sounds fixed. Please re-open if not. |
The output of a C++ program built with
-fsanitize=address
in the new Windows 10 Ubuntu subsystem:The program:
Tested with gcc4.8, gcc5, gcc6, clang3.7, clang3.8
The text was updated successfully, but these errors were encountered: