OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Jun 16, 2019 1:30 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: What is your longest bug?
PostPosted: Fri Apr 28, 2017 3:14 pm 
Offline
Member
Member
User avatar

Joined: Sat Sep 17, 2016 2:14 am
Posts: 67
Location: Moscow, Russia
MSB4062 while compiling Thunder. Fixed it by running in the MSBuild Command Line. It took me a month to realise it.

_________________
I will be back... - Arnold Schwarzenegger
Code:
if tired = no then
code = yes
sleep = no
else
code = no
sleep = yes

P.S. my surname that you see is false, that's an English surname, I am actually Tim Ryazanoff


Top
 Profile  
 
 Post subject: Re: What is your longest bug?
PostPosted: Fri May 05, 2017 1:02 pm 
Offline
Member
Member
User avatar

Joined: Sun Nov 20, 2016 7:26 am
Posts: 155
Location: Somewhere
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.


Top
 Profile  
 
 Post subject: Re: What is your longest bug?
PostPosted: Fri May 05, 2017 3:01 pm 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 291
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.


Top
 Profile  
 
 Post subject: Re: What is your longest bug?
PostPosted: Mon May 08, 2017 9:21 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1053
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: SMB Network File Sharing
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott


Top
 Profile  
 
 Post subject: Re: What is your longest bug?
PostPosted: Mon May 08, 2017 3:48 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 07, 2015 6:13 am
Posts: 1022
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


Top
 Profile  
 
 Post subject: Re: What is your longest bug?
PostPosted: Tue May 09, 2017 6:31 pm 
Offline
Member
Member
User avatar

Joined: Sun Jul 14, 2013 6:01 pm
Posts: 442
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://gerigeri.uw.hu/DawnOS/index.html


Top
 Profile  
 
 Post subject: Re: What is your longest bug?
PostPosted: Wed May 10, 2017 3:09 am 
Offline
Member
Member
User avatar

Joined: Thu Sep 13, 2012 2:18 pm
Posts: 28
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/


Top
 Profile  
 
 Post subject: Re: What is your longest bug?
PostPosted: Thu May 11, 2017 11:16 pm 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 291
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group