toaruos
toaruos copied to clipboard
Some issues
-
If try to run these code below:
#include <pthread.h> #include <stdio.h> void *func(void *arg) { while (1) { printf("A"); } return NULL; } int main(void) { pthread_t thread; pthread_create(&thread, NULL, func, NULL); while (1) { printf("M"); } return 0; }
The segment fault will happen in less than a second. If I comment all the printf() and make every thread just run an empty loop then the code runs well.
-
Plasma has two threads and the kernel will panic(page fault) when I run the command ‘kill -9 88’ (for example, plasma has a PID 88 and has two TIDs 88, 89). Sometimes it happens immediately and somtimes it happens when I try to run the next command.
-
The key 'CapsLk' doesn't work. Maybe need to make a little change in the keycode translation library?
- The libc's stdio implementation is not thread safe. This is not a bug, per se, but it is a known deficiency.
- This one is interesting, and I see what's happening from the backtrace; I am surprised I hadn't seen this previously...
- Depending on what you're running the OS in, it may be impossible to support caps lock; currently, I have not implemented support because I do almost all of my testing and development in QEMU and it doesn't even send a key press for caps lock.
I have pushed a quick fix for the second issue which should more gracefully handle the situation instead of causing a kernel panic, though really there are several problems with threaded processes in the kernel that need to be addressed with more extensive changes. This is not an area I have put much work into.
I have filed #264 to track the implementation of locking in the stdio
implementation.
There were two old tickets for supporting caps lock, both of which were closed as part of a clean up of legacy tickets a few years ago. I may re-open one of them, probably #67.