What is your longest bug?

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.
User avatar
Thunderbirds747
Member
Member
Posts: 83
Joined: Sat Sep 17, 2016 2:14 am
Location: Moscow, Russia

Re: What is your longest bug?

Post by Thunderbirds747 »

MSB4062 while compiling Thunder. Fixed it by running in the MSBuild Command Line. It took me a month to realise it.
Coffee is not airplane fuel.
User avatar
Agola
Member
Member
Posts: 155
Joined: Sun Nov 20, 2016 7:26 am
Location: Somewhere

Re: What is your longest bug?

Post by Agola »

It was my multitasking and virtual memory management code. It took about 3 months to get it working good.
Keyboard not found!

Press F1 to run setup.
Press F2 to continue.
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: What is your longest bug?

Post by bzt »

I still have a bug, PIT (which supposed to switch tasks) stops firing after a couple times. My disable_irq() routine is not called, yet in bochs debugger I see IRQ0 masked in PIC after about 10 task switches. Doesn't matter how many task I start, it stops working at different task at different time. Very annoying, and I have no clue what's wrong. I don't think it's a race condition because in IRQ0's ISR I keep interrupt flag cleared all the time. I'm hunting this beast for months now.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: What is your longest bug?

Post by SpyderTL »

bzt wrote:I still have a bug, PIT (which supposed to switch tasks) stops firing after a couple times. My disable_irq() routine is not called, yet in bochs debugger I see IRQ0 masked in PIC after about 10 task switches. Doesn't matter how many task I start, it stops working at different task at different time. Very annoying, and I have no clue what's wrong. I don't think it's a race condition because in IRQ0's ISR I keep interrupt flag cleared all the time. I'm hunting this beast for months now.
It's time to start commenting out code one line at a time until it starts working :)

I'd guess that some CPU state isn't being saved/restored properly. Something like EFLAGS, or FPU state...
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
Octacone
Member
Member
Posts: 1138
Joined: Fri Aug 07, 2015 6:13 am

Re: What is your longest bug?

Post by Octacone »

Couple of them:
1. Tried to initialize a variable inside the header. 0xB8000 in this case, haven't had any output for days...
2. A broken keyboard translator, I was getting the right output but it was like this: h@e@l@l@o@@w@o@r@l@d@. What I did was remade the entire thing. Now it works like a charm.
3. IDT kept failing, everything was right except I forgot the alignment.
4. Physical memory bitmap: broken self written C++ library.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
User avatar
Geri
Member
Member
Posts: 442
Joined: Sun Jul 14, 2013 6:01 pm

Re: What is your longest bug?

Post by Geri »

i had several bugs lying in my codes, some of them, years without noticing it. here is a few funny examples:

1. one of my 3d software randomly killed winamp. yes. this was in the xp times. i was not nulled a pointer, and it had garbage sometimes. it went into an api call, which later turned out to make funny things, like killing other programs, or bsoding.

2. i had an unknown bug just discovered something before releasing one of my games. i had a few hours to hunt it down, and fix it. i was not succesfull. i discovered that inserting char donotcrash[100000]; to a specific point of code fixes the segfault, and i released it like that. this was in the xp times.

3. i had several bugs turned out to be in the libraries/apis/operating systems i used

4. i once had an argument with somebody about how sucks the antivirus programs are. to illustrate this, i downloaded a few virus example and windows kernel privilige escalation samples (most of them was more than 5 years old). i compiled them, and checked with 20 different antivirus software. NONE of them detected the virus.exe file i compiled. we reported it to antivirus corporations, and from that point up to 5 years ALL of my programs was falsely detected as viruses

5. and to be more on-topic, dawn os had 20-30 very long-living bugs, mostly in the C compiler. but i hunted them down all.

---------

the newest long living bug was in the CHS tuple disk reading mechanism in the bootable dawn emulator.
when i had to read a new block, i returned memory garbage due to the array was adressed with 0x80*512 instead of 2*512 (i forgot to restore disk id).i had to hunt it for 3 days.
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html
User avatar
Satoshi
Member
Member
Posts: 28
Joined: Thu Sep 13, 2012 2:18 pm

Re: What is your longest bug?

Post by Satoshi »

Couple of years ago I was solving bug in EXT2 driver for 3 weeks then I noticed documentation what I had was wrong.
Trinix (written in D) https://github.com/Rikarin/Trinix
Streaming OS development https://www.livecoding.tv/satoshi/
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: What is your longest bug?

Post by bzt »

SpyderT wrote:It's time to start commenting out code one line at a time until it starts working :)

I'd guess that some CPU state isn't being saved/restored properly. Something like EFLAGS, or FPU state...
Thanks for the suggestion!

I've already tried that. The CPU state (along with flags) are saved properly, and I don't use FPU at the moment. I've also tried commenting out portions of code (and used only dummy busy loops in threads), but the same. And interesting thing though, I've put a debug message in bochs when the IRQ0's mask changes in PIC, and it turned out it's constantly flip-flopping, even in a simple rep movsb cycle, without my irq_enable() / irq_disable() code being called.
Post Reply