WARNING: Potential OS X Bug

Discussion in 'macOS' started by akadmon, Feb 27, 2007.

  1. akadmon Suspended

    Aug 30, 2006
    New England
    Unplugging an external USB hard drive while your Mac is in sleep mode may reset the Date Modified settings of all the files on the external drive to December 31 1969. I have duplicated this several times with the following setup:

    Mac Pro
    OS X 10.4.8 (with latest security patches)
    Maxtor OneTouch II (formatted as Mac OS Extended Journaled)​

    I've called Apple Care about this and they acknowledge that this can happen. There is no way of getting the dates back!:eek:

    Does anyone know the significance of December 31 1969? Perhaps it was a momentous day in Steve Jobs' life (strange things can happen to a 14 year old on New Year's Eve ;) )
  2. Blubbert macrumors 6502

    Nov 1, 2006
  3. iMeowbot macrumors G3


    Aug 30, 2003
    The beginning of time in Unix is midnight, 1 Jan 1970, UTC. If you live west of Greenwich, you'll see a date on 31 Dec 1969 because of the time zone difference.
  4. skoker macrumors 68000


    Aug 6, 2005
    It's not a bug, it's the user being stupid and intentionally damaging their files by not unmounting their disk before removing it :rolleyes:

    Carry on folks, nothing to see here...

  5. akadmon thread starter Suspended

    Aug 30, 2006
    New England
    The computer is in sleep mode, the drive heads are parked. The files are not damaged (afaik) in any other way. It is obvious that there is some STUPID code in OS X that resets the dates in this situation. Explain to me how and why this happens, oh Enlightened One.
  6. zblaxberg Guest


    Jan 22, 2007
    well put...I don't understand who would want to pull the disk out while the computer is sleeping...it just doesn't make sense
  7. Nermal Moderator


    Staff Member

    Dec 7, 2002
    New Zealand
    I'd like to clarify something here. Just because the computer's asleep does not mean that it's not using the drive. Sleeping the computer essentially "pauses" whatever it's doing. If you unplug the drive while the computer's asleep, you've basically done the same thing as yanking the drive while the thing's running.
  8. akadmon thread starter Suspended

    Aug 30, 2006
    New England
    Not true in this case. Disconnecting the drive while the Mac is running does not cause the file dates to be lost. Yes, I've done this several times just now (to prove the point), but no worries -- this is a backup drive and I'm going to have to copy everything back to it anyway to restore the dates.
  9. PlaceofDis macrumors Core

    Jan 6, 2004
    this exact problem does not occur, but you'll get a dialogue saying that the drive was not dismounted properly, which is what happens when you unplug it while the computer is asleep too.
  10. ElectricSheep macrumors 6502


    Feb 18, 2004
    Wilmington, DE
    Its a very bad idea to disconnect a drive without unmounting it first, even if you think the 'heads are parked' and the drive is idle.

    Disk accesses--reads and writes--are slow. Operating system try to make the best of the resources they have to speed things up, and that includes read-caching and write-back caching. Write-back caching is a process in which changes to information that is in a memory cache are not written back to the disk right away. Instead, the information is tagged as dirty and it is only written back when the information is flushed from the cache.

    When you explicity unmount a disk, write-back caches are flushed and the changes are sent to the drive before you disconnect it. If you just disconnect the drive without unmounting it, you run the risk of having those changes never make it back to disk and if those changes were to critical parts of the filesystem you have a real problem.
  11. Peace macrumors Core


    Apr 1, 2005
    Space--The ONLY Frontier
    Excellent description!!

  12. bousozoku Moderator emeritus

    Jun 25, 2002
    Gone but not forgotten.
    I wouldn't go that far.

    I've got an external drive that did not wake from sleep as quickly as Mac OS X and I got a warning about removing the drive, even though it was still attached. Had Mac OS X waited for the drive to wake, there wouldn't have been a problem.
  13. akadmon thread starter Suspended

    Aug 30, 2006
    New England
    To add to this, while using a one of the recent beta version of Parallels all my USB drives were getting disconnected after booting the VM, resulting in the OS X warning.

    I still maintain that the resetting of file dates is not something that has to happen (it does not happen me under Windows XP). Apple should address this in the next version of the OS.

Share This Page