Posts:
1,032
Registered:
Dec 16, 2001
From:
Powell, OH
Age:
37 Home page
Server woes - JVM crashes
Posted:
Mar 10, 2005, 3:19 PM
So you might have noticed the server still crashes on occasion. There are currently 2 problems I know of that have been happening since the server move.
The first on is a java bug, so not a whole lot I can do about it. It seems to occur once a week or so. The JVM crashes when trying to resolve the localhost name, but randomly. Here is the JVM message, maybe someone will find this via google and have an answer, I couldn't find any solutions anywere. From similar bug reports at Sun, it seems like most likely the native call to get the local host name returns an answer the JVM doesn't know how to handle and then everything blows up. I can't stop calling that function, it is in tomcat and in jive (forum software).
An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40088346 Function=fgets_unlocked+0x26 Library=/lib/libc.so.6
Current Java thread: at java.net.Inet4AddressImpl.getHostByAddr(Native Method) at java.net.InetAddress$1.getHostByAddr(InetAddress.java:774) at java.net.InetAddress.getHostFromNameService(InetAddress.java:464) at java.net.InetAddress.getHostName(InetAddress.java:407) at java.net.InetAddress.getHostName(InetAddress.java:379) at org.apache.coyote.http11.Http11Processor.parseHost(Http11Processor.java:1280) at org.apache.coyote.http11.Http11Processor.prepareRequest(Http11Processor.java:1248) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:783) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)
Heap at VM Abort: Heap def new generation total 24768K, used 20688K [0x44880000, 0x46360000, 0x46360000) eden space 22016K, 92% used [0x44880000, 0x45c69748, 0x45e00000) from space 2752K, 10% used [0x460b0000, 0x460fa960, 0x46360000) to space 2752K, 0% used [0x45e00000, 0x45e00000, 0x460b0000) tenured generation total 330880K, used 227882K [0x46360000, 0x5a680000, 0x5a680000) the space 330880K, 68% used [0x46360000, 0x541eaba8, 0x541eac00, 0x5a680000) compacting perm gen total 24064K, used 23988K [0x5a680000, 0x5be00000, 0x5e680000) the space 24064K, 99% used [0x5a680000, 0x5bded090, 0x5bded200, 0x5be00000)
Local Time = Thu Jan 13 17:28:25 2005 Elapsed Time = 278970 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) #
I'm running Debian woody, with some packages from sarge (including libc6, the latest version 2.3.2.ds1-20).
The localhost should be determined by my DNS server running on the same machine according to my /etc/nsswitch.conf file: ... hosts: files dns ...
/etc/hosts doesn't list the IP for pente.org so it shouldn't find it there and then should try dns.
My dns configuration isn't anything fancy, and I think everything is ok for pente.org.
I don't know, this is an annoying one.
The second problem I just noticed twice in the past week, the server doesn't crash, it hangs. This is probably a deadlock caused by improper synchronization somewhere in my code. It might have been caused by some of the recent changes, I'm not sure. I will have to review what I've added recently and see if I can find it. Recently I have been adding alot of code that connects the game server to code serving html pages, that always worries me a little since it opens up many possibilities for these types of synchronization problems.
Anyways, hang in there, I'm working on resolving the server problems!
Posts:
1,032
Registered:
Dec 16, 2001
From:
Powell, OH
Age:
37 Home page
Re: Server woes - JVM crashes
Posted:
May 24, 2005, 3:47 PM
Nope, still happening.
Here is my latest attempt. It happens doing reverse DNS lookups (not all the time, just what seems to me to be randomly). My server resolves DNS lookups by first using the nameserver on the same machine (I run my own DNS server for pente.org). However, I don't provide reverse DNS entries, since my hosting company has the authority for that, so they host my reverse DNS entry.
So, I changed the server to not even look at my local nameserver, instead to jump right to my hosting company's nameserver. I don't know, maybe that will do the trick.
If not, I plan on modifying either the underlying code of the JVM (not sure about that), or I will modify the underlying linux code, my modifications would just hardcode in the IP of pente.org so as to always handle it correctly.