Conversation
Notices
-
Embed this notice
figured out where my bootstrapping-ant problem is
# cat HangTest.java
import java.io.File;
import java.io.IOException;
class HangTest {
public static void main(String[] args) {
System.out.println("it should hang here:");
try {
File result = File.createTempFile("pre","suf");
}
catch (IOException ioe) { /** not gonna happen */ }
System.out.println("did it?");
}
}
#javac HangTest.java
(some warnings here)
#java HangTest
what should the output be?
-
Embed this notice
@jeffcliff I don't see why it should hang. The call to createTempFile should either complete quickly, or throw an exception. I'd only expect it to hang if the underlying filesystem has some issue.
-
Embed this notice
@taylan exactly
something is definitely wrong here.
and if it were "filesystem issues" i shouldn't be able to mess around with files via other means.
java.io.File is pretty fundamental.
-
Embed this notice
@taylan ie
# touch /tmp/bootyhole
# echo $?
0
-
Embed this notice
@jeffcliff Yeah something definitely broken badly there. Seen your messages on IRC...
-
Embed this notice
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235008>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235110>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235218>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235320>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235428>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235530>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235638>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235740>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235848>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235950>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235a58>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235b60>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235c68>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235d70>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235e78>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7235f80>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236088>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236190>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236298>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf72363a0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf72364a8>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf72365b0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf72366b8>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf72367c0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf72368c8>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf72369d0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236ad8>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236be0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236ce8>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236df0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7236ef8>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237000>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237108>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237210>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237318>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237420>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237528>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237630>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237738>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237840>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237948>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237a50>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237b58>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237c60>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237d68>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237e70>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7237f78>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7238080>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7238188>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated class object @0x7f3cf7238290>
folllowed eventually by
<ALLOC: allocated java/util/zip/ZipEntry object @0x7fdc46a951f0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/util/LinkedHashMap$LinkedHashEntry object @0x7fdc46a95268>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/lang/String object @0x7fdc46a952b0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated [C array object @0x7fdc46a952e8>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/util/zip/ZipEntry object @0x7fdc46a95378>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/util/LinkedHashMap$LinkedHashEntry object @0x7fdc46a953f0>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated java/lang/String object @0x7fdc46a95438>
<ALLOC: took 0 tries to find block.>
<ALLOC: allocated [C array object @0x7fdc46a95470>
it's definitely stuck in a loop.
-
Embed this notice
oh yeah definitely a loop
<DLL: Calling JNI method java/io/VMFile.exists(Ljava/lang/String;)Z>
<DLL: Calling JNI method java/lang/VMSystem.nanoTime()J>
<DLL: Calling JNI method java/io/VMFile.exists(Ljava/lang/String;)Z>
<DLL: Calling JNI method java/lang/VMSystem.nanoTime()J>
<DLL: Calling JNI method java/io/VMFile.exists(Ljava/lang/String;)Z>
<DLL: Calling JNI method java/lang/VMSystem.nanoTime()J>
<DLL: Calling JNI method java/io/VMFile.exists(Ljava/lang/String;)Z>
<DLL: Calling JNI method java/lang/VMSystem.nanoTime()J>
<DLL: Calling JNI method java/io/VMFile.exists(Ljava/lang/String;)Z>
...
-
Embed this notice
there's 2 possible places this could be where VMFile.exists happens in a loop like this in createTempFile basically a case for 8.3 files and one for non-8.3 files
-
Embed this notice
so cpio.c and stat(2) seem to be doing the right thing. something in VMFile.exists() isn't.
-
Embed this notice
woooah i threw a printf in between the failing things and suddenly it no longer hangs
-
Embed this notice
works:
int returnval = (result == CPNATIVE_OK ? 1 : 0);
return returnval;
doesn't work:
return result == CPNATIVE_OK ? 1 : 0;
is it possible that ? : is somehow taking precedence over == but only when i compile java?
-
Embed this notice
i'm so going to have to go and put brackets around all of these return result = a ? b : c aren't i
-
Embed this notice
did i lose my copy of K&R in the hard drive failure?
-
Embed this notice
naturally, now ant segfaults way earlier in the compile than without this .
-
Embed this notice
(gdb) bt
#0 0x000055be176f0023 in findHashedClass (
classname=classname@entry=0x7ffe18d975b0 "java/lang/Class",
class_loader=class_loader@entry=0x7f44946c5d00) at class.c:1277
#1 0x000055be176f16f4 in findNonArrayClassFromClassLoader (
classname=0x7ffe18d975b0 "java/lang/Class", loader=0x7f44946c5d00) at class.c:1367
#2 0x000055be176f1a4e in createArrayClass (
classname=classname@entry=0x55be56e68560 "[Ljava/lang/Class;", class_loader=0x7f44946c5d00,
class_loader@entry=0x7f44946c5da0) at class.c:608
#3 0x000055be176f1b60 in findArrayClassFromClassLoader (
classname=0x55be56e68560 "[Ljava/lang/Class;", class_loader=0x7f44946c5da0) at class.c:1317
#4 findArrayClassFromClassLoader (classname=0x55be56e68560 "[Ljava/lang/Class;",
class_loader=0x7f44946c5da0) at class.c:1313
#5 0x000055be1770407f in executeJava () at interp.c:2127
#6 0x000055be176f43d3 in executeMethodVaList (ob=0x0, class=0x7f44949f95e8, mb=0x55be56e56fb0,
jargs=jargs@entry=0x7ffe18d97750) at execute.c:101
#7 0x000055be176f457f in executeMethodArgs (ob=ob@entry=0x0, class=class@entry=0x7f44949f95e8,
mb=<optimized out>) at execute.c:73
#8 0x000055be176f1430 in initClass (class=0x7f44949f95e8) at class.c:1160
#9 0x000055be176fe280 in resolveMethod (class=<optimized out>, cp_index=<optimized out>)
at resolve.c:192
#10 0x000055be17703a39 in executeJava () at interp.c:1580
#11 0x000055be176f43d3 in executeMethodVaList (ob=0x0, class=0x7f44949f2f40, mb=0x55be56e4ee70,
jargs=jargs@entry=0x7ffe18d979b0) at execute.c:101
#12 0x000055be176f457f in executeMethodArgs (ob=ob@entry=0x0, class=class@entry=0x7f44949f2f40,
mb=mb@entry=0x55be56e4ee70) at execute.c:73
#13 0x000055be176ea7f9 in main (argc=10, argv=0x7ffe18d97c98) at jam.c:350
which is
table = (HashTable*)INST_DATA(vmdata)[ldr_data_tbl_offset];
where
#define INST_DATA(objectRef) ((uintptr_t*)(objectRef+1))