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

xv6 stuck on qemu-system-i386 Mac M1 and M2 Chip #13

Closed
WardahJabeen opened this issue Jan 18, 2024 · 4 comments · Fixed by #14
Closed

xv6 stuck on qemu-system-i386 Mac M1 and M2 Chip #13

WardahJabeen opened this issue Jan 18, 2024 · 4 comments · Fixed by #14
Assignees

Comments

@WardahJabeen
Copy link

WardahJabeen commented Jan 18, 2024

It is the same error as "xv6 stuck on qemu-system-i386 Windows" error under Troubleshooting section causing make qemu-nox to fail but for Mac M1 and M2 chip.
Seems to be with the latest update of Mac OS. Also, it didn't occur on Mac M1 chip in previous semesters.
Error: qemu-system-i386 -nographic -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp 2 -m 512 rosetta error: Unimplemented syscall number 282

@WardahJabeen WardahJabeen changed the title xv6 stuck on qemu-system-i386 Mac M1 Chip xv6 stuck on qemu-system-i386 Mac M1 and M2 Chip Jan 18, 2024
@camerondurham
Copy link
Owner

camerondurham commented Jan 19, 2024

Apologies for the lazy answer, but I agree that this looks like a bug in the latest Apple software update and/or the Apple owned Rosetta emulation layer.

Follow-up Questions:

  1. Can the person having these issues try stopping Docker Desktop and instead using colima as their container runtime? That should not require the Rosetta emulation.
  2. If possible, provide output sw_vers and docker version commands

Using the non-beta version of macOS Sonoma I am still able to run make qemu-nox and get a shell into a random CS350 homework xv6 build.

Example below of what's working for me:

$ sw_vers                                                 
ProductName:		macOS
ProductVersion:		14.2.1
BuildVersion:		23C71

$ docker version
Client:
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.21.4
 Git commit:        v24.0.5
 Built:             Thu Jan  1 00:00:00 1970
 OS/Arch:           darwin/arm64
 Context:           colima

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:08:29 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.25
  GitCommit:        d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@WardahJabeen
Copy link
Author

Thanks Cameron! Another solution that we recently figured out (for future reference) is to uncheck "use rosetta for x86/amd64 emulation on apple silicon" in docker settings under "General".

@camerondurham
Copy link
Owner

Thanks for following up with the resolution, that's a good find and really helpful! It looks like I had that option disabled and didn't notice it.

I updated the troubleshooting section to include this case.

@WardahJabeen
Copy link
Author

WardahJabeen commented Jan 23, 2024

Good idea! Also, I found the solution online. 😅

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