gemini-2.5-pro| input-price: 1.25 output-price: 10 max-context-length: 200_000 (cost: $0.03) Β· Anfrage: 2025-10-25T19:12:06.649817
Generated by rs-summarizer Version unbekannt
Abstract:
This video analyzes the catastrophic data loss incident at Kyoto University on December 14, 2021, where an HP Enterprise (HPE) managed supercomputer lost 77 terabytes of research data. The root cause was a subtle but critical flaw in the deployment process of a Bash housekeeping script designed to delete old log files.
The incident is broken down as a technical case study, explaining the difference between interpreted languages like Bash and compiled languages. The core of the problem was a race condition created when the running cleanup script was updated using an "in-place overwrite" (cp command) rather than an "atomic swap" (mv command). The script had already loaded an old variable name for the log directory path into memory before the update occurred. When it resumed execution, it read the new version of the script, which referenced a new, renamed variable. Because this new variable was unset in the script's memory, Bash interpreted it as an empty string, causing the delete command to target the supercomputer's root file system instead of the specific log directory. The analysis concludes by detailing the impact of the data loss and outlining preventative measures, such as proper deployment methods and writing safer Bash scripts.
Anatomy of a Disaster: The Kyoto University Data Deletion
cp (copy) command. This performs an "in-place overwrite," which modifies the contents of the existing file (inode) directly. Any process that has the file open will immediately see the new content.mv (move) command performs an "atomic swap." It points the filename to a completely new file (inode), leaving the original file intact for any processes that are still using it. This would have prevented the incident.LOG_DIR_V1="/path/to/logs"). While the script was busy with other tasks, HPE deployed the new version, which used a renamed variable (e.g., LOG_DIR_V2="/path/to/logs").rm -rf $LOG_DIR_V2). However, since LOG_DIR_V2 had never been defined in the currently running process, Bash interpreted it as an empty string. The command effectively became rm -rf /, targeting the root of the file system and deleting everything it could.mv instead of cp for script updates or by using the set -u flag in Bash, which causes the script to exit with an error if it encounters an undefined variable.