java sdk freseez when trying to read / write files... i think.(jdk1.6.0_12)

C

Clundahl

When trying to run a java program that somehow handles files the
program starts and then freezes. I try to run NetBeans and Eclipse and
some other self made programs, and this happens. The line java -
version do work.

My guess is that it have something to do with reading and/or writing
to files.

I run a process that aims to build an gwt-application and it stops
indefinitely when trying to access my files. I hit ctrl+break and then
it I get this info/stacktrace:

Full thread dump Java HotSpot(TM) Client VM (11.2-b01 mixed mode,
sharing):

"Thread-1" daemon prio=6 tid=0x02fa9c00 nid=0xe78 runnable
[0x030df000..0x030dfd
14]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:177)
at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:
92)
at java.lang.Thread.run(Thread.java:619)

"Thread-0" daemon prio=6 tid=0x02f73400 nid=0x448 runnable
[0x0308f000..0x0308fd
94]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:199)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
- locked <0x22a4a8d8> (a java.io.BufferedInputStream)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.apache.tools.ant.taskdefs.StreamPumper.run(StreamPumper.java:
92)
at java.lang.Thread.run(Thread.java:619)

"Low Memory Detector" daemon prio=6 tid=0x02ad1800 nid=0x454 runnable
[0x0000000
0..0x00000000]
java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x02acb800 nid=0x1658 waiting on
condition
[0x00000000..0x02d7f7bc]
java.lang.Thread.State: RUNNABLE

"Attach Listener" daemon prio=10 tid=0x02ac9c00 nid=0x13fc runnable
[0x00000000.
..0x00000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x02ac8800 nid=0x117c waiting
on conditio
n [0x00000000..0x00000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x02ac0800 nid=0x1644 in Object.wait()
[0x02c8f000
...0x02c8fc94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x22ecfb78> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x22ecfb78> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x02abf000 nid=0x1698 in
Object.wait() [0
x02c3f000..0x02c3fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x22ecfc00> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x22ecfc00> (a java.lang.ref.Reference$Lock)

"main" prio=6 tid=0x00316800 nid=0x10a4 runnable
[0x0092f000..0x0092fe54]
java.lang.Thread.State: RUNNABLE
at java.lang.ProcessImpl.waitFor(Native Method)
at org.apache.tools.ant.taskdefs.Execute.waitFor(Execute.java:551)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:482)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:784)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:
1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

"VM Thread" prio=10 tid=0x02abd800 nid=0x1688 runnable

"VM Periodic Task Thread" prio=10 tid=0x02ad3800 nid=0x176c waiting on
condition


JNI global references: 889

Heap
def new generation total 960K, used 642K [0x229d0000, 0x22ad0000,
0x22eb0000)

eden space 896K, 66% used [0x229d0000, 0x22a64f10, 0x22ab0000)
from space 64K, 72% used [0x22ab0000, 0x22abb970, 0x22ac0000)
to space 64K, 0% used [0x22ac0000, 0x22ac0000, 0x22ad0000)
tenured generation total 4096K, used 653K [0x22eb0000, 0x232b0000,
0x269d0000
)
the space 4096K, 15% used [0x22eb0000, 0x22f53518, 0x22f53600,
0x232b0000)
compacting perm gen total 12288K, used 2106K [0x269d0000, 0x275d0000,
0x2a9d00
00)
the space 12288K, 17% used [0x269d0000, 0x26bdeb98, 0x26bdec00,
0x275d0000)
ro space 8192K, 67% used [0x2a9d0000, 0x2af37448, 0x2af37600,
0x2b1d0000)
rw space 12288K, 53% used [0x2b1d0000, 0x2b844d58, 0x2b844e00,
0x2bdd0000)

The 'FileInputStream' complains some in the beginning of the trace...
This problem just appeared out of the blue, running the programs have
worked earlier... very strange.

Do anybody know how to resolve this (hopefully not by reinstalling)?


Kind regards

Clundahl
 
B

Bill McCleary

Clundahl said:
"Finalizer" daemon prio=8 tid=0x02ac0800 nid=0x1644 in Object.wait()
[0x02c8f000
..0x02c8fc94]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x22ecfb78> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x22ecfb78> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x02abf000 nid=0x1698 in
Object.wait() [0
x02c3f000..0x02c3fd14]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x22ecfc00> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x22ecfc00> (a java.lang.ref.Reference$Lock)

Smells like a deadlock to me, apparently involving a Reference, a
ReferenceQueue, and some object's finalizer. (Oddly, I do not see
anything's finalize method in the "Finalizer" thread's stack trace,
which will make identifying the class with the bum finalizer nontrivial.)
 
R

Roedy Green

Do anybody know how to resolve this (hopefully not by reinstalling)?

It looks like it may have something to do with ANT. Can you run even
a simple ANT script in your IDE?

Read the install instructions to make sure ANT is properly accessible.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Patriotism is fierce as a fever, pitiless as the grave, blind as a stone, and as irrational as a headless hen."
~ Ambrose Bierce (born: 1842-06-24 died: 1914 at age: 71)
 
C

Clundahl

It looks like it may have something to do with ANT.  Can you run even
a simple ANT script in your IDE?

Read the install instructions to make sure ANT is properly accessible.
--
Roedy Green Canadian Mind Productshttp://mindprod.com

"Patriotism is fierce as a fever, pitiless as the grave, blind as a stone, and as irrational as a headless hen."
~ Ambrose Bierce (born: 1842-06-24 died: 1914 at age: 71)

Hello Roedy and Bill
The stack trace I posted comes from an ant script I ran. I cannot run
an IDE, nor Eclipse nor NetBeans works anymore, they just freeze the
entire computer (have been rebooting the computer a lot lately) – just
as the ant script. Presumably they are experiencing the same problem,
trying to write to configuration files when they start up.
The Ant script manages to read the ant-file I guess. Since some
actions succeeds – compiling the code with javac. So reading files do
not cause the jdk to hang but writing.
Just running java –version works, anyway.
I got the stack-trace by turning up the log level of the jvm and then
hitting ctrl+break buttons. This only works when starting inside a dos
shell. Most often even this is not available since the computer hangs
completely after starting the run.
Regards
Clundahl
 
C

Clundahl

Hello Roedy and Bill
The stack trace I posted comes from an ant script I ran. I cannot run
an IDE, nor Eclipse nor NetBeans works anymore, they just freeze the
entire computer (have been rebooting the computer a lot lately) – just
as the ant script. Presumably they are experiencing the same problem,
trying to write to configuration files when they start up.
The Ant script manages to read the ant-file I guess. Since some
actions succeeds – compiling the code with javac. So reading files do
not cause the jdk to hang but writing.
Just  running java –version works, anyway.
I got the stack-trace by turning up the log level of the jvm and then
hitting ctrl+break buttons. This only works when starting inside a dos
shell. Most often even this is not available since the computer hangs
completely after starting the run.
Regards
Clundahl

correction: it seems other stuff than just reading also don’t work, I
just ran (or tried to run) the sample under jdk1.6.0_12\demo\jfc
\Java2D inside a browser and it caused my computer to freeze. Don’t
'know' this code but I dont think it will write anything to disc.
Regards Clundahl
 
B

Bill McCleary

Clundahl said:
correction: it seems other stuff than just reading also don’t work, I
just ran (or tried to run) the sample under jdk1.6.0_12\demo\jfc
\Java2D inside a browser and it caused my computer to freeze. Don’t
'know' this code but I dont think it will write anything to disc.
Regards Clundahl

If this stuff is making the entire machine wedge, and you're not running
it at an elevated priority, then there's a bigger problem. Either an OS
or device driver problem, or a hardware problem (CPU overheating and
flaky memory stick are the two usual suspects with these symptoms).
 
R

Roedy Green

Is other software going weird too? If so you may have a hardware
problem. See http://mindprod.com/bgloss/contacttreating.html

If it is just the Java, try uninstalling your JDKs and IDE and wiping
out all traces of them from the disk and registry and reinstall. These
systems are getting so huge they become unpredictable, more like
living things.

See http://mindprod.com/jgloss/jdk.html

In my part of the world, BC Canada, we are smashing heat records every
day. Your computer could be overheating. Clean out the dust from the
filters and fans.
see http://mindprod.com/bgloss/fan.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Patriotism is fierce as a fever, pitiless as the grave, blind as a stone, and as irrational as a headless hen."
~ Ambrose Bierce (born: 1842-06-24 died: 1914 at age: 71)
 
A

Arne Vajhøj

Clundahl said:
The stack trace I posted comes from an ant script I ran. I cannot run
an IDE, nor Eclipse nor NetBeans works anymore, they just freeze the
entire computer (have been rebooting the computer a lot lately) – just
as the ant script. Presumably they are experiencing the same problem,
trying to write to configuration files when they start up.

First check the health of hardware, Windows and Java.

If you find something and that fixes the problem then you
are all set.

If not then we can continue troubleshooting with a working
basic environment.

Arne
 
C

Clundahl

First check the health of hardware, Windows andJava.

If you find something and that fixes the problem then you
are all set.

If not then we can continue troubleshooting with a working
basic environment.

Arne

Thank you all for your advice!
I think there is something more ‘sinister’ going on here... as you
suggested. I just ran my outlook client and it too caused my computer
to freeze. Will try to find some diagnostic tool for the disc (do
anybody know about such a tool, pref already in windows xp?) – ran
defragmentation during the night and it didn’t cause a crash so I hope
this is somehow recoverable.
Regards
Clundahl
 
R

Roedy Green

I think there is something more ‘sinister’ going on here... as you
suggested. I just ran my outlook client and it too caused my computer
to freeze. Will try to find some diagnostic tool for the disc (do
anybody know about such a tool, pref already in windows xp?) – ran
defragmentation during the night and it didn’t cause a crash so I hope
this is somehow recoverable.

I had some problems like this which we tracked down to noise on the AC
power lines that was caused by some defective lighting. If you can
borrow a UPS, try it out to see if it clears the problem. When I lived
on an island, I had to use one since the power was so flaky.

Also try swapping your power supply.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Patriotism is fierce as a fever, pitiless as the grave, blind as a stone, and as irrational as a headless hen."
~ Ambrose Bierce (born: 1842-06-24 died: 1914 at age: 71)
 
C

Clundahl

I had some problems like this which we tracked down to noise on the AC
power lines that was caused by some defective lighting. If you can
borrow a UPS, try it out to see if it clears the problem. When I lived
on an island, I had to use one since the power was so flaky.

Also try swapping your power supply.
--
Roedy Green Canadian Mind Productshttp://mindprod.com

"Patriotism is fierce as a fever, pitiless as the grave, blind as a stone, and as irrational as a headless hen."
~ Ambrose Bierce (born: 1842-06-24 died: 1914 at age: 71)

It is a laptop computer so I just tried to yank out the power cable
and running it on batteries. I will see if it makes any differens mean
while I am running chkdsk and installing a new jdk.

regards
Clundahl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top