83 karma · joined June 13, 2020
Actually losing a mirror vdev doesn’t lose the whole pool anymore for several years now. I’ve recovered data off a zpool where I lost one of three mirrored vdevs. It’s not pretty, but your data is still there. Any files on the missing drives are just 0 bytes.
This is a real problem, we experience it in the Fediverse
This is as described by a friend who had worked elections for years, this year will be my first. Should be interesting to see it in person.
(They verify a few absentee ballot envelopes for required signatures etc and then open up the envelopes, someone verifies the ballot is complete, and then mix the ballots together so the ballot is kept anonymous. Chain of custody here is clever and works well. It would still be possible to notify the voter their ballot was rejected.)
I upgraded to Catalina again, ran this to be certain, and it worked! No more crashing in a whole month. Previous reinstalls of Catalina did not fix it.
My theory is the NVRAM seems to hold some values that look like hints of hardware configuration (I forget the label this long string is under) and if this string gets anything incorrect it panics on wake or even on boot because it doesn't see all the hardware supposedly plugged in and can't speed up the boot/wake using these hints.
This makes sense why it would panic if you unplug while it's sleeping and then it crashes on wake.
https://www.schneier.com/blog/archives/2014/11/the_return_of...
It's not that complicated. A relatable example would be writing an API endpoint that receives data and then you do something with that data.
1. Write the endpoint so it works for the expected data.
2. You're done
That's it. You don't need to worry about anyone sending you malformed payloads or fuzzing your API. You can ignore it. They cannot exploit anything, they cannot crash BEAM. It will keep working.
Maybe they'll run you out of memory or CPU or bandwidth, but those are problems solved at other layers (unless you include rate limiting in your application).
Ignore all errors you do not need to explicitly handle. That's the whole point. It's wonderful.
Maybe you can do this in other languages with worker pools and supervisors, but it will be very expensive and high latency due to the cost of OS process forking and you're also wasting a lot of resource on context switches with that design anyway.