what are the guarantees about what happens if a computer crashes during a write()? is it possible for the file to end up with corrupted data at the end, or is each byte of the write atomic?
-
-
Replying to @11rcombs
I've seen files end up padded with zeroes after an unsynced write and hard shutdown, many times. So either ext4 data=ordered does not work as advertised, isn't enabled by default on some systems, or something else is often broken further down the stack.
3 replies 1 retweet 6 likes -
-
Replying to @11rcombs
Seriously, "history file corrupt" is a common zsh complaint for me after a hard shutdown (on several systems) and then I have to open it in vim and nuke the last line full of ^@.
1 reply 0 retweets 2 likes -
I've seen it with text syslogs too. And of course when it happens to systemd-jourmald binary logs it just craps itself hard and refuses to load them.
1 reply 0 retweets 1 like -
Ah, here we go, some discussion about this with
@tytso. data=ordered only guarantees you won't get *garbage* (e.g. leaked free disk blocks, which is a huge security issue), but you can still get zeroes. https://plus.google.com/+KentonVarda/posts/JDwHfAiLGNQ …1 reply 1 retweet 3 likes -
Replying to @marcan42
i told you about how macOS's hardware video decode driver used to allocate vmem for frames without zeroing it, right?
1 reply 0 retweets 0 likes -
Replying to @11rcombs
I'd say "nice", but really, this is the kind of crap I expect in, like, every proprietary GPU driver for everything. Performance!!!!!ʷʰᵃᵗ ᶦˢ ᵗʰᵃᵗ ˢᵉᶜᵘʳᶦᵗʸ ᵗʰᶦⁿᵍ ʸᵒᵘ ˢᵃʸ?
1 reply 0 retweets 1 like -
Replying to @marcan42
i mean, when i reported it they fixed it pretty quickly, i think they just didn't realize that the decoder might not fill in the entire image you could get that to happen with some corrupted streams, but my favorite trick was just having the stream res < the container res
2 replies 0 retweets 1 like -
Replying to @11rcombs
I once did, in fact, trace down cross-security domain unwritten sector leakage (that actually made it through *without* deliberate malicious recovery efforts and broke things) at a certain WebCo that liked to turn off ext3 journaling. My final diagnosis was working as designed...
1 reply 0 retweets 2 likes
Kind of proud of that one though, TL assigned the bug (about bad data way downstream) to me saying "marcan is good at figuring weird stuff out" and I postmortem traced it to a machine that kernel panicked and worked out exactly what data came from where and how.
-
-
Replying to @marcan42
"is good at figuring weird stuff out" is definitely a label i'm proud to have people apply to me
2 replies 0 retweets 1 like -
Replying to @11rcombs
So my boss at the time wrote this on the whiteboard once... Not sure how I feel about *this* onepic.twitter.com/MAanNspdtN
1 reply 1 retweet 5 likes - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.