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

Failed to reserve range: error running Wine tests #2258

Open
hughbe opened this issue Jun 26, 2017 · 19 comments
Open

Failed to reserve range: error running Wine tests #2258

hughbe opened this issue Jun 26, 2017 · 19 comments
Labels

Comments

@hughbe
Copy link

@hughbe hughbe commented Jun 26, 2017

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.14393]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

First, build Wine - awesome that it compiles!!

git clone https://github.com/wine-mirror/wine.git
cd wine
./configure
make depend
make

Secondly, run the tests

cd dlls/gdiplus/test
make font.ok
  • What's wrong / what should be happening instead:
    I'd expect the tests to run, but:
hugh@DESKTOP-HJANDGF:/mnt/c/Users/hugh/Documents/WSL/wine/dlls/gdiplus/tests$ make font.ok
../../../tools/runtest -q -P wine -T ../../.. -M gdiplus.dll -p gdiplus_test.exe.so font && touch font.ok
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
wine client error:0: recvmsg: Invalid argument
make: *** [font.ok] Error 1
hugh@DESKTOP-HJANDGF:/mnt/c/Users/hugh/Documents/WSL/wine/dlls/gdiplus/tests$
@sunjoong
Copy link

@sunjoong sunjoong commented Jun 26, 2017

@hughbe - Here is my output of make font.ok;

root@SUNJOONG-DESKTOP:~/wine/dlls/gdiplus/tests# make font.ok
../../../tools/runtest -q -P wine -T ../../.. -M gdiplus.dll -p gdiplus_test.exe.so font && touch font.ok
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
fixme:gdiplus:GdipGetLineSpacing ignoring style
root@SUNJOONG-DESKTOP:~/wine/dlls/gdiplus/tests# make font.ok
make: 'font.ok' is up to date.
root@SUNJOONG-DESKTOP:~/wine/dlls/gdiplus/tests#
  • I'm using on Microsoft Windows [Version 10.0.15063]
  • I copied timesbd.ttf, timesbi.ttf, timesi.ttf and times.ttf to /usr/share/fonts/truetype/msttcorefonts directory.
  • I was using --enable-win64 option when configure.

But...

root@SUNJOONG-DESKTOP:~/wine/dlls/advapi32/tests# make security.ok
../../../tools/runtest -q -P wine -T ../../.. -M advapi32.dll -p advapi32_test.exe.so security && touch security.ok
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
security.c:2066: Tests skipped: Well known SID 38 not implemented
security.c:2066: Tests skipped: Well known SID 39 not implemented
security.c:2066: Tests skipped: Well known SID 40 not implemented
security.c:2066: Tests skipped: Well known SID 41 not implemented
security.c:2066: Tests skipped: Well known SID 42 not implemented
security.c:2066: Tests skipped: Well known SID 43 not implemented
security.c:2066: Tests skipped: Well known SID 44 not implemented
security.c:2066: Tests skipped: Well known SID 45 not implemented
security.c:2066: Tests skipped: Well known SID 46 not implemented
security.c:2066: Tests skipped: Well known SID 47 not implemented
security.c:2066: Tests skipped: Well known SID 48 not implemented
security.c:2066: Tests skipped: Well known SID 49 not implemented
security.c:2066: Tests skipped: Well known SID 50 not implemented
security.c:2066: Tests skipped: Well known SID 62 not implemented
security.c:2066: Tests skipped: Well known SID 63 not implemented
security.c:2066: Tests skipped: Well known SID 64 not implemented
security.c:2066: Tests skipped: Well known SID 65 not implemented
security.c:2066: Tests skipped: Well known SID 70 not implemented
security.c:2066: Tests skipped: Well known SID 71 not implemented
security.c:2066: Tests skipped: Well known SID 72 not implemented
security.c:2066: Tests skipped: Well known SID 73 not implemented
security.c:2066: Tests skipped: Well known SID 74 not implemented
security.c:2066: Tests skipped: Well known SID 75 not implemented
security.c:2066: Tests skipped: Well known SID 76 not implemented
security.c:2066: Tests skipped: Well known SID 77 not implemented
security.c:2066: Tests skipped: Well known SID 78 not implemented
security.c:2066: Tests skipped: Well known SID 79 not implemented
security.c:2066: Tests skipped: Well known SID 81 not implemented
security.c:2066: Tests skipped: Well known SID 82 not implemented
fixme:advapi:ImpersonateLoggedOnUser (0x44)
fixme:advapi:LookupAccountSidW Only local computer supported!
fixme:advapi:LsaOpenPolicy ((null),0x23f120,0x000f0fff,0x23f110) stub
fixme:advapi:LsaClose (0xcafe) stub
fixme:advapi:LookupAccountNameW remote computer not supported
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
fixme:advapi:SetEntriesInAclW unhandled access mode 4
fixme:advapi:SetEntriesInAclW unhandled access mode 4
security.c:3584: Test succeeded inside todo block: GetNamedSecurityInfo failed with error 0
security.c:3664: Test succeeded inside todo block: GetNamedSecurityInfo failed with error 0
security.c:3929: Test failed: CreateFile error 0
security.c:3938: Test failed: CreateFile error 0
security.c:3948: Test failed: CreateFile error 0
security.c:3981: Test failed: CreateFile error 0
fixme:advapi:ParseStringSidToSid String constant not supported: L"No"
fixme:advapi:GetWindowsAccountDomainSid ((nil) (nil) (nil)): semi-stub
fixme:advapi:GetWindowsAccountDomainSid (0x11580 (nil) (nil)): semi-stub
fixme:advapi:GetWindowsAccountDomainSid (0x11580 (nil) 0x23f844): semi-stub
fixme:advapi:GetWindowsAccountDomainSid (0x11580 0x23f860 (nil)): semi-stub
fixme:advapi:GetWindowsAccountDomainSid (0x11580 0x23f860 0x23f844): semi-stub
fixme:advapi:GetWindowsAccountDomainSid (0x11580 0x23f860 0x23f844): semi-stub
fixme:advapi:CreateRestrictedToken (0x7c, 0x0, 1, 0x23f8e0, 0, (nil), 0, (nil), 0x23f8d8): stub
preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000
Makefile:335: recipe for target 'security.ok' failed
make: *** [security.ok] Error 6
root@SUNJOONG-DESKTOP:~/wine/dlls/advapi32/tests#

However, that's advapi32; I'm not sure that might be the 32bit problem but... you know, WSL supports only 64bit programs just now.

@therealkenc
Copy link
Collaborator

@therealkenc therealkenc commented Jun 26, 2017

Yes [edit] Wine still isn't 64-bit clean, so at the end of the day you are going to hard block on that. #228, User Voice is here. Bonus points for the "Wine Doesn't Run" PSA 🙄 Wine64 runs Windows x86-64 PE binaries and the "Failed to reserve range" warning is spurious.

As a separate matter it might be worth an strace on the recvmsg() EINVAL on it's own merits. Although, given the mass hemorrhaging the code is going to experience anyway, that is possibly/probably a secondary result of other fails - the invalid argument is probably the handle itself.

@sunjoong
Copy link

@sunjoong sunjoong commented Jun 26, 2017

@therealkenc - Thanks. FIY, advapi32 is for "Advanced Services API for 32bit systems." As noticing that, I thought more investigation might not be needed :)

@CherryDT
Copy link

@CherryDT CherryDT commented Jun 27, 2017

@sunjoong However the name for advapi32.dll in Windows came from the days when 16-bit was standard and 32-bit was the "new thing". The name was kept when the transition to 64-bit was made, e.g. your C:\Windows\System32\advapi32.dll file will actually be 64-bit on your 64-bit Windows machine.

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

Try to run without the wine-preloader.

@hughbe
Copy link
Author

@hughbe hughbe commented Jun 27, 2017

@woachk how do I do that - thanks

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

@hughbe you run Wine without the preloader by simply deleting wine-preloader.

@hughbe
Copy link
Author

@hughbe hughbe commented Jun 27, 2017

Beaut - I built wine from source, so I'll let ya know how it goes

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

@therealkenc 64-bit Wine is 64-bit clean.

@sunjoong
Copy link

@sunjoong sunjoong commented Jun 27, 2017

@CherryDT - Oh... I didn't notice that; Thank you.
@hughbe - But, I'm still not expecting wine works well on WSL. Quote from https://wiki.archlinux.org/index.php/wine ;"If you are running a 64-bit system, you will need to enable the Multilib repository first."

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

@sunjoong that's because most Windows apps are 32-bit. Wine 64-bit by itself only runs 64-bit Windows applications.

@therealkenc
Copy link
Collaborator

@therealkenc therealkenc commented Jun 27, 2017

@ therealkenc 64-bit Wine is 64-bit clean.

Correct; I should have been more pedantic. If someone wants to build a 64-bit clean version of Wine (ie, including Wine's dependencies and without multilib), post a link to a gist of a multithreaded strace of a Wine run on a Windows x86-64 PE hello world app. Maybe it will work. Maybe it will block on something else. Of course, you won't be able to run any Windows binaries that end up using WoW64 under the hood.

@sunjoong
Copy link

@sunjoong sunjoong commented Jun 27, 2017

I think the original problem of gdiplus had been solved by --enable-win64 option and fonts but a new problem of advapi32 was found; I have no idea of that. BTW, I also found C:\windows\system32\services.exe was executed while testing. Maybe... does that case security problem like "Only local computer supported!" or "remote computer not supported"?

Someone posted a image file of wine64 on WSL on reddit today, https://www.reddit.com/r/bashonubuntuonwindows/comments/6joykc/running_wine_on_wsl/ . On that image, there are "preloader: Warning: failed to reserve range 00007ffffe000000-00007fffffff0000"s too, but I think... that will be vanished after deleting wine64-preloader as @woachk said; I deleted loader/wine64-preloader of wine source directory while testing and that was vanished.

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

@sunjoong that's the Wine services host.

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

Wine works fine, I tried it some months ago afaik.

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

@sunjoong no, that references the services.exe in .wine/drive_c/windows/system32

@therealkenc
Copy link
Collaborator

@therealkenc therealkenc commented Jun 27, 2017

Interesting. Wine64 does run on WSL. Who knew? That's Ralph in an VcXsrv window. I get the "failed to reserve range" warning, but it's a soft fail. There's some other quirks, but it runs. I'll follow on with an strace on the fails once I take a look.

wsl-ralph

@woachk
Copy link

@woachk woachk commented Jun 27, 2017

@therealkenc I said it a long time ago :)

@therealkenc
Copy link
Collaborator

@therealkenc therealkenc commented Jun 27, 2017

So here is the missing surface, but as woachk points out none of them are blockers:

[...]
prctl(PR_SET_PTRACER, 30157) = -1 EINVAL (Invalid argument)
[...]
mmap(0x14002d000, 399360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 10, 0x400) = -1 
    EINVAL (Invalid argument)

That mmap is the source of the warning.

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

Successfully merging a pull request may close this issue.

None yet
6 participants