-
Notifications
You must be signed in to change notification settings - Fork 110
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
sys_process_exec crashes on qemu-2.11.1 #191
Comments
Just adding something as simple as |
Sounds like it's allocating the integer in both cases that fixes it, so maybe it's a stack thing, not a time thing? |
Yes I think you are right. |
Hmm, I am not able to reproduce the problem on using the argv-repair branch:
|
@jmazanec15 Can you double check whether you have the same problem with a fresh checkout of the argv-repair branch, and also the master branch? |
I ran the following commands on the terminal in a new repository: I then changed the Makefile.config to look like this so it would work on my Mac:
And then ran in the terminal: And then ran in base kernel: (I also removed the \f in the interrupt.c file so that the exception would not flush the entire screen.) |
Urk, sounds like we have a subtle different between mac and linux. Some more ideas to try:
|
Er wait -- do you get the same problem when running from the master branch? |
I got the same problem running from the master branch. I also just ran it from Ubuntu and got the same problem. I will try using gdb and determine the instruction. I know Ethan setup GDB so I'll see if he can help me set that up. |
FWIW, I'm using qemu-2.0.0, what do you have? |
It looks I am using 2.11.1 for Ubuntu and 3.0.0 for my Mac. |
Is this one actually fixed? |
My mistake. I was interpreting the output of exectest wrong. It is broken for qemu 3.0.0 as well. |
I am trying to create a window manager user program in which a list of programs are passed to the window manager and the window manager forks and execs each of them in their own windows. However, there seems to be a bug in the exec call.
Initially, running this fork and exec program fails:
It produces the following exception:
![image](https://user-images.githubusercontent.com/19438237/47968429-e4212280-e037-11e8-85b3-65dbda44af2e.png)
After doing some debugging, I have found that something goes wrong in the process_switch function. At the end of the sys_process_exec, it calls process_yield, which calls process_switch(PROCESS_STATE_READY). Here is the code for process_switch:
I have found that the program works by adding a dumby for loop before the while loop as a delay:
While this obviously is not a solution, I think it might indicate that there is some kind of race condition going on.
The text was updated successfully, but these errors were encountered: