VPS + javac = disaster??

Java, especially the java compiler (javac), isn’t working (10% of the time it works, wtf? ).

Hi, installed Java before on my vps and haven’t noticed problems. But now the compiler and java itself are horribly inconsistent. The Java compiler hangs up and gets stuck, sometimes in -verbose mode it says “something about parsing” and then nothing. Sometimes Ctrl+C gets me out of it, most of the time I need to open another shell and kill -9 the process.

I mean a simple program like HelloWorld. I’ve installed at least 6 “different” java versiona and reinstalled my VPS 3 times with CentOS 5, Debian and Ubuntu ( 32bit all, VPS cpu is 32bit as well ). What the hell is wrong? Could it be the hardware my VPS uses??

This is basically what I’ve been trying to compile. Sometimes the compilation works and running with Java prints out the message.

class Hello { public static void main(String[] args) { System.out.println("Hello"); } } 

Why am I doing this? I’d like to be able to code with jed directly at my VPS over ssh. Doing small things and test, mostly network based. Like an Echo server.

What should I do?? I don’t understand why the compiler is crazy like this - should I change VPS service?

Move your ass over to a proper VPS provider. (that’s not an affiliate link btw).

Linode is way too expensive for me. I’m not running a business. Currently I pay 10€ for a whole year (100GB Transfer/month, 5GB storage, 256RAM) for my root accessed VPS - it’s all I need. Only recently did Java start to fail :frowning:

Afaik linode doesn’t provide a similarly priced service.

How can the compiler just NOT work anyway? wtf? Can a hardware upgrade really destroy java like this?

A VPS for 10 EUR / year is unrealistic. Expect crap.

10 EUR / month is realistic for a minimal VPS.
5 EUR / month is cheap and a sign of low quality/service/limits.

No really it’s actually been really awesome. The control panel works flawlessly, lots of distros to choose from. All that kind of jazz. Worked fine for 5 months. It’s Swedish so dunno if that matters:P http://www.oderland.se/

But alas… Java is broken! O.O - more importantly, why ? Is it really new hardware that could be the cause?

Great that the control panel works flawlessly. Personally I’d rather the host did. You are getting what you are paying for.

Well. The point remains, why isn’t the java compiler working? It’s worked before, there’s no restrictions, sometimes it gives errors, mostly it just does nothing, very rarely it actually manages to compile.

I FileZillaed the error log that the compiler spat out once (When compiling a helloworld program), maybe a glance would enlighten any of you towards an explanation?

With the help of a wonderful sir at their support we upgraded my account to a premium one to test if that would fix the problem, it didn’t. :confused:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (nmethod.cpp:2175), pid=441, tid=3066874736
#  guarantee(nm->_lock_count >= 0) failed: unmatched nmethod lock/unlock
#
# JRE version: 6.0_31-b04
# Java VM: Java HotSpot(TM) Client VM (20.6-b01 mixed mode, sharing linux-x86 )
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x09938c00):  JavaThread "main" [_thread_in_vm, id=442, stack(0xb68cd000,0xb6ccd000)]

Stack: [0xb68cd000,0xb6ccd000],  sp=0xb6ccb3e4,  free space=4088k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x469140]  VMError::report_and_die()+0x2b0
V  [libjvm.so+0x1c674e]  report_vm_error(char const*, int, char const*, char const*)+0x3e
V  [libjvm.so+0x374da8]  nmethodLocker::unlock_nmethod(nmethod*)+0x68
V  [libjvm.so+0x3cfca4]  SharedRuntime::resolve_sub_helper(JavaThread*, bool, bool, Thread*)+0x1d4
V  [libjvm.so+0x3cfa1d]  SharedRuntime::resolve_helper(JavaThread*, bool, bool, Thread*)+0x4d
V  [libjvm.so+0x3d0bdd]  SharedRuntime::resolve_opt_virtual_call_C(JavaThread*)+0x3d
v  ~RuntimeStub::resolve_opt_virtual_call
J  java.lang.StringCoding.deref(Ljava/lang/ThreadLocal;)Ljava/lang/Object;
j  java.lang.String.<init>([BIILjava/lang/String;)V+30
J  com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.readEntry(ILjava/util/List;Ljava/util/Map;)I
j  com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.access$000(Lcom/sun/tools/javac/zip/ZipFileIndex$ZipDirectory;)V+1
j  com.sun.tools.javac.zip.ZipFileIndex.checkIndex()V+99
j  com.sun.tools.javac.zip.ZipFileIndex.<init>(Ljava/io/File;IZZLjava/lang/String;)V+112
j  com.sun.tools.javac.zip.ZipFileIndex.getZipFileIndex(Ljava/io/File;IZLjava/lang/String;Z)Lcom/sun/tools/javac/zip/ZipFileIndex;+48
j  com.sun.tools.javac.util.DefaultFileManager.openArchive(Ljava/io/File;)Lcom/sun/tools/javac/util/DefaultFileManager$Archive;+460
j  com.sun.tools.javac.util.DefaultFileManager.listDirectory(Ljava/io/File;Ljava/lang/String;Ljava/util/Set;ZLcom/sun/tools/javac/util/ListBuffer;)V+34
j  com.sun.tools.javac.util.DefaultFileManager.list(Ljavax/tools/JavaFileManager$Location;Ljava/lang/String;Ljava/util/Set;Z)Ljava/lang/Iterable;+82
j  com.sun.tools.javac.jvm.ClassReader.fillIn(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;)V+52
j  com.sun.tools.javac.jvm.ClassReader.complete(Lcom/sun/tools/javac/code/Symbol;)V+94
j  com.sun.tools.javac.code.Symbol.complete()V+19
j  com.sun.tools.javac.comp.Enter.visitTopLevel(Lcom/sun/tools/javac/tree/JCTree$JCCompilationUnit;)V+119
j  com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(Lcom/sun/tools/javac/tree/JCTree$Visitor;)V+2
j  com.sun.tools.javac.comp.Enter.classEnter(Lcom/sun/tools/javac/tree/JCTree;Lcom/sun/tools/javac/comp/Env;)Lcom/sun/tools/javac/code/Type;+12
j  com.sun.tools.javac.comp.Enter.classEnter(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/comp/Env;)Lcom/sun/tools/javac/util/List;+30
j  com.sun.tools.javac.comp.Enter.complete(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/code/Symbol$ClassSymbol;)V+36
j  com.sun.tools.javac.comp.Enter.main(Lcom/sun/tools/javac/util/List;)V+3
j  com.sun.tools.javac.main.JavaCompiler.enterTrees(Lcom/sun/tools/javac/util/List;)Lcom/sun/tools/javac/util/List;+63
j  com.sun.tools.javac.main.JavaCompiler.compile(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)V+69
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)I+573
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;)I+7
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;)I+15
j  com.sun.tools.javac.Main.compile([Ljava/lang/String;)I+12
j  com.sun.tools.javac.Main.main([Ljava/lang/String;)V+97
v  ~StubRoutines::call_stub
V  [libjvm.so+0x24cc91]  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x1c1
V  [libjvm.so+0x38d168]  os::os_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x18
V  [libjvm.so+0x24cabf]  JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*)+0x2f
V  [libjvm.so+0x281004]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*)+0x124
V  [libjvm.so+0x27062c]  unsigned+0x14c
C  [javac+0x1ba8]  JavaMain+0x2c8
C  [libpthread.so.0+0x57b0]  short+0xa0

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v  ~RuntimeStub::resolve_opt_virtual_call
J  java.lang.StringCoding.deref(Ljava/lang/ThreadLocal;)Ljava/lang/Object;
j  java.lang.StringCoding.decode(Ljava/lang/String;[BII)[C+3
j  java.lang.String.<init>([BIILjava/lang/String;)V+30
J  com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.readEntry(ILjava/util/List;Ljava/util/Map;)I
j  com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.buildIndex()V+69
j  com.sun.tools.javac.zip.ZipFileIndex$ZipDirectory.access$000(Lcom/sun/tools/javac/zip/ZipFileIndex$ZipDirectory;)V+1
j  com.sun.tools.javac.zip.ZipFileIndex.checkIndex()V+99
j  com.sun.tools.javac.zip.ZipFileIndex.<init>(Ljava/io/File;IZZLjava/lang/String;)V+112
j  com.sun.tools.javac.zip.ZipFileIndex.getZipFileIndex(Ljava/io/File;IZLjava/lang/String;Z)Lcom/sun/tools/javac/zip/ZipFileIndex;+48
j  com.sun.tools.javac.util.DefaultFileManager.openArchive(Ljava/io/File;)Lcom/sun/tools/javac/util/DefaultFileManager$Archive;+460
j  com.sun.tools.javac.util.DefaultFileManager.listDirectory(Ljava/io/File;Ljava/lang/String;Ljava/util/Set;ZLcom/sun/tools/javac/util/ListBuffer;)V+34
j  com.sun.tools.javac.util.DefaultFileManager.list(Ljavax/tools/JavaFileManager$Location;Ljava/lang/String;Ljava/util/Set;Z)Ljava/lang/Iterable;+82
j  com.sun.tools.javac.jvm.ClassReader.fillIn(Lcom/sun/tools/javac/code/Symbol$PackageSymbol;)V+52
j  com.sun.tools.javac.jvm.ClassReader.complete(Lcom/sun/tools/javac/code/Symbol;)V+94
j  com.sun.tools.javac.code.Symbol.complete()V+19
j  com.sun.tools.javac.comp.Enter.visitTopLevel(Lcom/sun/tools/javac/tree/JCTree$JCCompilationUnit;)V+119
j  com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(Lcom/sun/tools/javac/tree/JCTree$Visitor;)V+2
j  com.sun.tools.javac.comp.Enter.classEnter(Lcom/sun/tools/javac/tree/JCTree;Lcom/sun/tools/javac/comp/Env;)Lcom/sun/tools/javac/code/Type;+12
j  com.sun.tools.javac.comp.Enter.classEnter(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/comp/Env;)Lcom/sun/tools/javac/util/List;+30
j  com.sun.tools.javac.comp.Enter.complete(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/code/Symbol$ClassSymbol;)V+36
j  com.sun.tools.javac.comp.Enter.main(Lcom/sun/tools/javac/util/List;)V+3
j  com.sun.tools.javac.main.JavaCompiler.enterTrees(Lcom/sun/tools/javac/util/List;)Lcom/sun/tools/javac/util/List;+63
j  com.sun.tools.javac.main.JavaCompiler.compile(Lcom/sun/tools/javac/util/List;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)V+69
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;Lcom/sun/tools/javac/util/List;Ljava/lang/Iterable;)I+573
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;Lcom/sun/tools/javac/util/Context;)I+7
j  com.sun.tools.javac.main.Main.compile([Ljava/lang/String;)I+15
j  com.sun.tools.javac.Main.compile([Ljava/lang/String;)I+12
j  com.sun.tools.javac.Main.main([Ljava/lang/String;)V+97
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0xb3f08000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=448, stack(0xb318b000,0xb358b000)]
  0xb3f06400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=447, stack(0xb4047000,0xb40c7000)]
  0xb3f04800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=446, stack(0xb358b000,0xb398b000)]
  0xb3f00800 JavaThread "Finalizer" daemon [_thread_blocked, id=445, stack(0xb3b00000,0xb3f00000)]
  0x09966c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=444, stack(0xb40c7000,0xb44c7000)]
=>0x09938c00 JavaThread "main" [_thread_in_vm, id=442, stack(0xb68cd000,0xb6ccd000)]

Other Threads:
  0x0995c400 VMThread [stack: 0xb4697000,0xb4717000] [id=443]
  0xb3f0a800 WatcherThread [stack: 0xb310b000,0xb318b000] [id=449]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 2432K, used 351K [0x88d50000, 0x88ff0000, 0x8ad50000)
  eden space 2176K,   4% used [0x88d50000, 0x88d67f00, 0x88f70000)
  from space 256K,  99% used [0x88f70000, 0x88fafff8, 0x88fb0000)
  to   space 256K,   0% used [0x88fb0000, 0x88fb0000, 0x88ff0000)
 tenured generation   total 5504K, used 2506K [0x8ad50000, 0x8b2b0000, 0x8ed50000)
   the space 5504K,  45% used [0x8ad50000, 0x8afc2ae0, 0x8afc2c00, 0x8b2b0000)
 compacting perm gen  total 12288K, used 2164K [0x8ed50000, 0x8f950000, 0x92d50000)
   the space 12288K,  17% used [0x8ed50000, 0x8ef6d170, 0x8ef6d200, 0x8f950000)
    ro space 10240K,  61% used [0x92d50000, 0x93379838, 0x93379a00, 0x93750000)
    rw space 12288K,  60% used [0x93750000, 0x93e8a040, 0x93e8a200, 0x94350000)

Code Cache  [0xb4842000, 0xb48da000, 0xb6842000)
 total_blobs=228 nmethods=96 adapters=68 free_code_cache=32961472 largest_free_block=64

Dynamic libraries:
08048000-08052000 r-xp 00000000 08:03 36703937                           /usr/java/jdk1.6.0_31/bin/javac
08052000-08053000 rwxp 00009000 08:03 36703937                           /usr/java/jdk1.6.0_31/bin/javac
09933000-099e1000 rwxp 00000000 00:00 0                                  [heap]
88d50000-88ff0000 rwxp 00000000 00:00 0 
88ff0000-8ad50000 rwxp 00000000 00:00 0 
8ad50000-8b2b0000 rwxp 00000000 00:00 0 
8b2b0000-8ed50000 rwxp 00000000 00:00 0 
8ed50000-8f950000 rwxp 00000000 00:00 0 
8f950000-92d50000 rwxp 00000000 00:00 0 
92d50000-9337a000 r-xs 00001000 08:03 36707960                           /usr/java/jdk1.6.0_31/jre/lib/i386/client/classes.jsa
9337a000-93750000 rwxp 00000000 00:00 0 
93750000-93e8b000 rwxp 0062b000 08:03 36707960                           /usr/java/jdk1.6.0_31/jre/lib/i386/client/classes.jsa
93e8b000-94350000 rwxp 00000000 00:00 0 
94350000-94432000 rwxp 00d66000 08:03 36707960                           /usr/java/jdk1.6.0_31/jre/lib/i386/client/classes.jsa
94432000-94750000 rwxp 00000000 00:00 0 
94750000-94758000 r-xs 00e48000 08:03 36707960                           /usr/java/jdk1.6.0_31/jre/lib/i386/client/classes.jsa
94758000-94b50000 rwxp 00000000 00:00 0 
b30ac000-b310b000 r-xs 00bac000 08:03 36703415                           /usr/java/jdk1.6.0_31/lib/tools.jar
b310b000-b310c000 ---p 00000000 00:00 0 
b310c000-b318b000 rwxp 00000000 00:00 0 
b318b000-b318e000 ---p 00000000 00:00 0 
b318e000-b358b000 rwxp 00000000 00:00 0 
b358b000-b358e000 ---p 00000000 00:00 0 
b358e000-b398b000 rwxp 00000000 00:00 0 
b398b000-b3b00000 r-xp 00000000 08:03 36569850                           /usr/lib/locale/locale-archive
b3b00000-b3b03000 ---p 00000000 00:00 0 
b3b03000-b3f00000 rwxp 00000000 00:00 0 
b3f00000-b3fe6000 rwxp 00000000 00:00 0 
b3fe6000-b4000000 ---p 00000000 00:00 0 
b4047000-b404a000 ---p 00000000 00:00 0 
b404a000-b40c7000 rwxp 00000000 00:00 0 
b40c7000-b40ca000 ---p 00000000 00:00 0 
b40ca000-b44fb000 rwxp 00000000 00:00 0 
b44fb000-b4697000 r-xs 030c2000 08:03 36700524                           /usr/java/jdk1.6.0_31/jre/lib/rt.jar
b4697000-b4698000 ---p 00000000 00:00 0 
b4698000-b472b000 rwxp 00000000 00:00 0 
b472b000-b4745000 rwxp 00000000 00:00 0 
b4745000-b4748000 rwxp 00000000 00:00 0 
b4748000-b4766000 rwxp 00000000 00:00 0 
b4766000-b4768000 rwxp 00000000 00:00 0 
b4768000-b4776000 rwxp 00000000 00:00 0 
b4776000-b4779000 rwxp 00000000 00:00 0 
b4779000-b4796000 rwxp 00000000 00:00 0 
b4796000-b479c000 rwxp 00000000 00:00 0 
b479c000-b47b6000 rwxp 00000000 00:00 0 
b47b6000-b47c5000 rwxp 00000000 00:00 0 
b47c5000-b4842000 rwxp 00000000 00:00 0 
b4842000-b48da000 rwxp 00000000 00:00 0 
b48da000-b6842000 rwxp 00000000 00:00 0 
b6842000-b6851000 r-xp 00000000 08:03 36702662                           /usr/java/jdk1.6.0_31/jre/lib/i386/libzip.so
b6851000-b6853000 rwxp 0000e000 08:03 36702662                           /usr/java/jdk1.6.0_31/jre/lib/i386/libzip.so
b6853000-b685b000 rwxs 00000000 08:03 36707977                           /tmp/hsperfdata_jon/441
b685b000-b6865000 r-xp 00000000 08:03 35529486                           /lib/libnss_files-2.11.3.so
b6865000-b6866000 r-xp 00009000 08:03 35529486                           /lib/libnss_files-2.11.3.so
b6866000-b6867000 rwxp 0000a000 08:03 35529486                           /lib/libnss_files-2.11.3.so
b6867000-b686f000 r-xp 00000000 08:03 35529479                           /lib/libnss_nis-2.11.3.so
b686f000-b6870000 r-xp 00008000 08:03 35529479                           /lib/libnss_nis-2.11.3.so
b6870000-b6871000 rwxp 00009000 08:03 35529479                           /lib/libnss_nis-2.11.3.so
b6871000-b6877000 r-xp 00000000 08:03 35529501                           /lib/libnss_compat-2.11.3.so
b6877000-b6878000 r-xp 00006000 08:03 35529501                           /lib/libnss_compat-2.11.3.so
b6878000-b6879000 rwxp 00007000 08:03 35529501                           /lib/libnss_compat-2.11.3.so
b687c000-b688f000 r-xp 00000000 08:03 35529483                           /lib/libnsl-2.11.3.so
b688f000-b6890000 r-xp 00012000 08:03 35529483                           /lib/libnsl-2.11.3.so
b6890000-b6891000 rwxp 00013000 08:03 35529483                           /lib/libnsl-2.11.3.so
b6891000-b6893000 rwxp 00000000 00:00 0 
b6893000-b68b6000 r-xp 00000000 08:03 36702658                           /usr/java/jdk1.6.0_31/jre/lib/i386/libjava.so
b68b6000-b68b8000 rwxp 00023000 08:03 36702658                           /usr/java/jdk1.6.0_31/jre/lib/i386/libjava.so
b68b8000-b68c3000 r-xp 00000000 08:03 36702657                           /usr/java/jdk1.6.0_31/jre/lib/i386/libverify.so
b68c3000-b68c4000 rwxp 0000b000 08:03 36702657                           /usr/java/jdk1.6.0_31/jre/lib/i386/libverify.so
b68c4000-b68cb000 r-xp 00000000 08:03 35529498                           /lib/librt-2.11.3.so
b68cb000-b68cc000 r-xp 00006000 08:03 35529498                           /lib/librt-2.11.3.so
b68cc000-b68cd000 rwxp 00007000 08:03 35529498                           /lib/librt-2.11.3.so
b68cd000-b68d0000 ---p 00000000 00:00 0 
b68d0000-b6ccd000 rwxp 00000000 00:00 0 
b6ccd000-b6cf1000 r-xp 00000000 08:03 35529481                           /lib/libm-2.11.3.so
b6cf1000-b6cf2000 r-xp 00023000 08:03 35529481                           /lib/libm-2.11.3.so
b6cf2000-b6cf3000 rwxp 00024000 08:03 35529481                           /lib/libm-2.11.3.so
b6cf3000-b71d4000 r-xp 00000000 08:03 36702651                           /usr/java/jdk1.6.0_31/jre/lib/i386/client/libjvm.so
b71d4000-b71f7000 rwxp 004e1000 08:03 36702651                           /usr/java/jdk1.6.0_31/jre/lib/i386/client/libjvm.so
b71f7000-b7614000 rwxp 00000000 00:00 0 
b7614000-b7752000 r-xp 00000000 08:03 35529499                           /lib/libc-2.11.3.so
b7752000-b7753000 ---p 0013e000 08:03 35529499                           /lib/libc-2.11.3.so
b7753000-b7755000 r-xp 0013e000 08:03 35529499                           /lib/libc-2.11.3.so
b7755000-b7756000 rwxp 00140000 08:03 35529499                           /lib/libc-2.11.3.so
b7756000-b7759000 rwxp 00000000 00:00 0 
b7759000-b775b000 r-xp 00000000 08:03 35529480                           /lib/libdl-2.11.3.so
b775b000-b775c000 r-xp 00001000 08:03 35529480                           /lib/libdl-2.11.3.so
b775c000-b775d000 rwxp 00002000 08:03 35529480                           /lib/libdl-2.11.3.so
b775d000-b7764000 r-xp 00000000 08:03 36702660                           /usr/java/jdk1.6.0_31/jre/lib/i386/jli/libjli.so
b7764000-b7766000 rwxp 00006000 08:03 36702660                           /usr/java/jdk1.6.0_31/jre/lib/i386/jli/libjli.so
b7766000-b7767000 rwxp 00000000 00:00 0 
b7767000-b777b000 r-xp 00000000 08:03 35529489                           /lib/libpthread-2.11.3.so
b777b000-b777c000 ---p 00014000 08:03 35529489                           /lib/libpthread-2.11.3.so
b777c000-b777d000 r-xp 00014000 08:03 35529489                           /lib/libpthread-2.11.3.so
b777d000-b777e000 rwxp 00015000 08:03 35529489                           /lib/libpthread-2.11.3.so
b777e000-b7780000 rwxp 00000000 00:00 0 
b7781000-b7782000 rwxp 00000000 00:00 0 
b7782000-b7783000 r-xp 00000000 00:00 0 
b7783000-b7785000 rwxp 00000000 00:00 0 
b7785000-b7786000 r-xp 00000000 00:00 0                                  [vdso]
b7786000-b77a1000 r-xp 00000000 08:03 35529492                           /lib/ld-2.11.3.so
b77a1000-b77a2000 r-xp 0001b000 08:03 35529492                           /lib/ld-2.11.3.so
b77a2000-b77a3000 rwxp 0001c000 08:03 35529492                           /lib/ld-2.11.3.so
bf818000-bf82d000 rwxp 00000000 00:00 0                                  [stack]

VM Arguments:
jvm_args: -Dapplication.home=/usr/java/jdk1.6.0_31 -Xms8m -Xss4m -ea:com.sun.tools... 
java_command: com.sun.tools.javac.Main Echo.java
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=/usr/java/jdk1.6.0_31/bin
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/java/jdk1.6.0_31/bin
LD_LIBRARY_PATH=/usr/java/jdk1.6.0_31/jre/lib/i386/client:/usr/java/jdk1.6.0_31/jre/lib/i386:/usr/java/jdk1.6.0_31/jre/../lib/i386
SHELL=/bin/bash

Signal Handlers:
SIGSEGV: [libjvm.so+0x469da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x469da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x38bdd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x38f030], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x38ec10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x38ec10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x38ec10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x38ec10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004


---------------  S Y S T E M  ---------------

OS:6.0.4

uname:Linux 2.6.32-042stab049.6 #1 SMP Mon Feb 6 19:17:43 MSK 2012 i686
libc:glibc 2.11.3 NPTL 2.11.3 
rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity
load average:0.00 0.00 0.00

/proc/meminfo:
MemTotal:         262144 kB
MemFree:          229320 kB
Cached:            15804 kB
Active:            28116 kB
Inactive:           2340 kB
Active(anon):      14648 kB
Inactive(anon):        4 kB
Active(file):      13468 kB
Inactive(file):     2336 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        131072 kB
SwapFree:         131072 kB
Dirty:                88 kB
AnonPages:         14652 kB
Shmem:              2560 kB
Slab:               2156 kB
SReclaimable:        748 kB
SUnreclaim:         1408 kB


CPU:total 1 (4 cores per cpu, 1 threads per core) family 6 model 23 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1

/proc/cpuinfo:
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Xeon(R) CPU           E5420  @ 2.50GHz
stepping	: 6
cpu MHz		: 2493.880
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 lahf_lm dts tpr_shadow vnmi flexpriority
bogomips	: 4987.76
clflush size	: 64
cache_alignment	: 64
address sizes	: 38 bits physical, 48 bits virtual
power management:



Memory: 4k page, physical 262144k(229328k free), swap 131072k(131072k free)

vm_info: Java HotSpot(TM) Client VM (20.6-b01) for linux-x86 JRE (1.6.0_31-b04), built on Jan 20 2012 10:30:33 by "java_re" with gcc 3.2.1-7a (J2SE release)

time: Sat Feb 25 00:13:41 2012
elapsed time: 0 seconds


No idea what to tell you there, but if it compiles fine elsewhere, then there’s some environment issue, either with your VPS’s hardware or the hypervisor. Looks like they’re using OpenVZ, which frankly I don’t have a high opinion of. Linode and AWS use Xen, and I’ve never had a problem with that.

For price like that I’m surprised anything at all works there. Actually, I could not find a shared host for that price :slight_smile: Anyway, the cause being the problem with the quality of the hardware/setup is highly possible.

I’ve seemed to have fixed the problem.

I tried first installing GCJ wich is like an open source gnu java compiler. When running that it gave me an error relating to gcc. And so I updated my gcc “yum install gcc”/“apt-get isntall gcc” and tried again, still, gcj didn’t funciton - gcj gives the following error:

/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status

However, now that I tried again with the standard java compiler “javac” it worked fine. I was surprised, i tried again, and again… and again. It worked every time.

Which is curious since I’ve always updated and upgraded the distro after reach reinstall. So, to be 100% sure, I’m going to reinstall the VPS to CentOS 5, upgrade, install jdk1.6.0_31, try it and expect problem, then I’m going to seperately udpate gcc and see if that solves the problem.

Hm… Nope, it wasn’t gcc.

I tried and the errors still kept coming, but when I installed gcj, the standard java compiler “javac” started to work - gcj doesn’t work, but it probably came with some sort of dependencies that made the java compiler work…

Sigh, so confusing… well, it seems to work now anyway - though I’ve no idea why.

Oh I see, this is what’s happening.

When I install gcj it also installed java and javac into a /etc/alternatives folder. And it automatically also creates symbolic links in /usr/bin overriding the symbolic links I’ve made myself when I installed java from oracle. So what happens is that the compiler I use is the one gcj brought with it, not the standard one oracle provides. So! With gcj installed I recreated my symbolic links to link to the standard java compiler (instead of the one located in /etc/alternatives) and I still got the same errors.

So nothing changed, the errors are still there.

I’m going to try install java 7 instead of 6.31 and see how that works.

[EDIT]
Nope, same problems with the jdk7. Maybe I’m just installing it wrong since I’m the only one with the problem :L

[EDIT]
I’ve been trying to figure it out all day long and most of yesterday as well. Standard oracle java doesn’t work and neither does openjdk nor icedTea.

With a “apt-get install gcj” a “java” and “javac” file are installed into /etc/alternatives and slinked in /usr/bin/. They work. And so I’m using them.

their respective “-versions” are as follows:

java -version:

java version "1.5.0"
gij (GNU libgcj) version 4.4.5

Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

javac -version

gcj-4.4 (Debian 4.4.5-2) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I’ve no idea why the standard versions don’t work properly -> the fact that they are inconsistent (90% crashes, 5% error, 5% works fine) puzzles me even more. How can it “sometimes” work? :stuck_out_tongue:

Oh well.

GCJ is garbage; its statically compiled code is slower than hotspot. Good startup times though. One of the more annoying things about managing a Debian machine is making sure gcj never gets onto a machine, since it always tries to sneak in through dependency resolution. It’s probably some simple priorities setting that’ll prevent it, but my apt-fu isn’t what it should be.

Still wouldn’t explain the random crashes except for wonky underlying platform like a broken hypervisor. But then again that’s pretty much the description of OpenVZ.

Hmm. I understand you guys have a working java copy on your vps? Do you get/update it through a specific repo with a package manager? Since I can’t get it to work manually at least and the only repo’s I know of give me openjdk.

Everything java-related I install by hand, including java itself. Once I have java, ant, and maven, there’s little else left for me to install that those tools don’t automatically fetch for me. My VPS runs fedora, so I download and install the RPM by hand, and at work where we run RHEL and CentOS, I just drop it in our local yum repo and update.

Just a quick update. My VPS provider still has issues with the java compiler. Java programs seem to run fine though, but the compiler works 20% of the time, 50% it hangs (kill -9 to the rescue ._.) and 30% it spits an error.

I tried the budget VPS at http://123systems.net/vps.html for a month (3$/month) and their services worked flawlessly and their customer support for lowly me was amazing (The customer support for my current VPS provider is also good, but they just can’t figure out what’s wrong with their servers - they keep me updated though). The compiler and the java program worked like a dream. All in all, I highly recommend their services and I will probably be switching over once my current contract runs out. So I suppose it all boils down to the service provider and nothing else.

I suppose you get what you pay for, but at my current provider not even the high quality servers could run the compiler correctly. So I don’t think money is the issue here.

What did you expect?? That running javac on the same hardware, but being billed a higher amount would somehow solve the problem?

Stability issues are never directly price related, it’s just that it’s more likely to be crap when it costs nearly nothing.

I don’t know what I exptected, I guess I hoped they’d find a fix. They gave me free upgrades to try but the javac didn’t work on them either. I just wanted to clarify that money had nothing to do with it as was earlier in this thread suggested, 123systems similar budget VPS worked just fine.

It might have been worth you actually having a more thorough look at the problem, because I suspect it had nothing to do with the VPS. javac is, all said and done, a very straightforward piece of software.

Cas :slight_smile:

Nope. All the different java compilers I tried were all fine. I wasn’t the only one having the problem either, they couldn’t get it to work at their servers either.

I truthfully have no idea why it didn’t work. The most puzzling aspect was that sometimes it worked, sometimes it locked up, and sometimes crashed with an error compiling a hello world program. You can’t explain that.

I used the same methods to install java on the 123systems VPS and they worked fine.

I will not have you bully me into trying to figure out why it’s not working, I’ve suffered enough!:stuck_out_tongue: It just doesn’t - THE END!

:}