Well, it seems I was able to make QEMU run with one thread. The problem was that QEMU uses an infinite loop for emulating processor. This loop doesn't block and will not block under some circumstances. This was a moment when interrupts from timers stopped being emulated and the linux kernel got stuck when waiting for an interrupt.
I tried to put fibril_yield in this loop hoping that would help. What I didn't know was that this function doesn't work with timeouts on fibril_condvar. An async manager fibril needs to be run to continue timeouted fibrils, which is not what fibril_yield used to do. So I added a FIBRIL_DEFIBRILATE switch type, that switches to async manager and lets timeouted fibrils be woken up. Now linux kernel boots with only one thread for QEMU. Concerning the second panic, I am convinced that threads can't be used as execution containers. There is a race condition causing memory corruption in the process. How resistant udebug is to corrupted memory of the process I don't know, but first I would try to remove the race condition. Thanks for your time, Jan Dne 5. 6. 2015 16:09 napsal uživatel "Jakub Jermar" <[email protected]>: > On 06/05/2015 09:38 AM, Jan Mareš wrote: > > Any input on that piece of code I sent in the previous message? > > Not at this moment. > > Jakub > > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/listinfo/helenos-devel >
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
