browser-vm icon indicating copy to clipboard operation
browser-vm copied to clipboard

Unimplemented: #GP handler

Open avaer opened this issue 5 years ago • 10 comments

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?

avaer avatar Dec 15 '19 20:12 avaer

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

humphd avatar Dec 15 '19 20:12 humphd

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

avaer avatar Dec 15 '19 20:12 avaer

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 avatar Dec 15 '19 20:12 humphd

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

humphd avatar Dec 15 '19 20:12 humphd

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.

avaer avatar Dec 15 '19 21:12 avaer

@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.

dawnofman avatar Mar 21 '21 19:03 dawnofman

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.

humphd avatar Mar 21 '21 22:03 humphd

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

dawnofman avatar Mar 22 '21 13:03 dawnofman

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

farhan-ct avatar Jan 09 '24 11:01 farhan-ct