Discussion Locked

Look into JVM with thread dumps

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Tell us what you think about the value of naming threads and getting thread dumps, as featured in the August 15th Java e-newsletter. Has this helped you debug multithreaded Java servers?

5 replies

by avia

Of-course, this only works on Windows (sorry, is that Windows98, Windows2000, Windows NT, Windows ME, Windows XP? I don't know, I don't develop on Windows [any]). So what is the author inferring? That people who don't develop on Windows don't count?That people who develop on Windows have less intelligence than people who don't develop on Windows -- and therefore need to be spoon fed? That people who don't develop on Windows are so clever, they can figure it out for themselves?

Note, that this tip has nothing to do with java. It has to do with the host operating system. As someone who develops on SUN Solaris (excuse me!), and assuming that Windows works similarly, typing -/ amounts to sending a "signal" to a process (in this case the JVM process). The equivalent key combination on Solaris is -| (this is the default -- it can be changed), and the signal that it sends is called SIGQUIT -- which is a symbolic constant having the value 3.

So for all those of you who are developing on SUN Solaris (if there is anyone else ;-), you can find more details from the following "man" pages:

kill(1)
signal(5)
termio(7I)

Thankyou,
Avi.

by bayard-generationjava

Hi Avi,

I'm not sure where the Windows comment
comes from, but the tip works fine on OS X
and Linux. My apologies for not knowing a lot
about Solaris development, no one will give
me one for my birthday :)

In fact, the tip has 2 errors. The first is a typo
error on the most important character in the
whole email, it's Ctrl-\ and not Ctrl-/. The other
is that in Windows it is Ctrl-Break and not Ctrl-
\. So the group I most aggrieved were the
Windows developers.

I'd still view it as a Java tip and not an OS tip
as the important factor is what the JVM does
when it is sent the signal, and not the fact that
signals can be sent.

As for the Windows comment, you seriously
think I'm going to go near that? :) [Weshould
all develop on OS-X *sound of editor slowly
strangling me*].

That all said, thanks for the Solaris info. I
hadn't known it was Ctrl-| there and not Ctrl-\,
and you do a good job of nudging people
towards learning more about signals.

Hen

by jay eckles

>>>My apologies for not knowing a lot
about Solaris development, no one will give
me one for my birthday :) <<<

Well, if you have an intel or sparc based machine, you can have the Solaris 8 or 9 (your choice) from Sun with a developer's license for the cost of the media and shipping. Or, if you have a nice high-speed connection, you can just download it for free and burn it onto your own CD.

http://wwws.sun.com/software/solaris/binaries/index.html

The hardware requirements are modest but strict - you might want to check out the HCL to make sure your modem, nic, sound, and video cards will work.

Happy birthday.

by bayard-generationjava

My deep apologies, but this tip contained two
major errors.

The first is a typographical one that happens
to occur on the most important character. It is
Ctrl-\ and not Ctrl-/.

The second is for the Windows users out
there. The keyboard sequence is Ctrl-Break
and not Ctrl-\.

[Given these, and the Ctrl-| note that Avi has
made for Solaris users, then hopefully people
will be able to use this most basic of thread-
debugging :) ]

For more advanced debugging,

http://java.sun.com/j2se/1.3/debugging/
index.html

Hen

by subir.sengupta

Ctrl \ doesn't seem to work on Linux. I have the JVM running and when I press Ctrl \ in a shell nothing happens. Where would I see the thread dump?

Thanks,
Subir

This discussion is closed to new replies.