What's your biggest OSDev frustrating moment?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Peterbjornx
Member
Member
Posts: 116
Joined: Thu May 06, 2010 4:34 am
Libera.chat IRC: peterbjornx
Location: Leiden, The Netherlands
Contact:

What's your biggest OSDev frustrating moment?

Post by Peterbjornx »

As MessiahAndrw suggested, here's a parody of "What's your OSDev AWWWW YEAH! moment?": post your most frustrating moments related to OS development!

Some of mine:
* Discovering a (still unfixed) bug that causes my OS to randomly pagefault about once in every 20 tests (still worrying about having to rewrite lots of my code to be more clean in order to fix this one)

* Realizing that a homebrew graphics library for my compositor was never going to be fast enough and deciding to drag in an external lib
User avatar
Rusky
Member
Member
Posts: 792
Joined: Wed Jan 06, 2010 7:07 pm

Re: What's your biggest OSDev frustrating moment?

Post by Rusky »

Saw this somewhere and chuckled:

Image
martinFTW
Posts: 15
Joined: Sun Jun 08, 2014 10:39 am
Contact:

Re: What's your biggest OSDev frustrating moment?

Post by martinFTW »

Building GCC, binutils libstdc++, newlib and the other toolchain software is definitly the most frustrating thing by far. You wait it a decade to build and then you almost always have to start from the beginning again.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: What's your biggest OSDev frustrating moment?

Post by Bender »

Rusky wrote:Saw this somewhere and chuckled:

<image/><phpnerd/>
And also,
Image
:P
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: What's your biggest OSDev frustrating moment?

Post by piranha »

A (seemingly random) kernel memory corruption whenever I started and exited nano. Turned out to only occur if I exited nano on a second virtual terminal while the first terminal was scrolling. Many many hours later, it turns out that an old hack I had put in to the tty escape sequences code came back to bite me after I refactored the general console code...It was such a bad hack, I can't believe that I even left it in there.
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
User avatar
Muazzam
Member
Member
Posts: 543
Joined: Mon Jun 16, 2014 5:59 am
Location: Shahpur, Layyah, Pakistan

Re: What's your biggest OSDev frustrating moment?

Post by Muazzam »

My total frustrating moments > My total ah yeah moments.
Few Frustrating moments are:
1. PS/2 mouse not working but don't know why.
2. Labels after entering protected mode not working but don't know why.
3. Building script not working but don't know why.
4. Bootloader not working but don't know why.
5. CPU triple faulting but don't know why.
and ..............
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your biggest OSDev frustrating moment?

Post by SpyderTL »

Honestly?

Spending months trying to find the exact combination of Floppy Controller register flags to poll (when in DMA mode) that would work on VirtualBox, VMware, Bochs, VirtualPC, SimNOW(!), QEMU, M.E.S.S., Tornado64(!), and my HP desktop at work, which, yes, still has a 3 1/4" floppy drive...

(SimNOW was the worst, by far!!)

But I think I finally have a working 32-bit floppy read method that works across all of these. (At least until the next VM I test it on.)
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
embryo

Re: What's your biggest OSDev frustrating moment?

Post by embryo »

SpyderTL wrote:Spending months trying to find the exact combination of Floppy Controller register flags to poll (when in DMA mode) that would work on VirtualBox, VMware, Bochs, VirtualPC, SimNOW(!), QEMU, M.E.S.S., Tornado64(!), and my HP desktop at work
It seems the only working solution is the Microsoft's way of doing things. Just because it is the main test for every emulator. The Microsoft really has power :(
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: What's your biggest OSDev frustrating moment?

Post by Combuster »

I'd guess the fact of polling is wrong when you should be waiting for an interrupt instead - which is either the FDC or the clock in case of timeouts.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your biggest OSDev frustrating moment?

Post by SpyderTL »

I knew someone would say something... :wink:

Even when using DMA and interrupts, you still have to check your FDC status registers before you can start reading the result status bytes to check for errors.
wiki wrote:Note: if you try to read the result bytes without waiting for RQM to set, then you are likely to always get an incorrect result value of 0. This is also likely to get your driver out of sync with the FDC for input/output.
However, in my case, I don't have much choice, since this is the code that is responsible for loading my interrupt handlers. (I probably should be using PIO mode, though...)
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: What's your biggest OSDev frustrating moment?

Post by Owen »

SpyderTL wrote:
wiki wrote:Note: if you try to read the result bytes without waiting for RQM to set, then you are likely to always get an incorrect result value of 0. This is also likely to get your driver out of sync with the FDC for input/output.
However, in my case, I don't have much choice, since this is the code that is responsible for loading my interrupt handlers. (I probably should be using PIO mode, though...)
There are two cases:
  • You're loading your kernel, in which case why are you messing with the hardware when you should be leaving this job to the BIOS (or UEFI), which presumably works on your hardware (because you've gotten this far)
  • You're writing a driver for your kernel, in which case you should be going for interrupt-driven DMA mode
In other words, whatever you're doing, it's probably wrong.

Cheers,
Not Brendan :wink:
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your biggest OSDev frustrating moment?

Post by SpyderTL »

I'm loading my Kernel, but I'm already in 32-bit protected mode... So that I can load stuff above 1 MB. And as I said earlier, I probably should be using PIO instead of DMA in the boot loader.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Octocontrabass
Member
Member
Posts: 5501
Joined: Mon Mar 25, 2013 7:01 pm

Re: What's your biggest OSDev frustrating moment?

Post by Octocontrabass »

SpyderTL wrote:I'm loading my Kernel, but I'm already in 32-bit protected mode... So that I can load stuff above 1 MB.
This sounds like a perfect job for unreal mode. (I'm assuming you're doing it this way because your kernel is too big to load the whole thing in conventional memory before switching to protected mode and moving it above 1MB.)
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What's your biggest OSDev frustrating moment?

Post by SpyderTL »

I could probably fit it all under 1MB. The whole .ISO is only 528K at the moment. But trying to find space under 1 MB to put the code, interrupt handlers, interrupt tables, descriptor tables, data buffers, memory maps, etc. while avoiding the reserved areas was becoming annoying. Switching to 32-bit before loading any data solved that problem, but it is a bit tricky to get everything in the right order and get it to work on most hardware. All of this will most likely be redesigned when I start redesigning my 64-bit version.

I fear we may have drifted off topic a bit...
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
User avatar
darkinsanity
Member
Member
Posts: 45
Joined: Wed Sep 17, 2008 3:59 am
Location: Germany

Re: What's your biggest OSDev frustrating moment?

Post by darkinsanity »

I recently worked on my threading-code and discovered that sometimes threads crashed when trying to access their stack. It turned out that I had a bug in my unmap-function which resulted in unmapping one page too much. So, when a thread exited, it's stack got unmapped, and if another stack was directly behind it, it got unmapped too which wasn't very fun for the belonging thread. This took me quite a while to find. Mainly because I didn't think that it would be something so simple and stupid.

Also, I once managed to put pagetables into the video memory.
Post Reply