How A Steam Bug Deleted Someone’s Entire PC

  Рет қаралды 881,800

Kevin Fang

Kevin Fang

Күн бұрын

A deeper look into a steam-for-linux GitHub issue (github.com/valvesoftware/stea...) investigating how a steam script was able to delete the entire contents of someone's root directory. While the direct cause of the rm -rf is fairly obvious, how it was triggered in the original bug report is not, and may forever remain a mystery...
Sources:
www.opensuse-forum.de/thread/... (buggy copy of steam.sh posted by "Acies")
wiki.archlinux.org/title/steam
Chapters:
0:00 Intro
0:26 Steam on Linux
1:40 The Bug
2:58 STEAMROOT
6:04 reset_steam()
8:11 Valve theory
9:21 My "theory"
10:34 Fix
Corrections:
- At 0:56 the descriptions for /bin and /usr/bin are historically correct, but on modern Linux distributions (e.g. beginning in Ubuntu 19.04), /bin is replaced with a symlink to /usr/bin (in a transition called "merged /usr" or "/usr merge") so both contain the same contents.
Music:
- We Shop Song by Philip Milman
- Blue Mood by Robert Munzinger
- Aloft by LEMMiNO ( • LEMMiNO - Aloft (BGM) )
- Firecracker by LEMMiNO ( • LEMMiNO - Firecracker ... )
- Cool Vibes by Kevin MacLeod
- Financial Obligations by Philip Milman

Пікірлер: 1 900
@aperture147
@aperture147 4 ай бұрын
"# Scary" is my new fear.
@kazii_the_avali
@kazii_the_avali 4 ай бұрын
same.
@Mitch-xo1rd
@Mitch-xo1rd 4 ай бұрын
If you know it is bad enough for a code comment, why use it????
@grayman2749
@grayman2749 4 ай бұрын
@@Mitch-xo1rd Diversity hiring.
@diabolo1809
@diabolo1809 4 ай бұрын
They probably didn't have the authority to change it so they just commented it and hoped someone would notice and change it themselves. @@Mitch-xo1rd
@summerchilds
@summerchilds 4 ай бұрын
@@grayman2749 the fuck
@XxRedRocket15xX
@XxRedRocket15xX 4 ай бұрын
I love how the bug nuked the backup drive for good measure.
@309electronics5
@309electronics5 4 ай бұрын
Yep. Linux just deleted itself and the data on the mounted drive 😂🤦. They should have put a safety mechanism so when you execute it it wont delete the whole os but will error out unless you provide --no-preserve-root
@TheMrMaxx
@TheMrMaxx 4 ай бұрын
When rm -rf / deletes your backup, the backup strategy was very poor
@ebux9885
@ebux9885 3 ай бұрын
@@TheMrMaxx It deleted /mnt (or /media)
@DistrosProjects
@DistrosProjects 3 ай бұрын
@@309electronics5-no-preserve-root only works when the command is rm -rf /, not if its rm -rf /*.
@greggoog7559
@greggoog7559 2 ай бұрын
Exactly. None of my TWO physically independent and far-apart backup devices are EVER mounted EXCEPT during the feckin backup.
@williamdrum9899
@williamdrum9899 4 ай бұрын
This is the programming equivalent of leaving a loaded gun on the floor and wondering how your dog died
@flameofthephoenix8395
@flameofthephoenix8395 4 ай бұрын
Still don't understand, I mean like I let the dog into the house, and boom, he just disappeared into this weird mushy pile. I guess I should've known better than to let him into the house for the first time, figures he'd find some way to kill himself with no past experience in a house before to guide him different.
@orppranator5230
@orppranator5230 3 ай бұрын
Dog has no opposable thumbs, and doesn’t know how to turn the safety off
@davidphillips5677
@davidphillips5677 2 ай бұрын
@@orppranator5230 no the dog can use it's teeth
@xFlRSTx
@xFlRSTx 2 ай бұрын
​@@flameofthephoenix8395 >are you sure you want to____ yourself (🐾/🐾)? >🐾
@gabrielandy9272
@gabrielandy9272 2 ай бұрын
@@orppranator5230 don't doubt physics and bad lucky, you will be amazed at how many crazy bad lucky some stuff can get, some people got hit for a whell in the most weird places you can think off, im pretty sure somehow pushing the wall or something or whatever the dog could by mistake trigger all this.
@axelaguilar6437
@axelaguilar6437 4 ай бұрын
"Everything is impermanent and transient. Especially bits on a disk. No use crying over flipped bits." I want to be like keyvin
@3rdalbum
@3rdalbum 3 ай бұрын
This data will be lost, like tears in the rain
@superplaylists1616
@superplaylists1616 3 ай бұрын
From now on I will just assume my data will eventually be leaked and my files eventually deleted. Let us all be like keyvin. 😔
@NikoTheFox
@NikoTheFox 4 ай бұрын
Installing Steam on Linux just for it to delete everything sure sounds familiar
@tanmaypatel3291
@tanmaypatel3291 4 ай бұрын
😂😂😂Linus lmao
@beanietechie
@beanietechie 4 ай бұрын
i mean that was specifically a misconfiguration on pop!_os and even then it literally said on the screen that it would likely break the system and literally has you type something like "Yes, break my system." before it lets you perform the action
@buysnoah
@buysnoah 4 ай бұрын
Ok​@@beanietechie
@unixlonix
@unixlonix 4 ай бұрын
​@beanietechie its bad design, the error should have been red in the terminal
@sealdoggy8785
@sealdoggy8785 4 ай бұрын
@@unixlonix if you have to type out a whole sentence to do a command that should be a good enough sign to pay attention to what you're doing
@AQDuck
@AQDuck 4 ай бұрын
Whenever "root" is mentioned in a "bug" video, you know exactly what's up
@sametekiz3709
@sametekiz3709 4 ай бұрын
yep
@levitatingbusinessman2560
@levitatingbusinessman2560 4 ай бұрын
sure buddy
@narrativeless404
@narrativeless404 4 ай бұрын
"root" = rm -rf
@yangpaan453
@yangpaan453 4 ай бұрын
no i dont, because roots to me are the things that suck up nutrients from the ground for plants.. not everyone "knows whats up" when it comes to pc stuff
@yangpaan453
@yangpaan453 4 ай бұрын
sure but you cant just erase things in real life so that analogy made no sense. and if tree roots get damaged they regrow them.@@gaelurquiz5755
@ThatComputerGuyRyan
@ThatComputerGuyRyan 4 ай бұрын
Imagine being Valve, one of the most well-known software companies that builds and maintains Steam, writing a launcher for Linux that invokes rm -rf with no safeguards. Invoking the command at all is seriously risky. Who in their right mind would look at that line of code and just say "Scary" and allow it to be part of the script?
@mr.cauliflower3536
@mr.cauliflower3536 4 ай бұрын
Someone who doesn't know/care/get paid enough to fix/check it themselves. I think I could see myself being an intern and doing that, then going to a higher up and saying "hey, this is scary, you should probably find a better way to do this" and never following up on it.
@berbtheherb
@berbtheherb 4 ай бұрын
Some real Adeptus Mechanicus stuff
@outerfuel
@outerfuel 4 ай бұрын
The developer was an honest person and practiced the scripture they were taught. Saying as they committed, "Forgive me father for I have sinned." Then left us a hieroglyph. # Scary
@SuprSBG
@SuprSBG 4 ай бұрын
Probably the 4 Linux programmers there /s
@eliontheinternet3298
@eliontheinternet3298 4 ай бұрын
Someone on a deadline probably
@Knowbody42
@Knowbody42 4 ай бұрын
There was an Nvidia driver bug that did the same thing once. It was caused by them accidentally adding a space in the delete command.
@commander3494
@commander3494 4 ай бұрын
Nvidia (linux) drivers and breaking things, name a better duo
@evi-vw
@evi-vw 4 ай бұрын
@@commander3494 I been using Linux for 17 years and exclusively nvidia. I never seen any problems that people constantly talked about with nvidia drivers. I am starting to think it's a myth or just some serious user error.
@ggsap
@ggsap 4 ай бұрын
No, it was a third party tool called Bumblebee which was like nvidia optimus
@blitzkringe
@blitzkringe 4 ай бұрын
Deleting /usr is nothing compared to deleting the whole user data. At worst (if you don't use btrfs snapshots or a similar solution) it's just an hour to reinstall your system, and you're done.
@Nocommentsuwu
@Nocommentsuwu 4 ай бұрын
DON'T USE NVIDIA WITH LINUX, YOU WILL HAVE PAIN IN THE ASS, BUY FUCK AMD GPU AND ENJOY YOUR DAY
@kirkanos771
@kirkanos771 4 ай бұрын
In the 90s, when Diablo had an extension called Hellfire, made by Sierra, the uninstaller of the extension was deleting everything in C:\Games\ instead of C:\Games\Sierra Online\. Too bad for those who installed in Program Files at the time.
@Doc_Fun
@Doc_Fun 4 ай бұрын
That is such a 90's sierra move honestly. Wasn't enough to bust my balls with their point and click games, now they gotta wipe my games folder for daring to uninstall their bad diablo addon.
@vdmir40
@vdmir40 4 ай бұрын
as someone who installed 120+ gigabytes of games in C:\Games im terrified
@subzero0000
@subzero0000 4 ай бұрын
😂
@uponeric36
@uponeric36 4 ай бұрын
This is why you never use uninstall scripts and just delete the entire folder directly.
@xFlRSTx
@xFlRSTx 4 ай бұрын
@@uponeric36 there are often other folders you aren't aware of that you miss doing that.
@ojmbvids
@ojmbvids 4 ай бұрын
Wow! I can't believe they'd script something like that with an rm -rf. It clearly rang alarm bells from the comment. How did this get through code review without someone shouting NOPE!
@GammaFn.
@GammaFn. 4 ай бұрын
The desired behavior is to remove everything under $STEAMROOT without user intervention. 'rm -rf' is the correct choice. I struggle to see what solution you would choose instead. The problem here is that there was no sanity check on $STEAMROOT.
@skun406
@skun406 4 ай бұрын
Well, there was a "Scary!" comment so it was kinda ok-ish 🤣🤡
@ronsmith4325
@ronsmith4325 4 ай бұрын
To me, this says there is no code review process at all. Lol.
@not_ever
@not_ever 4 ай бұрын
There has to be a code review for something to get through code review
@solitudesf8111
@solitudesf8111 4 ай бұрын
steam is dogshit
@Yardomaster
@Yardomaster 4 ай бұрын
I like the theory, because it explains why Keyvin was so calm and collected; he didn't have much to lose if he just built the PC.
@jeuonly3474
@jeuonly3474 4 ай бұрын
he still said it wiped his whole external storage tho
@Yardomaster
@Yardomaster 4 ай бұрын
@@jeuonly3474 True, for some reason I thought that was a separate incident with someone else. The external drive could have been part of the new setup as well. Or maybe Keyvin just took it like a champ.
@christophsiebert1213
@christophsiebert1213 4 ай бұрын
No matter how, having your whole setup deleted is... scary
@jackspedicy2711
@jackspedicy2711 4 ай бұрын
Accidental bad code deletes external hard drive with your entire lifes photos, movies and films, and even photos digitized photos of your grandmother from 80 years ago... but... the person who made the code was broblably really happy about that paycheck, so y'know, whatever
@da_pwo
@da_pwo 4 ай бұрын
@@jackspedicy2711people usually backup those files, and there’s plenty of data recovery software that works because computers just mark a file space as empty so the programs just search for the files
@kingcowt1299
@kingcowt1299 4 ай бұрын
“Scary!” Good one, Valve!
@jaixial
@jaixial 4 ай бұрын
If you find yourself pushing a comment to production that says #scary! - Maybe you are doing it wrong.
@agsystems8220
@agsystems8220 4 ай бұрын
It looks like a junior programmers way of writing "this is what I want, this should not pass review, but they can tell me how I should do it"... And it passes review... I have no problem with the code. It's the reviewers that didn't do their job.
@oracle372
@oracle372 4 ай бұрын
@@agsystems8220 Or someone coded that in and someone else added # Scary as a note assuming it’d be altered later… (it wasn’t)
@SethAbercromby
@SethAbercromby 4 ай бұрын
"This is a spooky way of doing it, but it shouldn't trigger under normal conditions." - Famous last words of any software engineer. It's easy to backseat these kinds of things with the power of hindsight or as a solo developer on small projects, but in a turbulent development environment where tasks are juggled by many people, shortcuts and temporary solutions become extremely common.
@professorhaystacks6606
@professorhaystacks6606 4 ай бұрын
"TODO: FIX THIS!!! -2/5/68"
@joseaca1010
@joseaca1010 4 ай бұрын
Look up "the rapidly dwindling sanity of valve programmers as expressed through code comments" This isnt even their worst code spaghetti
@cheeky6930
@cheeky6930 4 ай бұрын
Dude you have seriously found your niche with this type of content, covering software failures in a funny and digestible way. Love watching your videos.
@Saismee
@Saismee 4 ай бұрын
exactly my thoughts. always a good day when he posts
@ponyride23
@ponyride23 4 ай бұрын
And this was so desperately needed by many of us!
@MrMousedroppings
@MrMousedroppings 4 ай бұрын
Totally agree, it's so well done and interesting
@ravxen
@ravxen 4 ай бұрын
I just discovered this video and within the intro I was hooked and decided to stick around! :D
@John-vu5qm
@John-vu5qm 4 ай бұрын
fireship copycat
@naidr0x
@naidr0x 4 ай бұрын
It's outrageous that someone put a "Scary!" comment but never bothered to implement any safety measures. If you feel like doing the former, the latter should be out of the question.
@zoss0
@zoss0 4 ай бұрын
I like potential in this series. Especially how you go over seemingly simple things like the Linux filesystem for the people who are new or curious, keep that in there.
@jm-alan
@jm-alan 4 ай бұрын
Correctly referencing relative directories is one of the greatest struggles with shell scripts. It's why so often simple install scripts are still written Python or even C, just to have access to the OS tools to reliably tell you where you are.
@KucheKlizma
@KucheKlizma 4 ай бұрын
Relative directories are neither correct nor reliable, they are relative. C and Python are more than capable tools and can just as easily be used to produce equivalent bugs.
@pokestarfan5336
@pokestarfan5336 4 ай бұрын
@@KucheKlizmaThr unique part of Python is that if something doesn’t work it’ll usually throw an exception by default. Usually Python functions also have documentation noting any footguns as well, whereas I learn most Bash things off of StackOverlow with the footgun warning buried under 15 comments
@max06de
@max06de 4 ай бұрын
Bash has global options (like the mentioned set -o pipefail, or set -e) that also make the interpreter fall on its back if an unhandled return code (not 0) appears somewhere. It's just people not knowing them...
@pokestarfan5336
@pokestarfan5336 4 ай бұрын
@@max06de it’s not default, and there’s the problem. Many many people won’t change the defaults. If by default Bash scripts crashed when a command failed and the error wasn’t handled, I bet we wouldn’t see this type of error at all
@lePoMo
@lePoMo 4 ай бұрын
​​​@@max06de the problem is not if it is possible by a knowledgeable person, but what comes out if an unknowing person writes a bash script. (shell) scripting languages are meant to be convenient, with lots of shortcuts/magic syntax. This is making the risky thing easy, and the rigorous thing posible. a (more) regular programming language has more overhead, by basically not offering the easy but risky way. I've accidentally deleted files with bash because i didn't think about directories with a space in their name. Not because you can't handle those, but because i wrote a one-liner with lots of pipes and awk and xargs and didn't think it through. (worked fine until a dir had a space).
@richardkapowsky6073
@richardkapowsky6073 4 ай бұрын
What gets me is someone wrote this code, looked at it, knew it would be a problem so they commented # Scary, did nothing to fix it, and will you look at that.... It ended up being a problem.
@gavinrolls1054
@gavinrolls1054 2 ай бұрын
more like the code reviewers didn't fix it
@rudinah8547
@rudinah8547 4 ай бұрын
Your stuff is so good! Love how you always spend some portion at a really low level, like explaining bash scripting minute details, but keep it high level too
@neskey
@neskey 4 ай бұрын
I love these videos. people always say that code looks dull on video but I never understood that. code can have as much expression as any written work. just that you need to know how to frame it the right way. thanks for the vids Kevin!
@jee213_
@jee213_ 4 ай бұрын
Steam really just said “Go touch Grass”
@sandwich5344
@sandwich5344 4 ай бұрын
I dont think you can `touch grass` it'll throw an error
@dmitriyrasskazov8858
@dmitriyrasskazov8858 4 ай бұрын
@@sandwich5344 just tried, $ touch grass worked for me
@_aurora60
@_aurora60 4 ай бұрын
@@sandwich5344actually `touch grass` creates an empty file called “grass”, no error whatsoever:)
@Grocel512
@Grocel512 4 ай бұрын
@@sandwich5344 It will create an empty file called "grass" in the working directory.
@Mempler
@Mempler 4 ай бұрын
​@@sandwich5344shutup and take my `cat grass`
@nodrance
@nodrance 4 ай бұрын
this is horrifying. Like wtf. The "only one person has gotten this issue in a few years so we can safely mark it resolved" reads like a horror movie where someone sacrifices lives for selfish reasons. What about the dozens of people who never made a comment/issue (r didn't know where to) and just took the loss, or went AFK when it happened and didn't realize it was steam that did it? This is frankly disturbing and steam should really do better.
@c1nquedea47
@c1nquedea47 4 ай бұрын
but what can they do about it at this point besides fixing the problem
@vulpzin
@vulpzin 4 ай бұрын
How do we even know if they aren't even lying?
@nolram
@nolram 4 ай бұрын
They provided no evidence nor further info… so not much one can do
@tacokoneko
@tacokoneko 4 ай бұрын
i have been using GNU/Linux and steam for 12 years but this didn't happen to me and i didn't previously know about it. when 3:07 appeared on my screen i immediately felt sick. everything that happens after that is watching a train wreck in slow motion. that code isn't just "scary" , it's a live land mine that something will always set off eventually
@vilian9185
@vilian9185 4 ай бұрын
btw it was how steam did it, so they do better now
@earthling_parth
@earthling_parth 4 ай бұрын
This is just the right amount of horror mixed in with some hilarious scripting gotcha's. Please make this series a regular, I don't care where you get your issues/blog posts/articles, I need this in my life ❤
@bryangichuru9
@bryangichuru9 4 ай бұрын
This has been my favourite KZbin channel for some time now. The thought of writing a bug that may end up on one of these videos keeps me writing good code everyday.
@Andrew-zg7nh
@Andrew-zg7nh 4 ай бұрын
"this is very far fetched but technically possible" many situations in work atm
@temkin9298
@temkin9298 4 ай бұрын
Experts: This is fool proof Bored people locked in a closed space: Are you sure about that? Example: One military before ww2 issued a rifle which had a barrel that had the same size as the bayonet base. Days later almost all rifles were connected barrel to bayonet, resulting in engineers complaining and demanding the rifle be withdrawn. If the plans doesn't survive encounter with the enemy, then fool proof tools doesn't survive the encounter with a person in closed space.
@aesthesia5023
@aesthesia5023 4 ай бұрын
Devs please stop using rm -rf with variable paths
@jonasdatlas4668
@jonasdatlas4668 4 ай бұрын
yes like that’s terrifying
@zombie_pigdragon
@zombie_pigdragon 4 ай бұрын
It's that easy!
@Spiderfffun
@Spiderfffun 4 ай бұрын
sudo rm -rf / whoopsies, not what i meant to do
@lost4468yt
@lost4468yt 4 ай бұрын
Hey bud, sometimes they just straight up hardcode it to delete a root directory.
@jeanlasalle2351
@jeanlasalle2351 4 ай бұрын
However, always ensure that you remove the unnecessary french translations with "rm -fr /*"
@dedusmuln
@dedusmuln 4 ай бұрын
sooo thankful for your channel man. all your videos are about topics i'm super interested in but theyre so easily digestible and visually fun 😊 quite the standout in videos of this caliber! keep up the good work, i hope your channel brings you good returns for all youve shared with us ☺️
@Alex-jk2qy
@Alex-jk2qy 4 ай бұрын
Love the Lemmino vibe, this is such a great video! Amazing stuff, never seen anyone else do anything similar, keep it up!
@GodDamnitTwitch
@GodDamnitTwitch 4 ай бұрын
that one poor Ubuntu user a few years ago who came across this bug. God help them they got everything sorted. I'd be going mad in that situation.
@Lurch-Bot
@Lurch-Bot 4 ай бұрын
Accidentally deleted the Ubuntu drive on my dual boot laptop from Windows (shouldn't be able to do that in the first place, thank you Microsuck). That made me mad. Luckily, it was a new installation. Steam deleting the entire contents of my hard drive would make me furious and bloodthirsty. I was all set to try gaming on Linux this year but now I am having second thoughts, especially since I am going to be using my Linux machine to take a cybersec course and will likely have projects and stuff on it. Not that I don't back up important files but I don't need to have to reinstall everything randomly some time when I need to do work.
@silicalnz
@silicalnz 4 ай бұрын
Just blackbox steam on a partition it cant escape from. Its not good for productivity for steam to be on a work system anyway. haha
@futuza
@futuza 4 ай бұрын
​@@Lurch-Botjust make sure to not give steam any permissions outside of the directory it's supposed to be in, treat it like malware and you should be safe
@bartek1887
@bartek1887 4 ай бұрын
@@Lurch-Bot This isn't really a bug that can only happen on Linux, since this was just deleting the wrong folder, which has happened on windows before (for example the Minecraft Dungeons uninstaller used to delete the parent folder instead of where its installed, so if you had it installed in C:\Program Files\Minecraft Dungeons it would delete C:\Program Files). Nowadays this is actually less likely to happen since in order to rm -rf / you need to also add --no-preserve-root
@JackPorter
@JackPorter 4 ай бұрын
i'm almost certain "that one poor user" was trolling. no info or proof, just trying to scare steam out of using batch.
@qlum
@qlum 4 ай бұрын
The problem with shell scripts is not that they cannot be safe, it's also not that they will cause issues. It is however very easy to make these type of errors. Far more so than in other languages.
@DaCoolX
@DaCoolX Ай бұрын
There is something called unofficial bash strict mode(internet search is your friend) which I extensively use and encourage anyone writing bash scripts to use as-well.
@qlum
@qlum Ай бұрын
Looked it up, sure that helps make it a bit less risky as well as always using shellcheck, but shell scripts are still relatively unsafe.
@poka26ev2
@poka26ev2 11 күн бұрын
I use MacOS (the older
@poka26ev2
@poka26ev2 11 күн бұрын
wtf, if youtube disabled links, why did it detect ".zip" as a link 💀
@ripplerxeon
@ripplerxeon 4 ай бұрын
I liked how you explained and Subbed Immediately. It tell me how much you have put a lot of effort into making one. Thank you for the video and would love , if the series continues.
@ic6406
@ic6406 4 ай бұрын
I like these series about a tiny piece of code that damaged a lot with a detailed explanation of what gone wrong. Keep going, subbed
@Stealth86651
@Stealth86651 4 ай бұрын
Man, I'm so glad you made this channel/make this content. I had an idea like this ages ago, a channel that went over software bugs/issues in business but am neither creative nor smart enough to put stuff like that together. Funny that you're channel pops up and is basically exactly what I was looking for, thanks for that.
@dexterrity
@dexterrity 4 ай бұрын
I had this idea today for a global fleet of airships that rise above clouds and ride jet streams across the world. They use wind and sun energy to produce and store hydrogen fuel, and then transport it to major hubs for further distribution. But I prob can't pull it off so I'll just leave the idea here in this comment.
@JorgetePanete
@JorgetePanete 4 ай бұрын
your*
@somethingpeculiarthistime
@somethingpeculiarthistime 4 ай бұрын
These are so damn well made, nice work dude!
@3rdalbum
@3rdalbum 4 ай бұрын
My helpdesk system (that I mentioned in a comment last video) has an archiving system. Any ticket that was closed more than 30 days ago is archived in a different Sharepoint location and deleted from the main list. Because your channel makes me careful with my code, I implemented a check that the ticket existed in the archive before deleting it from the main ticket list. Due to race conditions caused by operating in the cloud, this didnt consistently work; the check might fail because the archive will not show the new item for up to 30 seconds. So instead I set up an email notification when tickets are added to the archive, and also when deleted from the main ticket list, and I check them manually that both operations worked. This actually helped me find an instance where somebody deleted a ticket from the main list, so this was probably the correct course of action, lol. My point is: If the employee who wrote the Steam shell script watched your videos, they probably would have diligently tried to avoid this bug, just like I did in my helpdesk software!
@adamantii
@adamantii 4 ай бұрын
This is one of my favorite channels, I love the topics and the presentation
@kangalio
@kangalio Ай бұрын
Shell as programming language was a mistake
@mixorin
@mixorin 4 ай бұрын
New fear unlocked
@FAB1150
@FAB1150 4 ай бұрын
Every time a video of yours pops up I feel the urge to binge-watch, only to realize I have already done so when the previous video released
@notjoemartinez4438
@notjoemartinez4438 4 ай бұрын
Windows users will never understand having the freedom to wipe your filesystem with a typo
@williamdrum9899
@williamdrum9899 4 ай бұрын
The Virgin Delete System32 The Chad rm -rf / The Thad Commodore PET Killer Poke
@futuza
@futuza 4 ай бұрын
I mean powershell can still do this...
@riddixdan5572
@riddixdan5572 4 ай бұрын
Awesome content, learned a lot and hoping for more in less than 10 years
@anybody3689
@anybody3689 4 ай бұрын
I've been joking around how rm -rf / is (pretty much) the equivalent of removing system 32 or whatever on Windows. Now knowing that this managed to be an actual thing on a legit piece of software is just as hilarious as scary
@ouroya
@ouroya 4 ай бұрын
glad to see one of my favorite bugs covered!!!
@MrAstroKind
@MrAstroKind 4 ай бұрын
Love this series Kevin, keep it up! :)
@meeskees702
@meeskees702 4 ай бұрын
Can’t wait to see more of this series!
@MrDaAsif
@MrDaAsif 4 ай бұрын
"but he didn't provide any details so we can mark this issue as resolved" ah yes, the "if I cannot observe a bug it is not there"
@erikkonstas
@erikkonstas 4 ай бұрын
So... what brings you to this channel? Surely not your inexperience as a dev, which makes you throw excrement without explanation and expect a real answer...
@MrDaAsif
@MrDaAsif 4 ай бұрын
@@erikkonstas what are you talking about? Did you respond to the wrong comment? I'm so confused lol
@GDNachoo
@GDNachoo 3 ай бұрын
I mean, if that seriously was something that happened they'd have to open a new issue or provide details, there's not much anyone can do otherwise lol, plus it's one guy in several years, there's a good chance they're just lying too
@dariusduesentrieb
@dariusduesentrieb 4 ай бұрын
You often can recover rm -rf data, though it is more likely to work on harddrives than on ssds. The first thing to do in such a case is to clone the entire disc using dd rescue. Then one can use proprietary tools to recover the deleted files. Though a good first start may be testdisk and photorec which are totally free.
@TimeLemur6
@TimeLemur6 4 ай бұрын
True, but it depends on how long the system's been running like that, and how much you care.
@kuroenekodemon
@kuroenekodemon 3 ай бұрын
So how to you recover it when you nuke root? Isn't the kernel completely destroyed after that?
@dariusduesentrieb
@dariusduesentrieb 3 ай бұрын
@@kuroenekodemonYou can boot another OS from a USB stick, and from there you use tools like photorec to recover files from the disk you deleted files from. The files are usually still there after deleting, because deleting doesn't overwrite them, it just removes the filesystem dictionary entry. But by looking at the bit patterns (e.g. typical for png, mp4, etc), often it is still possible to find these files, even if there isn't a dictionary entry anymore.
@delxmos
@delxmos 4 ай бұрын
That was an interesting analysis, great work
@alistair1231
@alistair1231 4 ай бұрын
this was awesome. great work!
@SullivanInfinity
@SullivanInfinity 4 ай бұрын
Huh... I tried completely switching to Linux a few years ago. And when installing and running Steam, this actually happened to me. But only _after_ I installed Steam. I was so furious that I stopped using Ubuntu as my daily driver. I checked my drive and most of the files were gone. 5 years later and I maybe know what was the cause. Thanks for digging yourself into the topic, been very enlightening. ;)
@winter4265
@winter4265 4 ай бұрын
This was a great video and the ending was really funny. Subscribed 😄
@vladislavkaras491
@vladislavkaras491 4 ай бұрын
It was interesting to watch about it! Thanks for the video!
@Steamrick
@Steamrick 4 ай бұрын
This is a perfect example of why you make backups and don't save them to the same machine you're backing up...
@isbestlizard
@isbestlizard 4 ай бұрын
Or a mountpoint, it could have been a network file system but mounted somewhere rm will happily destroy everything it can find XD
@TheAkashicTraveller
@TheAkashicTraveller 4 ай бұрын
@@isbestlizard This makes me think rm as it is just shouldn't exist.
@erikkonstas
@erikkonstas 4 ай бұрын
If you watch the video, it says that the backup *drive* was also wiped out...
@VictorRodriguez-zp2do
@VictorRodriguez-zp2do 4 ай бұрын
He backed it to another drive, the thing is the drive was mounted, likely on /media/, and since /media is inside of / it gets equally rekt
@Steamrick
@Steamrick 4 ай бұрын
@@erikkonstas A drive attached to the local machine via USB (or iSCSI mountpoint, I don't care) is still effectively local. Hence, don't backup up your data to a different drive on the same machine. If rm -rf doesn't get it, ransomware is another contender for 'where did my backup go'.
@LethalChicken77
@LethalChicken77 4 ай бұрын
"Oopsie whoopsie just ran rm -rf *" X3
@Terensu-desu
@Terensu-desu 4 ай бұрын
I'm not sure what it is but hearing the Windows error prompt sound while looking at a Ubuntu GUI makes me chuckle every time. Can't wait for the next video in 9.9 years! Keep it up
@johnnynojokes
@johnnynojokes 4 ай бұрын
Love your channel man, keep it up. This is awesome.
@Lachrymogenic
@Lachrymogenic 4 ай бұрын
Man loses all of his files and stays calm and collected. He is a psychopath. "Scary!"
@jademonass2954
@jademonass2954 2 ай бұрын
they used a "rm -rf" and didnt even make a check to see if the string afterwards was empty? broo i get that they tecnically DID do so to enter the restart steam function, but like, rm -rf is like a loaded gun, double precausions is a must
@frost.-xn2bp
@frost.-xn2bp 4 ай бұрын
yo this is so cool, i clicked thinking: "no way ill watch all of this" and when i watched the video. i found myself commenting this and i realized it was about to end. your way of making videos is really, really engaging and its fun to watch, keep it up. 👍
@AEtherPi
@AEtherPi 4 ай бұрын
Very interesting series idea! I'm excited for more. Subed
@blinking_dodo
@blinking_dodo 4 ай бұрын
And that is why before you recursively delete things in a script, you check for an expected value present at that location! (A file named "this_is_the_steam_folder.txt" for example.) I always try to implement such sanity checks, just to be sure i don't rm-rf my home folder with all my precious files. (that i don't have a backup of! 😅)
@TARS..
@TARS.. 4 ай бұрын
Yeah I’m really paranoid about this, I’m constantly ls-ing and pwd-ing that it looks like I have short term memory
@maxxiong
@maxxiong 4 ай бұрын
​@@TARS.. you realize you can see the pwd in the shell prompt right? Also I use zsh which asks me to confirm and usage of rm *
@TARS..
@TARS.. 4 ай бұрын
@@maxxiong oh no yeah I do, but ill still double check. Like I said I'm paranoid
@VulpineCortex
@VulpineCortex 4 ай бұрын
thanks for the vid, I've also learned some basics about linux file system along the way. Really informative, a great way to onboard anyone to IT basics
@orangejuice732
@orangejuice732 4 ай бұрын
I’m excited for this series, especially if it includes the flame wars that pop time to time on github issues threads.
@hest2635
@hest2635 4 ай бұрын
You took your time making this video. Your last video was 2 months ago. Love your content, keep it coming.
@TheMAZZTer
@TheMAZZTer 4 ай бұрын
Modern versions of the rm command now require a --no-preserve-root switch in order to allow you to use the command on / to prevent exactly this type of issue. Edit: Actually I think using a wildcard in /* bypasses this restriction which is why it didn't get caught! Valve doesn't know how to write Linux software? OK then I'll just go play with my Steam Deck now.
@bunny-cu9ni
@bunny-cu9ni 4 ай бұрын
That is not what no preserve root does
@erikkonstas
@erikkonstas 4 ай бұрын
​@@bunny-cu9niThat's exactly what it does... problem is, the path was "/*", therefore the root directory was not a removal target, "only" everything inside it was... 😂
@erikkonstas
@erikkonstas 4 ай бұрын
I think I've only ever seen this on Ubuntu...
@Mitch-xo1rd
@Mitch-xo1rd 4 ай бұрын
​@@erikkonstasNo bash is universal on linux. This script could have gotten any distro, especially at that time.
@erikkonstas
@erikkonstas 4 ай бұрын
@@Mitch-xo1rd Not all Linux distributions come with bash by default... also, I've arguably not tested hundreds, but Ubuntu was the only one which made me include --no-preserve-root (I obviously used it for mature purposes 😂).
@easternplatypus
@easternplatypus 4 ай бұрын
"# Scary!" 💀💀
@Avgsharkenjoyer
@Avgsharkenjoyer 5 күн бұрын
I love that there was clearly a steam engineer who saw this coming and even left a comment but nothing was changed
@Peeves22
@Peeves22 4 ай бұрын
Absolutely adoring the shaking variable/command substitutions!!
@rebus_x5313
@rebus_x5313 4 ай бұрын
Unix engineers back in the day: Let's have a recursive rm -rf Also them: A single file tree that holds all the connected storage devices is a brilliant idea
@charliekahn4205
@charliekahn4205 4 ай бұрын
I'm pretty sure rm -rf exists because every bus location is on one tree. You don't want old files floating around on a single RAID drive
@DeusinMachina
@DeusinMachina 4 ай бұрын
So I think bash is good for simple things, but unfortunately doing anything other than running a few core utils gets complicated quick, and the edge cases in it makes you want to use a “proper” language. But unfortunately these scripts usually start out simple, but then organically gain more and more functionality until stuff like this happens. So I avoid writing bash scripts unless I know I won’t have to support the script long term. If I will, I use a different language
@retagainez
@retagainez 4 ай бұрын
Yeah, bash is good for simple use cases. Its okay for doing a task that's the size of a small unit: delete a specific file here, read some logs there, read a text file, etc. Deleting multiple files in a directory definitely sounds like one of those small units of work but it's actually a lot of work once it becomes recursive and can quickly get out of hand because of the edge cases which is something a simple one-liner command doesn't make obvious once you attach a two letter option to the end of it until after you ran it. Writing a simple Python script could've helped, or Ansible if there's a lot of separate but thorough steps to be taken and abstracted to work across numerous operating systems.
@KatJustice97
@KatJustice97 3 ай бұрын
No joke this video taught me more about Linux than anything else I've come across. I'm a complete and utter novice with command lines, but this was incredibly digestible. Well done, thank you!
@noosetime9423
@noosetime9423 3 ай бұрын
great video! hope you continue making this kind of content
@NolenFelten
@NolenFelten 4 ай бұрын
A moment of silence for the data destroyed by this event.
@NightmareRex6
@NightmareRex6 4 ай бұрын
imagine whole games and mods that wont exist now becuase of it? and maby some youtubeseries as well.
@NolenFelten
@NolenFelten 4 ай бұрын
@NightmareRex6 I lost a lot of music and i still spend hours trying to find it again because of a fire. It's sad, man, like an old man that lost his wife. Accidentally lost an entire families photo collection when I was a stupid teenager trying to fix their computer. But that's their problem, not mine, I want my music back! Stuck my in my head with no track ID and I listen to mainly electronic music with no lyrics.
@nicholasvinen
@nicholasvinen 4 ай бұрын
F
@tesla1772
@tesla1772 4 ай бұрын
Everything that could go wrong went wrong 😢
@11Stormtrooper
@11Stormtrooper 3 ай бұрын
absolutely insane issue haha also i love how clearly you describe everything
@floatingpoint
@floatingpoint 4 ай бұрын
Subscribing for this series. Keep it up!
@InuYasha-SitBoy
@InuYasha-SitBoy 4 ай бұрын
you can also add an alias to your .profile/.bashrc/.zshrc for rm making it so it moves files to your trashbin or wtv instead of deleting. this way even if your comp crashes you can still recover most your files by mounting ssd/hd directly to another computer
@weakspirit_
@weakspirit_ 4 ай бұрын
this wouldn't work for keyvin's problem but still a great idea for users living in the terminal
@FengLengshun
@FengLengshun 4 ай бұрын
There's also rmtrash. The problem is of course that by default trash bin is pretty limited. Nevermind that it makes normal rm operations take so long, and the issues potentially caused by apps assuming rm IS rm.
@InuYasha-SitBoy
@InuYasha-SitBoy 4 ай бұрын
@@weakspirit_ steam could maybe chroot? hypothetically if they did chroot to a mounted drive, if there was a problem and the media unmounted would the script break? or continue running in a non chrooted env? idk, you kinda have to assume steam can handle there stuff its a pretty popular program
@GRBtutorials
@GRBtutorials 4 ай бұрын
And this is why I use Timeshift to take regular file system snapshots (a backup would also work if it isn’t mounted and writable, but it’d take longer to restore). If something like that ever happens, it’s a matter of minutes to roll back. Of course, they’re not a substitute for backups, as they don’t protect against hardware (HDD/SSD) failure.
@Maruchanfresuda
@Maruchanfresuda 4 ай бұрын
I really like your humor lol thank god this was just recommeded out of nowhere, made my day better
@kyraxx
@kyraxx 4 ай бұрын
Looking forward to the next video in ten years!
@khashayarr
@khashayarr 4 ай бұрын
When the guy said "my 3tb hdd where i back up everything" I seriously felt nauseous... That's so horrifying... He didn't do anything wrong...
@oracle372
@oracle372 4 ай бұрын
Oh my god I cannot imagine the horror of losing that much data at once
@MKULTRA_Victim_
@MKULTRA_Victim_ 3 ай бұрын
It's incredible how you managed to make Linux command line so entertaining. Keep up the good work.
@mohamad20zx34
@mohamad20zx34 4 ай бұрын
Congratulations for your first video of the issue tracker series Kevin
@YHK_YT
@YHK_YT 4 ай бұрын
Minor inconvenience
@kormannn1
@kormannn1 4 ай бұрын
Minor programming mistake:
@Jackpkmn
@Jackpkmn 4 ай бұрын
If you must use rm -rf you must also ensure that whatever function you are building cant return in such a way that it runs on root. Or on the whole user folder.
@jjonez0987
@jjonez0987 4 ай бұрын
Any day is a great day when a new video is uploaded to this channel
@neuroplush7657
@neuroplush7657 3 ай бұрын
"A very scary operation." has become a potent non sequitur in my life.
@Finkelfunk
@Finkelfunk 4 ай бұрын
Why in gods name would you ever use rm -rf in a script? Like, you know the specific directory names, delete those specific directories one by one.
@Mark-xk3hh
@Mark-xk3hh 4 ай бұрын
Something similar happened to a game on windows (and linux, but I think it only occurred on windows) called Realm of the Mad God where uninstalling the launcher would delete the entire directory it was installed to. It was even worse cause uninstalling would give the UAC prompt which is pretty common for program uninstallers, so yeah... lol
@wabbajocky8235
@wabbajocky8235 4 ай бұрын
really? i don't remember that. i do remember the deltarune uninstaller deleting it's parent folder tho
@Mark-xk3hh
@Mark-xk3hh 4 ай бұрын
@@wabbajocky8235 It was fixed really fast but there were people who unfortunately had it happen on Reddit
@chrisdawson1776
@chrisdawson1776 4 ай бұрын
You mean The Exalt Edition by DECA Games and yes, that was horrible I remember that a few years ago.
@vapormermaid
@vapormermaid 3 ай бұрын
Can't wait to see your next video. It's probably not good for the economy for there to be a new Kevin Fang video, but it's very entertaining.
@augnix888
@augnix888 4 ай бұрын
nice video and channel! waiting for part 2, see you in 10 years :D!
@ShorkBoi
@ShorkBoi 4 ай бұрын
How a steam bug deleted someone's entire pc "sudo apt install steam"
@Lugge1999
@Lugge1999 4 ай бұрын
Thats the best part about programming. The # Scary comment before absolute doom. Everybody knows that the following line MIGHT fuck everything up. But we all think that with just enough sanity checks before, we are good to go! But then, one day, Murphy's Law steps in and the world burns!
@immortalsun
@immortalsun 4 ай бұрын
Great video! You earned yourself a sub! I thought your voice was real at first. What AI program do you use for the voice?
@SuperMichael996
@SuperMichael996 Ай бұрын
Mmmm Lemmino soundtrack, nice! Also very informative and simple vid! GG!
@kisaragi-hiu
@kisaragi-hiu 4 ай бұрын
Shell is a language that is surprisingly bad at paths considering its uses.
@pianissimo7121
@pianissimo7121 4 ай бұрын
can someone explain why there was a rm -rf command in the 1st place? even for reset steam command rm -rf seems too much no?
@ParkourGrip
@ParkourGrip 4 ай бұрын
What command would you use to delete the the steam directory? Wouldn't that command be susceptible to same problems as "rm -rf" anyway?
@comet.x
@comet.x 4 ай бұрын
​​@@ParkourGrip mv into a temp to be removed later or gvfs-trash
@olli2984
@olli2984 4 ай бұрын
I am a beginner with Linux so i may have not understand everything right but i think i understand the most things. I simply want to say that this was a remarkably interesting and good to understandable video :D Keep your work up.
@Fanta666
@Fanta666 4 ай бұрын
I would have watched this video so much sooner if I knew you were the one who made it! Love your stuff. It does kind of blow my mind that they put that line in their not accounting for the possilibity that $STEAMROOT could be an empty string. did they really need the "/*" if they were using rm -rf anyway? I feel like I use rm -rf all the time, never with a wilcard at the end, and only with the trailing slash if autocomplete puts it there for me, and it still works.
How One Line of Code Almost Blew Up the Internet
13:47
Kevin Fang
Рет қаралды 1,9 МЛН
Dev Deletes Entire Production Database, Chaos Ensues
10:20
Kevin Fang
Рет қаралды 2,6 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 12 МЛН
1 класс vs 11 класс  (игрушка)
00:30
БЕРТ
Рет қаралды 1,4 МЛН
Black Magic 🪄 by Petkit Pura Max #cat #cats
00:38
Sonyakisa8 TT
Рет қаралды 38 МЛН
Can you beat this impossible game?
00:13
LOL
Рет қаралды 58 МЛН
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 392 М.
How Bad Leap Day Math Took Down Microsoft
11:29
Kevin Fang
Рет қаралды 166 М.
Algorithms that said I'm dumber than a bag of potatoes
5:10
Boop Beep
Рет қаралды 2,1 М.
Cloudflare Deploys Really Slow Code, Takes Down Entire Company
13:24
How to 100% Minecraft
16:05
Blucubed
Рет қаралды 1,4 МЛН
The Algorithm Behind Spell Checkers
13:02
b001
Рет қаралды 396 М.
I Made a Graph of Wikipedia... This Is What I Found
19:44
adumb
Рет қаралды 2,3 МЛН
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,3 МЛН
How GitHub's Database Self-Destructed in 43 Seconds
12:04
Kevin Fang
Рет қаралды 936 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 802 М.
iPhone 15 Unboxing Paper diy
0:57
Cute Fay
Рет қаралды 1,7 МЛН
Очень странные дела PS 4 Pro
1:00
ТЕХНОБЛОГ ГУБАРЕВ СЕРГЕЙ
Рет қаралды 425 М.