Blog - Page 2

Take that GNU LD Posted 2010-10-12 02:00:00 by thePowersGang

So, GNU LD doesn't like linking 64-bit code to an ELF32 file, and hence was causing all sorts of issues with the x86_64 port (random corruption / data truncation)
This has been fixed by adding a way for an architecture to run a command after linking, that in the case of the x86_64 build, converts the output elf64 file into an elf32 file that GrUB can boot. (This also means that the disassembly actually works properly)

Threading is now my bitch Posted 2010-10-02 21:48:38 by thePowersGang

In response to my post earlier today, I was spurred to take another look at the threading code. It turns out taking a break was a good idea.
The bug was in the new mutex code, to speed things up I was using a double ended linked list as a queue. Works quite nicely... if you remember to set the end pointer to NULL once the queue is emptied. I had forgotten to do that, hence the mutex acquire code was trampling the active thread list, causing bugchecks to fire.

Threading is a bitch Posted 2010-10-02 13:48:15 by thePowersGang

For the last month or so I have had blocker bugs in the Acess2 threading code. This has broken any real progress on the rest of the kernel, leaving me unable to work on the fun stuff (read IP/TCP and filesystems).

A quick explanation of the bug follows:
The main issue is that the list of currently running processes is not being maintained correctly, for some reason threads that are acutally sleeping are being kept on the running queue, this is causing bugchecking code to fire and panic the kernel. The converse is also happening, so threads that are still supposed to be active are being taken off the active queue (or not being put back on).
I feel that this bug is due to concurrency issues somewhere, but a visual inspection of the source shows no places where the thread lists are edited without proper locking in place, and enabling debugging seems to mask the bug somehow due to timing differences.
If someone feels like reading the code and finding my fault for me, please feel free to email me at acessdev [at] gmail [dot] com or acess [at] mutabah [dot] net

Prev. Next