Well.. well.. well.
It's not a bug, but definitely something funny..
While testing regular expressions in C, I was trying to get just the contents of the files in a directory ignoring the white spaces, and export the result in new files. That's good, but running something like this: "[\s](.*)" and exporting the results in files in the same directory you are "scanning" is a bad idea. Running it with sudo on the server where your website is hosted is even worse. Before you realize what's wrong you are going to be dropped from ssh, the cpu will be 100% and your disk will be busy. Feels like an internal DoS.
I used to work on a .net application which included both webforms and mvc projects. Once I added aspx view engine code in razor page. I still can't remember how could I do such a weird thing.
What the app was supposed to do is take in a series of files and link them together via a lookup table. The lookup table was stored in a database, but it was slow, so I decided to cache it. Unfortunately failed lookups would create a new entry in the table.
Even more unfortunately when that happened, the cache stored a different value to what ended up being written back to the database.
What made this bug particularly insidious is that because the actual values didn't really matter, just the fact that they linked up across a batch of files, it mostly worked. Except if a batch was imported across a longer period of time, and there happened to be a server reboot in the middle (forcing the cache to be re-created from the values in the database), things would go very wrong.
This went on for years without anybody being able to make the connection, so we could never reproduce it. It wasn't catastrophic but it was incredibly annoying.
Anyway, when a the tester finally provided a full description of the circumstances she encountered the error in, I bought her a huge box of chocolates. (And fixed the bug in less than 10 minutes.)
Yeah.
I wrote some code that had a setState in the render(). Function with the setState was hitting a client's service which was taken down within an hour after we released and we didn't realize that until the client told us!
On my shared hosting where I had few websties, I've created trypython where I executed commands on the server (using CGI) and I thought that I've secured the thing even that someone on StackOverflow said that it's not possible to sandbox standalone python. You couldn't directly import modules that execute shell commands or other modules that import it. I thought it was ok until someone wipe out whole disk for my account.
On my old old laptop I had Linux installed and I was running out of disk space on my root partition, the /home/ partition still have room so I moved /tmp directory to /home and created symlink in place of original directory. It was working fine but then I needed more space, so I moved /usr directory and while moving my whole installation was broken because commands could not find shared libraries /usr/lib, I was only able to use apps that where already running. I had broken CD and it was not possible to boot from USB and didn't have external drive to backup my data. I thought that machine was broken because it had non-SATA DVD drive and you could only buy new Sata DVD. Fortunately I had firefox running with fireFTP and connected, via WiFI, with ftp to my mother laptop, where I installed ftp server and backup all the data. Few years later I bought used DVD Drive that was working with that laptop and give it to my mother.
Thought I was being clever by creating an event on a static class (.NET). Forgetting that every request on the website resulted in a handler added, but never removed.
It took a while (several days) for the memory to fill up and the web application to crash.
I was on other stuff at the time they found out. Some people spent a lot of time finding and fixing that bug.
The worst part of it is I still clearly remembered the moment I "solved" the problem by creating an event on a static class. And all I wanted was to go back in time and tell myself: "careful Aaron ..."
Also had the classic run-away e-mail service mail a customer. I was driving home at the time so didn't realise until my boss called me. Luckily the receiver was OK with it. Also, I let my boss know through Skype chat "the problem with the thousands of e-mails to the customer is fixed" and it popped up while he was giving a presentation to more bosses. So they sent their congratulations.
Can't make an omelette without breaking a few eggs.
In my first job back in the mid 90’s I was working on a program that would send a fax to every contact in our database. I started the execution so that it would run overnight. The next day we got a very angry call from the first contact in the list. Their entire roll of fax paper was on the floor. They had received our fax repeatedly until running out of paper.
Upon reviewing my code, I discovered that I had forgotten the line of code that moves to the next record in the while-not-at-end loop.
Latest comments (96)
Well.. well.. well.
It's not a bug, but definitely something funny..
While testing regular expressions in C, I was trying to get just the contents of the files in a directory ignoring the white spaces, and export the result in new files. That's good, but running something like this: "[\s](.*)" and exporting the results in files in the same directory you are "scanning" is a bad idea. Running it with sudo on the server where your website is hosted is even worse. Before you realize what's wrong you are going to be dropped from ssh, the cpu will be 100% and your disk will be busy. Feels like an internal DoS.
😱😱 Same!! It was on production for a few mins before I fixed it

well this is the shitiest bug i have ever come across youtube.com/watch?v=YTr4rFzAwBQ
I used to work on a .net application which included both webforms and mvc projects. Once I added aspx view engine code in razor page. I still can't remember how could I do such a weird thing.
What the app was supposed to do is take in a series of files and link them together via a lookup table. The lookup table was stored in a database, but it was slow, so I decided to cache it. Unfortunately failed lookups would create a new entry in the table.
Even more unfortunately when that happened, the cache stored a different value to what ended up being written back to the database.
What made this bug particularly insidious is that because the actual values didn't really matter, just the fact that they linked up across a batch of files, it mostly worked. Except if a batch was imported across a longer period of time, and there happened to be a server reboot in the middle (forcing the cache to be re-created from the values in the database), things would go very wrong.
This went on for years without anybody being able to make the connection, so we could never reproduce it. It wasn't catastrophic but it was incredibly annoying.
Anyway, when a the tester finally provided a full description of the circumstances she encountered the error in, I bought her a huge box of chocolates. (And fixed the bug in less than 10 minutes.)
Yeah.
I wrote some code that had a
setState
in therender()
. Function with thesetState
was hitting a client's service which was taken down within an hour after we released and we didn't realize that until the client told us!Not the worst, but was definitely silly!
My first year in my career...
On a production server with 100+ clients on it. I focused on front-end earlier in my career because of that mistake.
I have two stories:
On my shared hosting where I had few websties, I've created trypython where I executed commands on the server (using CGI) and I thought that I've secured the thing even that someone on StackOverflow said that it's not possible to sandbox standalone python. You couldn't directly import modules that execute shell commands or other modules that import it. I thought it was ok until someone wipe out whole disk for my account.
On my old old laptop I had Linux installed and I was running out of disk space on my root partition, the /home/ partition still have room so I moved /tmp directory to /home and created symlink in place of original directory. It was working fine but then I needed more space, so I moved /usr directory and while moving my whole installation was broken because commands could not find shared libraries /usr/lib, I was only able to use apps that where already running. I had broken CD and it was not possible to boot from USB and didn't have external drive to backup my data. I thought that machine was broken because it had non-SATA DVD drive and you could only buy new Sata DVD. Fortunately I had firefox running with fireFTP and connected, via WiFI, with ftp to my mother laptop, where I installed ftp server and backup all the data. Few years later I bought used DVD Drive that was working with that laptop and give it to my mother.
Thought I was being clever by creating an event on a static class (.NET). Forgetting that every request on the website resulted in a handler added, but never removed.
It took a while (several days) for the memory to fill up and the web application to crash.
I was on other stuff at the time they found out. Some people spent a lot of time finding and fixing that bug.
The worst part of it is I still clearly remembered the moment I "solved" the problem by creating an event on a static class. And all I wanted was to go back in time and tell myself: "careful Aaron ..."
Also had the classic run-away e-mail service mail a customer. I was driving home at the time so didn't realise until my boss called me. Luckily the receiver was OK with it. Also, I let my boss know through Skype chat "the problem with the thousands of e-mails to the customer is fixed" and it popped up while he was giving a presentation to more bosses. So they sent their congratulations.
Can't make an omelette without breaking a few eggs.
In my first job back in the mid 90’s I was working on a program that would send a fax to every contact in our database. I started the execution so that it would run overnight. The next day we got a very angry call from the first contact in the list. Their entire roll of fax paper was on the floor. They had received our fax repeatedly until running out of paper.
Upon reviewing my code, I discovered that I had forgotten the line of code that moves to the next record in the while-not-at-end loop.