humphd / browser-vm

A small Linux x86 VM meant for use in the browser
MIT License
175 stars 43 forks source link

Unimplemented: #GP handler #4

Open avaer opened 4 years ago

avaer commented 4 years ago

I'm trying to build my own v86 using Docker, but putting in the directory to load crashes the VM:

fs, path, and Buffer are all available on window for debugging, e.g., fs.stat('/', console.log)
index.js:1024 See https://github.com/filerjs/filer for docs.
index.js:1025 use ?debug on the URL if you need Plan9/Filer debug info from v86
?debug:508 no xr
index.js:12248 boot 0
index.js:12250 boot 1
index.js:12311 wait for prompt 1
index.js:12001 Unimplemented: #GP handler
index.js:12001 Execution stopped
index.js:11469 Unimplemented: #GP handler
index.js:11469 undefined
index.js:11469 Uncaught Unimplemented: #GP handler

Something I'm doing wrong?

humphd commented 4 years ago

I haven't hit this before, but upstream I see others have https://github.com/copy/v86/issues/1#issuecomment-28045232.

avaer commented 4 years ago

Yeah, though that seems to have been resolved many years ago :/.

humphd commented 4 years ago

https://github.com/copy/v86/commit/352dc7dda788d90d4bcb044cba3cdab672dd2d6b makes is seem like something with seabios, but I don't understand why you'd hit it.

I'll have to try and reproduce locally, but I'm not able to debug this right now.

humphd commented 4 years ago

Can you give me better STR for this? What does "putting in the directory to load crashes the VM" mean exactly? Thanks.

avaer commented 4 years ago

I have this fork, with a small config change: https://github.com/avaer/browser-vm

Then I run the docker build on that fork. Then I docker run without modification, and I successfully get the resulting ISO out of it (v86-linux.iso). I then copy v86-linux.iso back to browser-shell (which I built locally and am serving with a local web server). The copy is overtop of v86-linux.iso's previous location at dist/bin/v86-linux.iso.

I then clear all browser-state caches for the local web server domain in the frontend of the browser. I then load up browser-state's index.html as was previously working. This causes the boot process to start and crash with the above error.

dawnofman commented 3 years ago

@humphd Is there any solution found for this issue. I tried to use the libv86.js from ' https://github.com/humphd/v86/tree/filer-9p-lastknowngood' and passed a new filesystem object with basic v86 emulator API call. It hits with this error and doesn't boot. what are the mandatory parameters to be passed for boot.

humphd commented 3 years ago

I haven't looked into this, so I'm not sure. I'd have to immerse myself in this code again to figure out what's up.

What are you trying to do? I have zero time at the moment, but after I finish teaching, at the end of the semester, I might have time to update things for people who want to build on it.

dawnofman commented 3 years ago

As said earlier. Trying to use the "libv86.js" with Filer filesystem included. As you did, new filesystem object. When I tried to load, it always fails with #GP Handler error in line 616 of libv86.js.

What are the mandatory arguments for the new file system object. As I can see you passed fs, Buffer, Path, sh and function to take input filesystem

Short summary - I took your browser-shell project, built it, bundled it with browserify and served through Node server. It fails with same error. image

farhan-ct commented 9 months ago

Any update by anyone on this issue? I am facing the same issue too

coderofsalvation commented 1 month ago

I've hit this as well..in my case it was a build (iso) which was bigger in filesize which exceeded the memory_size configuration-option of v86