Skip navigation

symbolic links get corrupted by system process?

18915 Views 232 Replies Latest reply: Jan 21, 2014 2:54 AM by robertk1 RSS
1 2 3 ... 16 Previous Next
ktwalker69 Level 1 Level 1 (0 points)
Currently Being Moderated
Apr 20, 2012 3:47 PM

Greetings Folks,

 

This was posted in another forum, so I'm reposting two messages here:

 

I am having a problem with symbolic links getting corrupted.  I have a new Mac Pro running 10.7.3.  I have defined symbolic links

 

/Users/walker/G2S -> /Volumes/L2A/G2S [this is pointing to a different partition on the same JBOD RAID]

/home -> /Users

 

The second link was created after unmounting /home and removing it from the /etc/auto_master file.

 

Both symbolic links worked for several days.  But then for some reason, without a reboot, the links became corrupted:

 

> pwd

/Users/walker

> ls -al G2S

lrwxr-xr-x  1 walker  staff  16 Mar 24 03:08 G2S -> X??G???Gҡ?G???G

> cd G2S

G2S: No such file or directory.

 

Same nonsensical definition for /home link.  I repeat, this did not happen after a reboot.  It first happened on /home.  I thought that might have been related to a new OS handling of the "/home" label.  So I deleted the /home link and did a clean reboot.  The G2S link was created after that reboot, not before.

 

After the above two problems happened, I created a new symbolic link

 

/Users/walker/G2S2 -> /Volumes/L2A/G2S

 

I then did not use this new symbolic link in any of my processing scripts.  A few weeks went by, then this link somehow got corrupted too:

 

lrwxr-xr-x   1 walker  staff     16 Apr  2 17:22 G2S2 -> 꺄G???Gĺ?Gú?G

 

Does anyone here know how symbolic links are managed on a Mac (any process that controls their linking?), or have any information to help me figure out how to fix this?  For example, could it be due to bad RAM?  I have 32 GB.

 

Thank you,

Kris Walker

Mac Pro, Mac OS X (10.7.3)
  • etresoft Level 7 Level 7 (23,880 points)
    Currently Being Moderated
    Apr 20, 2012 4:35 PM (in response to ktwalker69)

    Did you remember to do "automount -vc" after hacking up those config files?

  • etresoft Level 7 Level 7 (23,880 points)
    Currently Being Moderated
    Apr 20, 2012 7:43 PM (in response to ktwalker69)

    It could be a problem with that RAID. I've never seen anything like that.

     

    However, you didn't answer my question. If you make any changes to the autofs config files, it is critical to do "sudo automount -vc" before making any changs to the affected paths.

  • etresoft Level 7 Level 7 (23,880 points)
    Currently Being Moderated
    Apr 21, 2012 12:51 PM (in response to ktwalker69)

    ktwalker69 wrote:

     

    I misspoke slightly.  / is on its own disk, not the RAID that /Volumes/L2A is on.  So I doubt the problem seen with /home -> /Users reflects a RAID issue.

     

    / is the root directory and has no disk. Any directories under / could be mount points for other volumes.

     

    I did not execute that command.

     

    It is not optional. Changing an active automount point without flushing the cache could lead to unpredictable results.

     

    Does anyone know which process controls the symbolic linking on Macs?  Is there a process, or is this a built-in kernel function?

     

    There is no specific process. It is part of the HFS+ file system. Technically, symbolic links are just hacks in the HFS+ file system. It is quite old and was not designed for such things.

     

    I say boot into your recovery volume and repair your file systems.

  • etresoft Level 7 Level 7 (23,880 points)
    Currently Being Moderated
    Apr 21, 2012 6:02 PM (in response to ktwalker69)

    ktwalker69 wrote:

     

    Your command is one way of achieving the same result as what I did with a reboot to follow.  And no, the "-v" argument is not "critical" or "non-optional".

    No, the "verbose" flag is not optional, but the rest of it is. Rebooting would do the same thing as long as you did everything in the proper sequence. You would have to change the config files, reboot, then change the directories. It is a risky operation anyway because any system update could reset those config files. It is best to define your own mount points.

     

    Symbolic links are very useful constructs that I'm thankful wise people at Apple decided not to hack away from the BSD core they used for OSX.

    Sorry, but here is not BSD core in MacOS X. There is a mach core and there is a BSD compatibility layer.

  • dburr Calculating status...
    Currently Being Moderated
    Aug 2, 2012 12:10 PM (in response to ktwalker69)

    I am seeing the exact same problem on my Mac Pro Early 2008, and NO RAID or JBOD or other non-standard disk type is involved.  Unfortunately there seems to be no rhyme or reason to the symlink corruption (at least none that I can detect).  I remember it started happening right around the time I went from Snow Leopard to Lion (note I did a clean install, NOT an upgrade).  I don't recall if this issue happened while running Snow Leopard.  And unfortunately it is still happening in Mountain Lion (happened just this morning as a matter of fact).

  • etresoft Level 7 Level 7 (23,880 points)
    Currently Being Moderated
    Aug 2, 2012 1:04 PM (in response to dburr)

    How clean is clean? I wrote a little diagnostic program to help show what might be causing some problems. Download EtreCheck from http://www.etresoft.com/download/EtreCheck.zip, run it, and paste the results here. Ideally, start your own thread and paste the results there.

     

    Disclaimer: Although EtreCheck is free, there are other links on my site that could give me some form of compensation, financial or otherwise.

  • Smeevil Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 5, 2012 2:41 PM (in response to ktwalker69)

    We are experiencing the exact same problems. A Mac pro with raid 0+1 configuration. We first noticed the problem with Lion. Then when Mountain Lion came out we did a complete clean install. (restored the install esd image to an external disk and booted from that, formatted the raid completely and installed mountain lion). Now it turns out we have the exact same symbolic link corruption going on again...

     

    We are trying to narrow down the root cause. We have tried to create a disk image and formatted that hfs ( not hfs+ ) and mount that. On the disk image we do not get the corruption o.O this to me is kind of strange since the disk image is  on the same file system / raid as the os. So far we are guessing it has to do with the raid and hfs+ but if that would be the case then a lot more people should have had this problem right ?

     

    We also got into contact with apple enterprise about this but they have never encountered this problem before and have no idea what to do about it.

     

    To exclude faulte memory we did run several mem tests and they all turn out successfull.

     

    Anyways please let us know if you want us to test something to get to the bottom of this problem so we can solved it not only for us but for all other people having the same problem.

  • Smeevil Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 5, 2012 2:44 PM (in response to etresoft)

    We will run the etresoft diagnostics tomorrow and update here with the results

  • Smeevil Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 6, 2012 12:59 AM (in response to Smeevil)

    Hardware Information:

              Mac Pro - model: MacPro5,1

              2 2.93 GHz 6-Core Intel Xeon CPUs: 12 cores

              32 GB RAM

     

    System Software:

              OS X 10.8 (12A269) - Uptime: 4 days 8:54

     

    Disk Information:

              HL-DT-ST DVD-RW GH61N 

     

    USB Information:

              Apple Inc. BRCM2046 Hub

                        Apple Inc. Bluetooth USB Host Controller

     

    FireWire Information:

     

    Kernel Extensions:

     

    Problem System Launch Daemons:

                     [failed] com.apple.emond.aslmanager.plist

                     [failed] com.apple.xprotectupdater.plist

     

    Problem System Launch Agents:

                     [failed] com.apple.afpstat.plist

     

    Launch Daemons:

                     [loaded] homebrew.mxcl.memcached.plist

                     [loaded] homebrew.mxcl.redis.plist

                     [loaded] org.macosforge.xquartz.privileged_startx.plist

     

    Launch Agents:

                     [loaded] org.macosforge.xquartz.startx.plist

     

    User Launch Agents:

     

    User Login Items:

              None

     

    3rd Party Preference Panes:

    None

    Internet Plug-ins:

              JavaAppletPlugin.plugin

              QuickTime Plugin.plugin

     

    User Internet Plug-ins:

     

    Bad Fonts:

              None

     

    Top Processes:

              6.9   %          screensharingd

              6.7   %          ScreensharingAgent

              1.5   %          WindowServer

              0.9   %          opendirectoryd

              0.5   %          fontd

              0.5   %          CoreRAIDServer

              0.5   %          EtreCheck

              0.3   %          mds

              0.2   %          redis-server

              0.2   %          ps

     

     

    The broken symlink results are for example :

     

    osxsrv:/usr/local/Cellar/Cellar admin$ sudo find -L . -type l

    ./bazaar/2.5.1/bin/bzr

    ./rbenv/0.3.0/bin/rbenv

     

     

    lrwxr-xr-x  1 admin  admin   42 Aug  2 11:50 bzr -> ?????]i????????]i????????]i????????]i?????

    lrwxr-xr-x  1 admin  wheel   16 Dec 26  2011 rbenv ->    %?%         

  • barttenbrinke Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 6, 2012 1:24 AM (in response to ktwalker69)

    I have the same problems and so does this person: http://woss.name/2012/01/29/symlink-corruption-on-mac-os-x/ . Neither of us has found a solution for it yet.

  • twtwtw Level 5 Level 5 (4,580 points)
    Currently Being Moderated
    Aug 6, 2012 7:12 AM (in response to Smeevil)

    Just out of curiosity, have you booted into the recovery partition and run Disk Utility to verify the disk and its permissions?  Symkbolic links are just files (small files that contain a POSIX path to the target), so if a symlink is corrupted it suggests that the symlink file is corrupted, which in turn suggests some more pervasive HFS corruption.

1 2 3 ... 16 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (4)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.