Ricardo Wurmus writes: > However, this doesn’t seem to help. Yes, the bootstrap script no longer > aborts but it gets stuck compiling things. I can’t get it to tell me > anything about the compilation progress, but strace shows me that it > keeps stat’ing for non-existent files like "/tmp/files16bfb86414e_b" > until the end of the day. > > Judging by the name of the file I think this is ant’s > src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java > that creates them, which is used by Jikes.java. We should see if > there’s a race somewhere or if perhaps “jikes” crashes and thus gets > executed over and over again. The problem appears to be in GNU Classpath (classpath-bootstrap). Its “native/jni/java-io/java_io_VMFile.c” defines “Java_java_io_VMFile_exists”, which returns “1” when a file exists. It does so by calling “cpio_isFileExists” which is defined in “native/jni/native-lib/cpio.c”: --8<---------------cut here---------------start------------->8--- int cpio_isFileExists (const char *filename) { struct stat statbuf; if (stat(filename, &statbuf) < 0) { return errno; } return 0; } --8<---------------cut here---------------end--------------->8--- I have confirmed with printf debugging that there’s a mismatch between what the Java side thinks and what the C side tells it. On the C side the temporary file is determined to not exist yet, but on the Java side it is said to exist — this is in spite of the fact that the Java side only converts the C side’s return value. Here’s an example from the printf output: exists? /tmp/files16bfd145b82_1 : 2 -- 0; classpath trying to create: /tmp/files16bfd145b82_1 exists? true The first line is from C, the 2 is ENOENT, and 0 is the return value. The zero is taken to be a Java boolean, so it maps to false. The second line comes from Java. It hangs in “while (VMFile.exists(file.path))”: --8<---------------cut here---------------start------------->8--- File file; if (!VMFile.IS_DOS_8_3) { do { long now = System.currentTimeMillis(); if (now > last_tmp) { // The last temporary file was created more than 1 ms ago. last_tmp = now; n_created = 0; } else n_created++; String name = Long.toHexString(now); if (n_created > 0) name += '_'+Integer.toHexString(n_created); String filename = prefix + name + suffix; file = new File(directory, filename); } while (VMFile.exists(file.path)); } else … --8<---------------cut here---------------end--------------->8--- I have confirmed that this is the problem by replacing “while (VMFile.exists(file.path))” with “while (false)”. The build doesn’t fully complete then either, but it gets past the compilation of the Ant source files. This clears JamVM and Jikes. I’m attaching my embarrassing printf debugging patches. Any ideas? -- Ricardo