WARNING: Potential OS X Bug

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

  1. akadmon macrumors 68010

    Joined:
    Aug 30, 2006
    Location:
    New England
    #1
    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

    Joined:
    Nov 1, 2006
  3. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #3
    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

    skoker

    Joined:
    Aug 6, 2005
    #4
    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...

    [​IMG]
     
  5. akadmon thread starter macrumors 68010

    Joined:
    Aug 30, 2006
    Location:
    New England
    #5
    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

    zblaxberg

    Joined:
    Jan 22, 2007
    #6
    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

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #7
    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 macrumors 68010

    Joined:
    Aug 30, 2006
    Location:
    New England
    #8
    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

    Joined:
    Jan 6, 2004
    #9
    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

    ElectricSheep

    Joined:
    Feb 18, 2004
    Location:
    Wilmington, DE
    #10
    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 P6

    Peace

    Joined:
    Apr 1, 2005
    Location:
    Space--The ONLY Frontier
    #11
    Excellent description!!

    Kudos.
     
  12. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #12
    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 macrumors 68010

    Joined:
    Aug 30, 2006
    Location:
    New England
    #13
    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