Skip to main content
GameDev.net gamedev.net
🔒 Locked

Note to self

Started by Sik_the_hedgehog Feb 9, 2016 at 6:49 PM 15 replies 4.9k views
Original Post
Sik_the_hedgehog
Sik_the_hedgehog

Don't erase your whole filesystem. Especially not when the back-up drive is mounted.

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
Oberon_Command
Oberon_Command
Well, yes, you're only supposed to delete System32.
xycsoscyx
xycsoscyx

Fortunately we had good QA at a previous job, but once I was using SHDeleteFile and apparently instead of deleting a specific directory, I was deleting EVERY directory!

DELETE ALL THE DIRECTORIES!!!!

QA noticed it during install once Windows started throwing up errors. Apparently not all critical files are locked at all times, but when it needs them and they aren't there then it's not a good thing. XD

frob
frob




Apparently not all critical files are locked at all times, but when it needs them and they aren't there then it's not a good thing.

Reminds me of a fun bug on a game uninstaller.

It went something like this:

Get into the game. In the middle of play, pause the game, alt-tab out of the game. Run the uninstall program. On the prompts hit "yes", "yes", "Ignore warning", "Remove Anyway". Hit "Ignore" on the warnings that appear. Alt-tab back into the game. Resume from pause. When you leave the scene or do anything triggering a disk load, the game crashes.

We decided to KS the bug. (KS = Known Shippable, we aren't going to fix it.)

Sik_the_hedgehog
Sik_the_hedgehog

Pff.

You're supposed to crawl the LAN for open file shares and delete everything on there, too.

Noob.


The only reason that didn't happen is because I don't have a LAN here. The rogue script started scaling up directories until it became basically rm -rf /* (ouch)

I'm never again going to automate cleanup, I swear -_-;
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
Bacterius
Bacterius

Fortunately we had good QA at a previous job, but once I was using SHDeleteFile and apparently instead of deleting a specific directory, I was deleting EVERY directory!

DELETE ALL THE DIRECTORIES!!!!

QA noticed it during install once Windows started throwing up errors. Apparently not all critical files are locked at all times, but when it needs them and they aren't there then it's not a good thing. XD

Good thing QA "noticed" it laugh.png

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”
aeroKittens
aeroKittens

X: Disable the TRIM command on Windows, at least SSD files will be recoverable at the expense of grade performance and writing speedcool.png

can't help being grumpy... Just need to let some steam out, so my head doesn't explode... 
Sik_the_hedgehog
Sik_the_hedgehog


I'm never again going to automate cleanup, I swear ;


Nah, it's OK if you just have a manifest of file names, no wildcards or recursive deletes...
Not that good an option when what you're cleaning up has a file structure about as complex as your game assets x_x; (is it any wonder why I'd do cleanup before backing up?)
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
xycsoscyx
xycsoscyx




Good thing QA "noticed" it

Well they noticed that uninstall was taking a lot longer than usual, but they kept just reverting to snapshots so it took a little while to actually realize what was happening. XD

What that really means is that I obviously didn't test that change out myself or my dev box would have been bricked. Note to self, don't test stuff or you may end up bricking your dev box!

Sik_the_hedgehog
Sik_the_hedgehog
You know, decided to read this one:

If you deleted the filesystem without bricking the machine then you're just a newbie: https://github.com/systemd/systemd/issues/2402

Huh, wow. Why the heck are firmware variables writable by a non-privileged user? And why the fuck are there people who insist this is a good idea?!
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
Brain
Brain

You know, decided to read this one:

If you deleted the filesystem without bricking the machine then you're just a newbie: https://github.com/systemd/systemd/issues/2402

Huh, wow. Why the heck are firmware variables writable by a non-privileged user? And why the fuck are there people who insist this is a good idea?!

The variables are only writable by root, a privileged user. I think the argument is that this should be restricted to a level above root where a concious decision must be made to put the device into firmware mode of sorts. E.g. you usually have to do something special to the os or bios to prepare to flash it...
Sik_the_hedgehog
Sik_the_hedgehog
Nope, that has been argued in that thread already, it's not mounted as writable only by root, even though the commands that would need to be able to write to it could easily justify demanding root privileges. It seems that they want to be able to reboot into the EFI settings menu... ok I don't even understand the logic here.

But the problem is that you can brick your system without root privileges it seems. And that the argument to defend this is that the brickable systems don't conform to the standard. Dunno, even if it didn't brick the machine I'd think you don't want a typo'd command to mess with the system settings in the first place.
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
Sik_the_hedgehog
Sik_the_hedgehog

...and I just got over 100GB worth of data undeleted it seems? Just how long is EXT4's journal?

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.
dsm1891
dsm1891

I almost deleted all .png's from my C drive once. That was a scary day at work. :)

Mobile Developer at PawPrint Games ltd. (Not "mobile" as in I move around a lot, but as in phones, mobile phone developer) (Although I am mobile. no, not as in a babies mobile, I move from place to place) (Not "place" as in fish, but location.)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.