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

Windows 7 and 10 crash consistently: mprotect failed: Permission denied #2630

Closed
jonofmac opened this issue Jun 22, 2021 · 4 comments
Closed
Labels
crash Application crashes qemu QEMU related
Milestone

Comments

@jonofmac
Copy link

jonofmac commented Jun 22, 2021

Describe the issue
Hello, I'm running x86 windows 7 or windows 10 on M1. I'm having an issue where it seems that QEMU is crashing every time I try to launch this VCM Editor or VCM Scanner.

To replicate, I'd suggest the following:

  1. Install windows 10 (Version doesn't matter, I have 10 pro). It does it in windows 7 just the same, but 10 has all the pre-reqs.
  2. Download and install VCM Suite from hptuners dot com. It's tuning software for cars, but for some reason the emulator crashes 100% of the time with this software.
  3. Launch VCM Editor or VCM Scanner. Doesn't matter. The emulator seems to crash and gives me a warning about a random unused parameter. I've tried changing the parameter but it doesn't help anything. Looking at the crash report seems to suggest it may be something there.

End of the log seems to be most telling:

Please use disable-ticketing=on instead
qemu-x86_64-softmmu: -accel tcg,thread=multi,tb-size=1024: warning: Guest expects a stronger memory ordering than the host provides
This may cause strange/hard to debug errors
qemu-x86_64-softmmu: -accel tcg,thread=multi,tb-size=1024: qemu_mprotect__osdep: mprotect failed: Permission denied

Configuration

  • UTM Version: 2.1.1 (30)
  • OS Version: 11.4 (Big Sur)
  • Intel or Apple Silicon? Apple M1, 2020, 8 GB, Macbook Air

Crash log
QEMULauncher_2021-06-22-002120_Jonathans-MacBook-Air.crash.zip

Debug log
debug.log

@conath conath added crash Application crashes qemu QEMU related labels Jun 24, 2021
@jonofmac
Copy link
Author

jonofmac commented Jun 26, 2021

Found a reference that suggested this might have been fixed in the Dev branch. I switched branches and attempted to compile, but was unsuccessful compiling. Shame, because I've been really trying to find a way to get x86 windows running with USB.

error: unknown type name 'mbstate_t'; did you mean '__mbstate_t'?
int     mbsinit(const mbstate_t *);

And got lots of:

In file included from 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cstddef:37:
../version:1:1: error: expected unqualified-id
6.0.0

@kwhr0
Copy link

kwhr0 commented Jun 27, 2021

From the crash log:

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000013948294
Exception Note:        EXC_CORPSE_NOTIFY

This bug in QEMU 6.0.0 has been fixed in a patch I submitted.

qemu/qemu@26b1248f66

@osy osy modified the milestones: v2.2, v2.1.2 Jul 5, 2021
@osy osy closed this as completed in 0dc4405 Jul 9, 2021
@martykan
Copy link

Unfortunately I got this on 2.1.2 (31) as well. M1 Macbook Air, macOS 11.5

qemu-x86_64-softmmu: -accel tcg,tb-size=256: qemu_mprotect__osdep: mprotect failed: Permission denied

@kwhr0
Copy link

kwhr0 commented Jul 26, 2021

My patch fixes a crash caused by SIGILL and is not about mprotect, which was modified in macOS 11.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Application crashes qemu QEMU related
Projects
None yet
Development

No branches or pull requests

5 participants