ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45499] DirectoryScanner infinitely recurses on symlinks to parent directories
Date Tue, 28 Oct 2008 11:55:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45499





--- Comment #20 from Stefan Bodewig <bodewig@apache.org>  2008-10-28 04:55:54 PST ---
Alvaro,

in your case it is the sheer number of symbolic links together with a strange
decision made by Apple about their symlinks.

If I read the logs correctly then
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/shared_bundle
is a symbolic link pointing to
/System/Library/Frameworks/JavaVM.framework/
(this is consistent with Tim's description).

So even if Ant follows that symlink only once, it will end up scanning all your
installed JVMs for jars (and each of them has a different symlink pointing to
the same place).  No symlink loop detection code is going to save you from the
OOM you see if there are seven VMs (1.4, 1.4.1, 1.4.2, 1.5, 1.5.0, 1.6 and
1.6.0) to recurse into.

Even with maxlevelsofsymlinks="1", the bootclasspath built-up in your compile
target is huge.

I'd suggest to change your build file to read

      <bootclasspath>
        <fileset dir="${java.13.home}" includes="**/*.jar"
                 excludes="**/shared_bundle/**/>
      </bootclasspath>

instead of

      <bootclasspath>
        <fileset dir="${java.13.home}" includes="**/*.jar"/>
      </bootclasspath>

and do the same to the 1.5 javac task.

I don't think there is anything the Ant team can do, sorry.

I'm not closing this right away since I found a few places where Ant creates
internal filesets where we should better restrict the number of symlinks
followed, but these are unrelated to your case.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Mime
View raw message