[Cuis-dev] DirectoryEntry and looping symlinks

Casey Ransberger bahweep at icloud.com
Sun May 5 20:33:01 PDT 2019


Comments below

> On May 5, 2019, at 1:05 PM, Phil B via Cuis-dev <cuis-dev at lists.cuis.st> wrote:
> 
> I just ran into an issue which isn't strictly a Cuis issue but it seems like Cuis should handle it better.   The issue was a circular symlink (i.e. /some/dir/path/loops where the loops item was a symlink that pointed back to /some/dir) and I had messed up a package name so apparently Cuis started searching for the bad package name.  So it ends up stumbling on this looping symlink and froze in a loop until it OOM'd the VM.
> 
> Again, my bad symlinks aren't something I expect Cuis to fix, but it seems like it should more gracefully handle situations like this.  Not sure if we have a way to even detect symlinks from the image or if some sort of max path depth check might be the way to go?
> -- 
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev

Yikes! I don’t know if we can detect simlinks either, and I worry it might vary based on the OS. A max depth check could maybe work... do you suggest a global max depth for this purpose, and what do you think it should be if so? Seems a need for something sufficiently large as to not break people’s programs, and small enough not to bring down the balloon, so to speak.

Out of curiosity, while this is occurring, can you do CMD-period* to stop the disaster as it happens? If the VM locks up hard, that seems pretty ouchy. 

* (or whatever it is on Windows)

—Casey


More information about the Cuis-dev mailing list