backtop


Print 35 comment(s) - last by bangmal.. on Nov 7 at 6:57 AM


  (Source: Tom Karpik)
Moving files on Panther, Tiger, or Leopard can result in disappearing data if the connection to the destination is broken

A rather significant and disturbing bug has been uncovered by one Tom Karpik dealing with how Apple's OSX operating system handles file moves. Mr. Karpik details the process on his webpage, gives exact steps to reproduce the bug, and offers a downloadable video of it in action.

The bug dating back to OS X 10.3 is caused by a lack of error trapping in the "file move" process, and only occurs when moving a file or directory to another volume.

The logical file move process is a three-part procedure:
  1. Copy the file from SOURCE to DESTINATION.
  2. Determine if the file copied successfully to DESTINATION.
  3. If the file copied successfully, delete it from SOURCE.
Apparently, Apple forgot the bolded section of Step 3, because as Mr. Karpik shows in a series of screenshots, dropping the connection to the destination -- be it a USB drive being accidentally unplugged, the power cord to a FireWire hard drive being pulled out by an overzealous feline, or a network connection to a Samba share being lost -- causes OSX to abort the copy with a "typically useful error message" and then delete the source files.

With Apple having just shipped over two million copies of Leopard, that's a lot of potential data waiting to go missing. With luck, the Update Manager will be bouncing in Docks worldwide soon.

Incredibly, a similar bug was documented in Windows Vista last month.


Comments     Threshold


This article is over a month old, voting and posting comments is disabled

however
By Quiksel on 11/6/2007 1:46:33 PM , Rating: 2
It's a shame they didn't do this right, and they better fix it soon, but with that being said..

KIDS, when you want to move files, COPY first, THEN delete.

If it's really that important, a little clear-headed precaution will go a long way.




RE: however
By TomZ on 11/6/2007 2:10:29 PM , Rating: 3
Instead of wasting time doing redundant operations, how about instead insisting that your software vendor provide correctly operating and tested software? Not using certain features out of fear of bugs is illogical if you ask me.


RE: however
By Ralph The Magician on 11/6/2007 3:28:36 PM , Rating: 2
This has been a problem in OS X for a while. The problem is that OS X treats move operations as cut and paste, instead of copy, paste and delete. However, it does not so this for all dragging-based move operations by default. OS X tries to be smart when deciding what to do with a file, whether it's copy, move, or create alias. There is a way to do copy, paste, and delete, but it requires you to hold down a modifier while dragging the file to the destination. I'm not sure why this isn't the default action instead of cut and paste. In fact, I *think* that when you actually do cut and paste of a file in OS X, instead of dragging and dropping, it actually does copy, paste, and delete. Can't remeber exactly though.


RE: however
By Quiksel on 11/6/2007 3:35:19 PM , Rating: 2
it's not really illogical if you lose data trying to save some time. Doing a copy, then delete is not a redundant operation when comparted to a move, which is sort of like a "batch" operation to me.

Certainly I am not pleased with the bug, but there is a pretty simple solution in the interim: Copy, then Delete. Apple better fix this thing yesterday, though.

I would never perform a "move" on files between my Windows servers. Not that I couldn't just do the move (it "should be ok), but damn, imagine if a little glitch (filename problem that prevents moving to new server, i.e., from a Mac client over a different protocol that allowed the weird filename) that could occur based solely on my lack of a few more strokes. Seems silly, does it not? I'm not a fan of losing data, and while it "should" do these things, as a defender of data in my job, I'm not going to chance it.


RE: however
By TomZ on 11/6/2007 4:20:15 PM , Rating: 2
File "move" between Windows boxes is perfectly safe, since the original file is not deleted until the copy is successfully completed. I manage files like this all the time.

Sure, "redundant" may be the wrong word, but surely you'll admit that a single move operation is slightly faster and easier than a copy followed by a delete. That's my point.


RE: however
By Quiksel on 11/6/2007 4:26:24 PM , Rating: 2
Agreed. I took issue because it seems that it really only takes one word to have somebody misunderstand your purpose and intent on this site when posting. Couldn't help but return the favor. ;)


RE: however
By Ralph The Magician on 11/6/2007 10:04:49 PM , Rating: 2
"If you’re archiving a file to disk (let’s say to an external FireWire drive for example), you can drag the icon of the file you want to archive directly to that drive and the Mac will write a copy to that drive. However, your original file still lives on your current hard drive. If you want to have that file deleted from your drive as soon as it’s copied to another drive, just hold the Command key as you drag your icon, and the Mac will do two tasks for you — copy the file to the new drive and delete the original from your drive."

Default action for moving to an external drive is actually copy, not cut & paste.


RE: however
By 8steve8 on 11/6/2007 3:15:41 PM , Rating: 2
so should i also write my emails on paper, before i type them into an email interface?

.... seriously..

software is to make our lives easier,,, it needs to be rebust so we dont have to worry and do these things...


Not quite sure how that Vista link showed up.
By Chris Peredun on 11/6/2007 1:48:57 PM , Rating: 5
I know I didn't write it, because I saw no parallels between the two.

Vista: causes an "Out of Memory" error but leaves the source files untouched
OSX: displays an error dialog, then deletes the source files

Vista: only occurs when you copy over 16,400 files
OSX: can occur with any number of files or directories

Vista: only copies over the network
OSX: any destination volume, local or remote, as long as the files are "moved" and not copied

I think that should sufficiently prevent me, the messenger, from being shot.




By TomZ on 11/6/2007 2:16:02 PM , Rating: 2
It's funny that the author doesn't get informed about changes by a later editor working on the post at DT.

And I agree with you, the similarity is pretty small between the two. In addition to what you said, the OSX bug is during a "move" operation where, if the bug is triggered, data loss will almost certainly result. The Vista issue is during a "copy" operation where you get an error message that stops the operation. Data loss is not very likely in the latter case.

Also, to those who think this may not be a serious issue, consider inherently error-prone connections like wireless links in conjunction with this issue.


By SavagePotato on 11/6/2007 3:47:50 PM , Rating: 2
I think Apple is starting to see a little bit of what Microsoft has to live with. Every day that they become a bigger player with a bigger market share, bugs start to get noticed, picked at, even exaggerated. Eventually the malware community is going to set their sights on the mac and I predict they are going to learn a lesson about having your security constantly circumvented as well.

While I would say this is a bit more severe an issue than Vistas file copy woes, I would also say welcome to the big time Apple. The scrutiny and criticism only gets tighter from here on in.


Hopefully Apple will fix this quickly but...
By KeithP on 11/6/2007 3:07:59 PM , Rating: 2
On the surface, this seems like a big deal. However, since the bug has been around for years and there has not been anything written about it before, I have to think that in practical day to day usage it is a non-issue.




By Snuffalufagus on 11/6/2007 3:41:18 PM , Rating: 2
I think, as someone pointed out above, it is not the default Drag and Drop behavior for files so most users do not encounter the scenario that would lead to data loss too often. I disagree with it not being a big deal, for Apple it should be a very big deal, this and any time they open the door to data loss.


By aos007 on 11/6/2007 6:57:52 PM , Rating: 2
I think it's a pretty big deal as is any other operation that can destroy user data. Probably the only reason it hasn't been fixed yet is that it's not typical, but it's by no means unusual.


Think Different
By mikefarinha on 11/6/2007 6:05:10 PM , Rating: 3
Why is everyone complaining?

Obviously Mr. Jobs is trying to show us the future of computing, we should all willingly accept the new paradigm of OSX. After all using a Mac isn't really about being productive or using it as if it were a tool, it is all about the communal experience of the wonder and excitement of technology that is ever-fleeting.

Be honest with yourselves people! We should be so lucky to have yet another jewel graciously handed down to us from above. In reverence to all that is Mac users should lay prostrate for one hour before each use in order to fully appreciate what has been given to us.




RE: Think Different
By bangmal on 11/7/2007 6:57:32 AM , Rating: 2
LOL


ouch
By Quiksel on 11/6/2007 1:40:52 PM , Rating: 2
<runs to Leopard box and super-glues cables to computer>

THERE! Try and get disconnected now!!




RE: ouch
By Alexstarfire on 11/6/2007 3:53:27 PM , Rating: 2
*power cuts off*


but apple products "just work"
By Fenixgoon on 11/6/2007 1:47:45 PM , Rating: 2
and don't make errors!

hey.. someone had to say it =D




Windows
By soydios on 11/6/2007 1:49:00 PM , Rating: 2
"Exact same bug in Windows"

Does that Vista large-number-of-files bug delete the source files? Because whenever a Move operation fails under Windows, all the original files are still there in my experience.




Interesting...
By Montrevux on 11/6/2007 5:24:56 PM , Rating: 2
Engadget hasn't reported this, I wonder why?




By mentalchallenger on 11/7/2007 12:57:26 AM , Rating: 2
I've been able to to lose important files on Vista like this for months. I can't seem to reproduce it when I want to, but it likes happening at the worst possible moments.

Get on the ball, Apple!




By cscpianoman on 11/6/2007 2:40:28 PM , Rating: 3
quote:
I do not have problem in copying 1mb or 25gb of video from an OS 10.2 to the last 10.5 .

Notice the difference in the word copying and moving.


By ToeCutter on 11/6/2007 2:42:19 PM , Rating: 2
I thought the same thing?

I've never had any issue with file corruption/deletion and I've been using OS X for well over a year.

I've copied massive files over both GBe and WIFI, and I've never run across this issue?


By TomZ on 11/6/2007 2:48:05 PM , Rating: 2
I would guess that most of the time you copy files instead of move files. At least in my experience, that is the case.


By aos007 on 11/6/2007 6:54:25 PM , Rating: 2
If you drag and drop in Windows and the destination is a different drive letter, it will default to copy, otherwise it will default to move. I usually do a right-click drag and drop and manually chose the operation, though that's pretty inefficient, but at least I know what's going on.


By theapparition on 11/6/2007 3:30:09 PM , Rating: 2
Have you ever had a drive go down while moving a file?

If not, then you'll never see this bug. If so, then you'll have lost data.

Either way, it needs to be fixed. Just because you haven't had it happen doesn't mean it's not real.


By Snuffalufagus on 11/6/2007 3:25:05 PM , Rating: 2
As difficult as your post is to read I think I can understand from the title that you are stating that the Apple Developers were aware of this bug since the 9A447 build of Leopard. If that is true, then the case is they, while being well aware of the issue, still shipped build 9A581 out to their consumers, and have yet to release an update to fix this and all previous versions of OS X. Very poor practices at work here.


By Quiksel on 11/6/2007 3:38:36 PM , Rating: 1
... as if nobody else ships stuff that has open bugs. What Utopia do you live on?

Figure it out, this is standard development.


By Snuffalufagus on 11/6/2007 3:45:38 PM , Rating: 2
Never said anything about other apps/OSes not having bugs so stop making crap up. He said that this one was known about for several builds and they still shipped it, being that it is a data loss scenario I see that as a very poor practice. It's not like it's a gui bug or something that is easily recovered from. I did figure out that I'm damned glad you're not on my dev team.


By Chris Peredun on 11/6/2007 4:29:44 PM , Rating: 2
For your delectation, here is a "fixed" move command in Unix terms

cp -r $source $dest && rm -rf $source

That took me about five seconds to type, and performs the correct effect.


By amandahugnkiss on 11/6/2007 5:29:03 PM , Rating: 3
why not just use a mv command if you're in Termial already? It seems likely this just a Finder/OSX bug, not a bug in the susbsystem.


By TomZ on 11/6/2007 4:24:17 PM , Rating: 2
quote:
Figure it out, this is standard development.

I understand your point, but at least on the surface, this seems to be an issue that Apple is well aware of and would seem to have a large potential for data loss. I wouldn't call that "standard development," at least for a responsible company. Hopefully this issue is less serious (occurs not very often) than it seems.


"It seems as though my state-funded math degree has failed me. Let the lashings commence." -- DailyTech Editor-in-Chief Kristopher Kubicki

Related Articles













botimage
Copyright 2014 DailyTech LLC. - RSS Feed | Advertise | About Us | Ethics | FAQ | Terms, Conditions & Privacy Information | Kristopher Kubicki