Live data from Hacker News

MacOS may lose data on APFS-formatted disk images

bombich.com

121–130 of 193 posts

Re: MacOS may lose data on APFS-formatted disk images

#121

Earlier quoted context omitted.

How do you know that? Filesystem corruption is frequently silent, and every-time it happens customers don't get on the phone and send the disks to apple so that they can root cause the problem. Its quite possible this bug has happened an untold number of times before it happened to someone who went through the effort to reproduce and isolate it.

>How do you know that? Can you point to any other APFS issues that were reported before this one?

I have an iPhone 6+ that's stuck in an infinite boot loop. Everyone thinks it's a BGA solder ball failure on the NAND flash part.

Can you be 100% sure it's not an APFS fuckup?

Re: MacOS may lose data on APFS-formatted disk images

#122
post #86

Earlier quoted context omitted.

How do you know that? Filesystem corruption is frequently silent, and every-time it happens customers don't get on the phone and send the disks to apple so that they can root cause the problem. Its quite possible this bug has happened an untold number of times before it happened to someone who went through the effort to reproduce and isolate it.

We know that because it was deployed to almost a billion devices without a problem. If there was a problem that affected even a fraction of a percent of people, it would have been all over the news given how many devices that is. Edit: Thanks for the downvotes. If you disagree, please tell me why. Apple's deployment of APFS to iPhones was so flawless, most people probably still don't even know they did it.

Idk, most of the people in my life could probably lose data on their phone and never realize it. Especially if we’re talking about people with lots of duplicates of the same selfie, for instance.

Re: MacOS may lose data on APFS-formatted disk images

#123
post #104

Earlier quoted context omitted.

Spotlight ignores hidden directories (e.g. .git) and directories whose names end in .noindex. You can create a file in one with a unique name and try to mdfind it to verify this.

Does it ignore them, or does it traverse them and throw them out? Anecdotally it certainly seems like indexing is slower on my dev drive than anywhere else, so I'm curious.

I'm sure it gets the events. It probably has to walk back up the tree to determine if the file is hidden. Dunno how much work it does. I presume it doesn't actually do the metadata extraction from the files. (But my presumption is based on "surely they wouldn't do that".)

The biggest offender for me when I touch a lot of files is Dropbox. It seems to use a lot of CPU when, e.g., an Xcode update is being installed. I've read that they had to listen to events for the whole volume because the more specific APIs weren't giving them the data they needed, but you'd think they could fast-path the files that were outside their sandbox.

Is your dev drive a platter drive or SSD? I've found that the last few major releases of osx have big performance issues on systems with old-school hard drives. (Frequent beach-balling, etc.)

Re: MacOS may lose data on APFS-formatted disk images

#124

Can you even test a filesystem properly internally? Seems to me we're all involved in a massive public beta.

They say it takes ten years to get the bugs out of a filesystem. Unfortunately I think a general release is necessary to mature a new FS.

Re: MacOS may lose data on APFS-formatted disk images

#125

Earlier quoted context omitted.

My wife's laptop suddenly decided that the boot drive was corrupt a few weeks after she updated to APFS. None of the recovery tools were of any use. We had to reinstall the OS and pull the files from a backup. This story did not make it to Hacker News.

Anecdata != filesystem issue. If you have more information about the problem you encountered and how it implicates/interacts with APFS, please do link to it. Otherwise, bug reports via circumstantial evidence are, while not inherently false, certainly suspect.

You asked for an example, and you got it.

Re: MacOS may lose data on APFS-formatted disk images

#126

Earlier quoted context omitted.

Cherry-picked anecdotes are worthless. Few if any people glorified Panther when Tiger came out, or Leopard when Snow Leopard came out, or Win3.11 when Win95 came out, or Win95 when Win98 came out, or WinME when WinXP came out, or Vista when Win7 came out. Stop dismissing legitimate complaints just because you worship "new and shiny"

>Stop dismissing legitimate complaints just because you worship "new and shiny" Yeah, right after you stop dismissing important security updates as "new and shiny".

No, he’s right. Whilst there was a bit of criticism of Windows XP, most people were fine with it and it was widely praised. Same with Windows 98. In fact, Windows ME, Windows Vista and Windows 8 were widely criticised when they came out for good reasons, and Windows 7 and Windows 10 were widely praised.

Re: MacOS may lose data on APFS-formatted disk images

#127
post #69

Earlier quoted context omitted.

...So not an actual Apple Product.

I am ignorant as to how that could matter? It's managed writes to a hard disk. How could the brand of hard disk, or the mobo, or whatever, matter in this situation?

For the most part the hardware in on a hackintosh isn't going to be worse than what apple is selling. I might even say its likely better given that ECC memory or maybe SAS/FC attached disks may be in the hackintosh (although as others have said the disk sector ECC, ECC on the transport layers (SAS, SATA, etc) are all much better today then they were 30 years ago). So while the rates of silent hardware based corruption may be the same or lower, the real reason for using CRC/Hashing at the filesystem/application level is to detect software bugs.

The latter may be more prevalent on the hacintosh due to simply being a different hardware environment. A disk controller driver variation, or even having 2x as many cores as any apple products might be enough to trigger a latent bug.

So basically, I would be willing to bet that the vast majority of data corruption is happening due to OS bugs (not just the filesystem, but page management/etc) with firmware bugs on SSD's in a distant second. The kinds of failures that get all the press (media failures, link corruption, etc) are rarely corrupting data because as they fail the first indication is simply failure to read the data back because the ECC's cannot reconstruct the data and simply return failure codes. Its only once some enormous number of hard failures have been detected does it get to the point where a few of them leak through as false positives (the ECC/data protection thinks the data is correct and returns an incorrect block).

The one thing that is more likely is getting the wrong sector back, but overwhelmingly the disk/etc vendors have gotten smart about assuring that they are encoding the sector number alongside the data (and DIF for enterprise products) so that one of the last steps before returning it is verifying that the sector numbers actually match the requested sector. That helps to avoid RAID or SSD firmware bugs that were more common a decode ago.

Re: MacOS may lose data on APFS-formatted disk images

#128
post #58
post #41

Earlier quoted context omitted.

Unrelated (sorry for being opportunistic): How do you like your Synology NAS? I’m considering it.

Not the person you replied to, but I want to make a case for ZFS on a generic small motherboard. You wind up with Linux or FreeBSD so it's a general-purpose server, unless you want to use something like FreeNAS. And with ZFS, you get snapshotting, RAIDz, checksumming, etc, as opposed to "oh it has RAID 5 woohoo". RAID (including the software RAID in Linux) doesn't actually do checksumming for file verification. AFAIK…

Thank you

Re: MacOS may lose data on APFS-formatted disk images

#129

Earlier quoted context omitted.

Anecdata != filesystem issue. If you have more information about the problem you encountered and how it implicates/interacts with APFS, please do link to it. Otherwise, bug reports via circumstantial evidence are, while not inherently false, certainly suspect.

I'm not sure they're implying that it -was- an APFS issue, just that in the majority of circumstances users won't go through the same level as effort to diagnose an issue as in the article. Instead of pulling drives and trying to reproduce the error, they just wiped the drive and started fresh. I could be wrong, but I believe the point is not that it did happen, but that this -could- have happened many times in the p…

The hardware is likely being blamed for a lot of failures that are software related. Its almost assured there is a software problem in cases where reinstalling the machine fixes the problem. A random machine which won't boot due to disk/filesystem failures could be a hardware issue, but that is pretty much ruled out if reinstalling/reformatting doesn't immediately manifest in further failure. Bit rot, stuck bits, bad links are a thing, but they generally show up as massive soft error correction long before it reaches the point of simply being unable to read the sector and when that happens the OS will almost always tell you that the sector can't be read rather than giving you garbage data.

That is because the likelyhood of undetected hardware failures given the layers and layers of ECC on the disks, links/etc manifesting itself as filesystem meta data failures rather than garbage in the middle of video/images/document streams/etc is really unlikely. Or the more likely case of the machine performance degrading due to read retry/ecc correction/retransmission making the machine appear to have severe performance issues long before it manifests as silent data corruption sufficient to eat the filesystem structure (its a fun excise to intentionally flip a few random bits on a hard-drive image (or in RAM)) and see if/when they are detected.

So, yes the first thing I think when I hear filesystem corruption is BUG! That is what the experience of tracking down a number of incidents in a large data storage application a few years ago taught me.

Re: MacOS may lose data on APFS-formatted disk images

#130
post #115

Earlier quoted context omitted.

As a counterpoint, APFS was deployed to almost a billion devices over the span of several months when it was release and, IIRC, this is the first major issue.

refs (microsoft's new filesystem)'s deployment went along much better. i haven't heard of any major issues since it came out in windows server 2012.

ReFS was only ever made the default on new installs of Windows Server 2012. It never actually made it to production builds of Windows 8 or above so it's actually only installed on a fraction of the systems that are out there. That's not really a sufficient sampling size to say that this deployment went along much better. The APFS update was a much, much larger endeavor and, based only on public response, was nearly seamless. This is the first major issue I've heard about with regard to APFS.
Post reply on HN