100% CPU usage by Java - java

I'm facing an issue that occurs randomly and causes a 100% CPU usage. I've found the PID of the thread which is actually using CPU.
Main PID: 22777
Thread PID: 22793
From top -H -u user
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22793 user 25 0 2640m 16m 14m R 98.8 0.4 5134:31 java
22480 user 25 0 7920 364 360 S 0.0 0.0 0:00.00 cat
22777 user 18 0 2640m 16m 14m S 0.0 0.4 0:00.00 java
22779 user 18 0 2640m 16m 14m S 0.0 0.4 0:03.34 java
22780 user 15 0 2640m 16m 14m S 0.0 0.4 0:46.76 java
22781 user 15 0 2640m 16m 14m S 0.0 0.4 0:00.49 java
{...}
From jstack -J-d64 -m 22777
{...}
----------------- 22793 -----------------
0x00002b9edcd4c5a0 _ZN12Dependencies25find_finalizable_subclassEP5Klass + 0x150
0x00002b9edcc5a8ee _ZN15ciInstanceKlass24has_finalizable_subclassEv + 0xbe
0x00002b9edcb9f83e _ZN12GraphBuilder23call_register_finalizerEv + 0x9e
0x00002b9edcba62a5 _ZN12GraphBuilder13method_returnEP11Instruction + 0x295
0x00002b9edcbac85f _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6cf
0x00002b9edcba9c4b _ZN12GraphBuilder18iterate_all_blocksEb + 0x14b
0x00002b9edcbaa5e6 _ZN12GraphBuilder15try_inline_fullEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x996
0x00002b9edcbaa7df _ZN12GraphBuilder10try_inlineEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x11f
0x00002b9edcbab912 _ZN12GraphBuilder6invokeEN9Bytecodes4CodeE + 0xbb2
0x00002b9edcbac83d _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6ad
0x00002b9edcba9c4b _ZN12GraphBuilder18iterate_all_blocksEb + 0x14b
0x00002b9edcbaa5e6 _ZN12GraphBuilder15try_inline_fullEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x996
0x00002b9edcbaa7df _ZN12GraphBuilder10try_inlineEP8ciMethodbN9Bytecodes4CodeEP11Instruction + 0x11f
0x00002b9edcbab912 _ZN12GraphBuilder6invokeEN9Bytecodes4CodeE + 0xbb2
0x00002b9edcbac83d _ZN12GraphBuilder27iterate_bytecodes_for_blockEi + 0x6ad
0x00002b9edcba9bf2 _ZN12GraphBuilder18iterate_all_blocksEb + 0xf2
0x00002b9edcbae7a7 _ZN12GraphBuilderC1EP11CompilationP7IRScope + 0x527
0x00002b9edcbb7127 _ZN7IRScopeC1EP11CompilationPS_iP8ciMethodib + 0x1e7
0x00002b9edcbb723f _ZN2IRC1EP11CompilationP8ciMethodi + 0x9f
0x00002b9edcb9625b _ZN11Compilation9build_hirEv + 0xdb
0x00002b9edcb9661e _ZN11Compilation19compile_java_methodEv + 0x6e
0x00002b9edcb9674e _ZN11Compilation14compile_methodEv + 0x4e
0x00002b9edcb96abe _ZN11CompilationC1EP16AbstractCompilerP5ciEnvP8ciMethodiP10BufferBlob + 0x25e
0x00002b9edcb97869 _ZN8Compiler14compile_methodEP5ciEnvP8ciMethodi + 0xa9
0x00002b9edccea43a _ZN13CompileBroker25invoke_compiler_on_methodEP11CompileTask + 0xc9a
0x00002b9edcceb3e6 _ZN13CompileBroker20compiler_thread_loopEv + 0x5d6
0x00002b9edd29ebcf _ZN10JavaThread17thread_main_innerEv + 0xdf
0x00002b9edd29ecfc _ZN10JavaThread3runEv + 0x11c
0x00002b9edd153048 _ZL10java_startP6Thread + 0x108
{...}
It looks like a JVM bug when compiling something.
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
CentOS 5.5
Kernel: 2.6.18-194.el5
Other processes aren't being affected, but the Java process is completely unresponsive. It also occurs at other CentOS servers, but not at Oracle Linux servers.

Related

H2O anomaly per_feature = TRUE java.lang.OutOfMemoryError: Java heap space

I run H2O anomaly with per_feature = TRUE which results in a Java Heap Space error. In some other posts about this error message, I see people suggest using h2o.remove(df) to release the used memory. However, in my case I don’t have any loop, and it seems that there is nothing I can remove to release some used memory.
Here is my code:
library(h2o)
h2o.init(min_mem_size = "10G", max_mem_size = "15G")
data.hex <- as.h2o(data)
x <- names(data.hex)
random_seed <- 42
# Deeplearning Model
print("Deep learning model begins ...")
model.dl = h2o.deeplearning(x = x,
training_frame = data.hex,
autoencoder = TRUE,
activation = "Tanh",
hidden = c(5, 5, 5, 5, 5),
mini_batch_size = 64,
epochs = 100,
stopping_rounds = 15,
variable_importances = TRUE,
seed = random_seed)
# Calculating anomaly per feature
print('Calculating anomaly per feature ...')
errors_per_feature <- h2o.anomaly(model.dl, data.hex, per_feature = TRUE) # Anomaly Detection Algorithm
print('Converting from H2O frame to dataframe ...')
errors1_per_feature <- as.data.frame(errors_per_feature) # Convert back to data frame
Here is the detailed error message:
[1] "Deep learning model begins ..."
|======================================================================| 100%
[1] "Calculating anomaly per feature ..."
ERROR: Unexpected HTTP Status code: 500 Server Error (url = http://localhost:54321/3/Predictions/models/DeepLearning_model_R_1594826474037_2/frames/Accesses_sid_a71f_1)
water.util.DistributedException
[1] "DistributedException from localhost/127.0.0.1:54321: 'Java heap space', caused by java.lang.OutOfMemoryError: Java heap space"
[2] " water.MRTask.getResult(MRTask.java:494)"
[3] " water.MRTask.getResult(MRTask.java:502)"
[4] " water.MRTask.doAll(MRTask.java:397)"
[5] " water.MRTask.doAll(MRTask.java:403)"
[6] " hex.deeplearning.DeepLearningModel.scoreAutoEncoder(DeepLearningModel.java:761)"
[7] " water.api.ModelMetricsHandler.predict(ModelMetricsHandler.java:469)"
[8] " java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"
[9] " java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)"
[10] " java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)"
[11] " java.base/java.lang.reflect.Method.invoke(Method.java:567)"
[12] " water.api.Handler.handle(Handler.java:60)"
[13] " water.api.RequestServer.serve(RequestServer.java:470)"
[14] " water.api.RequestServer.doGeneric(RequestServer.java:301)"
[15] " water.api.RequestServer.doPost(RequestServer.java:227)"
[16] " javax.servlet.http.HttpServlet.service(HttpServlet.java:755)"
[17] " javax.servlet.http.HttpServlet.service(HttpServlet.java:848)"
[18] " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)"
[19] " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)"
[20] " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)"
[21] " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)"
[22] " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)"
[23] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)"
[24] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[25] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[26] " water.webserver.jetty8.Jetty8ServerAdapter$LoginHandler.handle(Jetty8ServerAdapter.java:119)"
[27] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[28] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[29] " org.eclipse.jetty.server.Server.handle(Server.java:370)"
[30] " org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)"
[31] " org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)"
[32] " org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)"
[33] " org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)"
[34] " org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)"
[35] " org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)"
[36] " org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)"
[37] " org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)"
[38] " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)"
[39] " org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)"
[40] " java.base/java.lang.Thread.run(Thread.java:830)"
[41] "Caused by:java.lang.OutOfMemoryError: Java heap space"
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
DistributedException from localhost/127.0.0.1:54321: 'Java heap space'
Calls: h2o.anomaly -> .h2o.__remoteSend -> .h2o.doSafeREST
Execution halted
R and H2O version:
H2O cluster version: 3.30.0.6
H2O cluster total nodes: 1
H2O cluster total memory: 13.43 GB
H2O cluster total cores: 16
H2O cluster allowed cores: 16
H2O cluster healthy: TRUE
R Version: R version 3.6.3 (2020-02-29)
I have 16 GB of memory on my macOS.
There are 6 variables (columns) in data: 5 categorical variables and 1 numeric variable. The number of unique values in the 5 categorical variables is 17, 49, 52, 85 and 5032, respectively. The number of rows is ~500k. The data file size is 44 MB (before encoding within H2O).
What can I do in my case to resolve the issue? Please let me know if there is any other information I can provide. Thanks for your help!
[cutting and pasting my response to the h2ostream mailing list here too...]
i suspect the large number of categorical levels is causing the memory to blow up.
try removing that variable and seeing if it at least completes.
if it does, try re-binning into a smaller number of levels somehow.

Quit unexpectedly while using the libjvm.dylib plug-in

I'm creating an application with Java 1.8 and running on Mac but
my application have problem running on Mac OSX 10.8 always showing error "quit unexpectedly while using the libjvm.dylib plug-in"
but on other OSX runs smoothly without problem.
Here's the error...
Process: java [247]
Path: /usr/bin/java
Identifier: net.java.openjdk.cmd
Version: 1.0 (1.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
User ID: 501
PlugIn Path: /Users/Shared/*/libjvm.dylib
PlugIn Identifier: libjvm.dylib
PlugIn Version: ??? (1)
Date/Time: 2015-04-22 00:57:51.018 -0700
OS Version: Mac OS X 10.8 (12A269)
Report Version: 10
Interval Since Last Report: 21289 sec
Crashes Since Last Report: 12
Per-App Interval Since Last Report: 1821 sec
Per-App Crashes Since Last Report: 11
Anonymous UUID: 829F8A3C-A684-4821-9CC3-7C29F828A3ED
Crashed Thread: 31 Java: QuantumRenderer-0
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: EXC_I386_GPFLT
Application Specific Information:
abort() called
Thread 0:: AppKit Thread Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8d713686 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8d712cf7 mach_msg + 251
2 com.apple.CoreFoundation 0x00007fff8df29f23 __CFRunLoopServiceMachPort + 195
3 com.apple.CoreFoundation 0x00007fff8df2f606 __CFRunLoopRun + 1078
4 com.apple.CoreFoundation 0x00007fff8df2edd2 CFRunLoopRunSpecific + 290
5 com.apple.HIToolbox 0x00007fff948c8774 RunCurrentEventLoopInMode + 209
6 com.apple.HIToolbox 0x00007fff948c8512 ReceiveNextEventCommon + 356
7 com.apple.HIToolbox 0x00007fff948c83a3 BlockUntilNextEventMatchingListInMode + 62
8 com.apple.AppKit 0x00007fff938eafa3 _DPSNextEvent + 685
9 com.apple.AppKit 0x00007fff938ea862 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
10 libosxapp.dylib 0x000000019dff442a -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
11 com.apple.AppKit 0x00007fff938e1c03 -[NSApplication run] + 517
12 libosxapp.dylib 0x000000019dff423e +[NSApplicationAWT runAWTLoopWithApp:] + 156
13 libsplashscreen.dylib 0x000000019dfd3128 __SplashInitPlatform_block_invoke_1 + 360
14 JavaNativeFoundation 0x000000019d7cfe5c +[JNFRunLoop _performCopiedBlock:] + 15
15 com.apple.Foundation 0x00007fff9098c8a7 __NSThreadPerformPerform + 225
16 com.apple.CoreFoundation 0x00007fff8df0c841 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 com.apple.CoreFoundation 0x00007fff8df0c165 __CFRunLoopDoSources0 + 245
18 com.apple.CoreFoundation 0x00007fff8df2f4e5 __CFRunLoopRun + 789
19 com.apple.CoreFoundation 0x00007fff8df2edd2 CFRunLoopRunSpecific + 290
20 java 0x000000010beba6cc CreateExecutionEnvironment + 871
21 java 0x000000010beb665c JLI_Launch + 1952
22 java 0x000000010bebc68a main + 101
23 java 0x000000010beb5eb4 start + 52
Thread 1:
0 libsystem_kernel.dylib 0x00007fff8d715386 __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff95909ce5 pthread_join + 847
2 java 0x000000010beb9ccc ContinueInNewThread0 + 102
3 java 0x000000010beb72d0 ContinueInNewThread + 201
4 java 0x000000010beb9aa1 JVMInit + 315
5 java 0x000000010beb704e JLI_Launch + 4498
6 java 0x000000010bebc68a main + 101
7 java 0x000000010beba35e apple_main + 92
8 libsystem_c.dylib 0x00007fff9587f782 _pthread_start + 327
9 libsystem_c.dylib 0x00007fff9586c1c1 thread_start + 13
Thread 2:
0 libsystem_kernel.dylib 0x00007fff8d7150fa __psynch_cvwait + 10
1 libsystem_c.dylib 0x00007fff95883fc9 _pthread_cond_wait + 869
2 libjvm.dylib 0x000000010c46e473 Parker::park(bool, long) + 495
3 libjvm.dylib 0x000000010c55fd4c Unsafe_Park + 126
4 ??? 0x000000010d47a9aa 0 + 4517767594
5 ??? 0x000000010d47ade6 0 + 4517768678
6 ??? 0x000000010d08f160 0 + 4513657184
7 ??? 0x000000010d08f98d 0 + 4513659277
8 ??? 0x000000010d08f98d 0 + 4513659277
9 ??? 0x000000010d08f98d 0 + 4513659277
10 ??? 0x000000010d08f710 0 + 4513658640
11 ??? 0x000000010d08f160 0 + 4513657184
12 ??? 0x000000010d08f710 0 + 4513658640
13 ??? 0x000000010d08f98d 0 + 4513659277
14 ??? 0x000000010d08f98d 0 + 4513659277
15 ??? 0x000000010d08f98d 0 + 4513659277
16 ??? 0x000000010d08f98d 0 + 4513659277
17 ??? 0x000000010d08f710 0 + 4513658640
18 ??? 0x000000010d08f98d 0 + 4513659277
19 ??? 0x000000010d08f98d 0 + 4513659277
20 ??? 0x000000010d08f98d 0 + 4513659277
21 ??? 0x000000010d0884e7 0 + 4513629415
22 libjvm.dylib 0x000000010c2e8516 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) + 1710
23 libjvm.dylib 0x000000010c31d58b jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) + 447
24 libjvm.dylib 0x000000010c316785 jni_CallStaticVoidMethod + 349
25 java 0x000000010beb7c82 JavaMain + 2456
26 libsystem_c.dylib 0x00007fff9587f782 _pthread_start + 327
27 libsystem_c.dylib 0x00007fff9586c1c1 thread_start + 13

Why has this Java application crashed on CVDisplayLink thread on Mac?

Could anybody give me any clues about this why this java application has crashed, Im unable to replicate the issue but it says it crashed on CVDisplayLink thread on Mac, is this known problem ?
Process: SongKong [12527]
Path: /Applications/SongKong.app/Contents/MacOS/SongKong
Identifier: com.jthink.songkong
Version: 3.0 (1.0)
Code Type: X86-64 (Native)
Parent Process: launchd [521]
Responsible: SongKong [12527]
User ID: 501
Date/Time: 2014-09-12 14:35:00.730 -0400
OS Version: Mac OS X 10.9.4 (13E28)
Report Version: 11
Anonymous UUID: 27FE9D66-7F0A-3CC3-A589-A56FE55FB4DD
Crashed Thread: 22 CVDisplayLink
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
abort() called
Application Specific Signatures:
Graphics hardware encountered an error and was reset: 0x00000000
Thread 0:: AppKit Thread Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8c0fea1a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff8c0fdd18 mach_msg + 64
2 com.apple.CoreFoundation 0x00007fff8bf0ef15 CFRunLoopServiceMachPort + 181
3 com.apple.CoreFoundation 0x00007fff8bf0e539 __CFRunLoopRun + 1161
4 com.apple.CoreFoundation 0x00007fff8bf0de75 CFRunLoopRunSpecific + 309
5 com.apple.HIToolbox 0x00007fff92583a0d RunCurrentEventLoopInMode + 226
6 com.apple.HIToolbox 0x00007fff925837b7 ReceiveNextEventCommon + 479
7 com.apple.HIToolbox 0x00007fff925835bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
8 com.apple.AppKit 0x00007fff8c77524e _DPSNextEvent + 1434
9 com.apple.AppKit 0x00007fff8c77489b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
10 libosxapp.dylib 0x0000000127cbe42a -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
11 com.apple.AppKit 0x00007fff8c76899c -[NSApplication run] + 553
12 libosxapp.dylib 0x0000000127cbe23e +[NSApplicationAWT runAWTLoopWithApp:] + 156
13 libawt_lwawt.dylib 0x0000000127e9794f -[AWTStarter starter:] + 905
14 com.apple.Foundation 0x00007fff88be713e __NSThreadPerformPerform + 229
15 com.apple.CoreFoundation 0x00007fff8bf1d5b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
16 com.apple.CoreFoundation 0x00007fff8bf0ec62 __CFRunLoopDoSources0 + 242
17 com.apple.CoreFoundation 0x00007fff8bf0e3ef __CFRunLoopRun + 831
18 com.apple.CoreFoundation 0x00007fff8bf0de75 CFRunLoopRunSpecific + 309
19 libjli.dylib 0x000000010183cb34 CreateExecutionEnvironment + 871
20 libjli.dylib 0x0000000101838ac4 JLI_Launch + 1952
21 com.jthink.songkong 0x00000001017cf8ab launch + 5243
22 com.jthink.songkong 0x00000001017ce2e6 main + 102
23 com.jthink.songkong 0x00000001017ce274 start + 52
...............
...............
Thread 22 Crashed:: CVDisplayLink
0 libsystem_kernel.dylib 0x00007fff8c102866 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff8d8e035c pthread_kill + 92
2 libsystem_c.dylib 0x00007fff874c2b1a abort + 125
3 libGPUSupportMercury.dylib 0x00007fff8782d1ca gpusKillClient + 111
4 libGPUSupportMercury.dylib 0x00007fff8782e65f gpusSubmitDataBuffers + 484
5 com.apple.AMDRadeonX3000GLDriver 0x00001234801fc152 0x123480000000 + 2081106
6 libGPUSupportMercury.dylib 0x00007fff8782f1b2 gpuiFinishFence + 62
7 libGPUSupportMercury.dylib 0x00007fff878328f0 gldFinishObject + 48
8 GLEngine 0x00007fff90265247 gleFinishFence + 94
9 com.apple.QuartzCore 0x00007fff889816a1 view_state_finish(_CAViewState*) + 54
10 com.apple.QuartzCore 0x00007fff8898042d view_draw(_CAView*, double, CVTimeStamp const*, bool) + 1397
11 com.apple.QuartzCore 0x00007fff8897fe7f view_display_link(double, CVTimeStamp const*, void*) + 150
12 com.apple.QuartzCore 0x00007fff8897fd40 link_callback + 237
13 com.apple.CoreVideo 0x00007fff8d8e85cc CVDisplayLink::performIO(CVTimeStamp*) + 206
14 com.apple.CoreVideo 0x00007fff8d8e7a08 CVDisplayLink::runIOThread() + 608
15 com.apple.CoreVideo 0x00007fff8d8e778f startIOThread(void*) + 147
16 libsystem_pthread.dylib 0x00007fff8d8df899 _pthread_body + 138
17 libsystem_pthread.dylib 0x00007fff8d8df72a _pthread_start + 137
18 libsystem_pthread.dylib 0x00007fff8d8e3fc9 thread_start + 13

different output while running a command from java

I have following script:
#!/bin/bash
ID=$PPID
read PID < <(exec ps -o ppid= "$ID")
top -cbn 1 -p $PID
grep -f <(pstree -cp $PID | grep -Po '\(\K\d+'| sed -re 's/$/ /g' | sed -re 's/^/^\\s\*/g' ) <(top -cbn 1)
When I am running this script from command prompt the output is
top - 16:43:17 up 6:40, 6 users, load average: 0.04, 0.02, 0.00
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.9%us, 0.6%sy, 0.0%ni, 98.1%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4152800k total, 1908108k used, 2244692k free, 92984k buffers
Swap: 1048568k total, 0k used, 1048568k free, 1104756k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16866 root 40 0 7792 3188 2088 S 0.0 0.1 0:00.01 su
16750 builder 40 0 1213m 262m 15m S 0.0 6.5 0:55.43 /opt/ibm/java-i386-60/jre/bin/java -Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms40m -Xmx1024m -jar /home/builder/eclipse//plugins/org.eclipse.equinox.launcher_1.3.0.
Notice the output of COMMAND and it is displaying the complete command. But if I run the same program from java, the output truncate the COMMAND name and I am not able to figure out why ?
Truncation occur after 19 character.
Or in different words
Every line truncate after 80 character.
Here is the output if I run the same program using Java
top - 16:13:52 up 6:10, 6 users, load average: 0.16, 0.16, 0.06
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.9%us, 0.6%sy, 0.0%ni, 98.0%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4152800k total, 1913364k used, 2239436k free, 91560k buffers
Swap: 1048568k total, 0k used, 1048568k free, 1103952k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16750 builder 40 0 1206m 257m 15m S 0.0 6.3 0:26.32 /opt/ibm/java-i386-
16750 builder 40 0 1206m 257m 15m S 1.9 6.3 0:26.33 /opt/ibm/java-i386-
16943 builder 20 0 2608 1008 748 R 1.9 0.0 0:00.02 top -cbn 1
16918 builder 20 0 554m 14m 6060 S 0.0 0.4 0:00.10 /opt/ibm/java-i386-
16934 builder 20 0 4976 1120 992 S 0.0 0.0 0:00.00 /bin/bash /home/bui
16941 builder 20 0 4976 508 376 S 0.0 0.0 0:00.00 /bin/bash /home/bui
16942 builder 20 0 4388 888 608 S 0.0 0.0 0:00.00 grep -f /dev/fd/63
My java file to run the command is
public class InformationFetcher {
public static void main(String[] args) {
InformationFetcher informationFetcher = new InformationFetcher();
try {
Process process = Runtime.getRuntime().exec(
informationFetcher.getFilePath());
InputStream in = process.getInputStream();
printInputStream(in);
} catch (IOException e) {
e.printStackTrace();
}
}
private void processInformation(InputStream in) {
topProcessor.process(in);
}
private static void printInputStream(InputStream in) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuffer outBuffer = new StringBuffer();
String newLine = System.getProperty("line.separator");
String line;
while ((line = reader.readLine()) != null) {
outBuffer.append(line);
outBuffer.append(newLine);
}
System.out.println(outBuffer.toString());
}
public String getFilePath() {
return this.getClass().getResource("/idFetcher.sh").getPath();
}
}

Eclipse Kepler JDT content assist dreadfully slow on MacOS

Running on MacOS using Kepler (4.3.1) and Java Proposals are dreadfully long, hanging the UI whenever I mistype something. This activity seems to cause serious Disk I/O:
Call graph:
565 Thread_1045514 DispatchQueue_1: com.apple.main-thread (serial)
+ 181 ??? (in ) [0x1069d1d91]
+ 133 ??? (in ) [0x1069d1d2c]
+ 81 ??? (in ) [0x1069d1d27]
+ 56 ??? (in ) [0x1069d1cf4]
+ 55 ??? (in ) [0x1069d1cc3]
+ 9 ??? (in ) [0x1069d1d8a]
+ 6 ??? (in ) [0x1069d1d1d]
+ 6 ??? (in ) [0x1069d1d59]
+ 6 ??? (in ) [0x1069d1d93]
+ 4 ??? (in ) [0x1069d1dca]
+ 3 ??? (in ) [0x106508c94]
+ ! 3 ??? (in ) [0x1067e05fc]
+ ! 2 Java_java_io_UnixFileSystem_getBooleanAttributes0 (in libjava.dylib) + 86 [0x10059c51a]
+ ! : 1 JNU_GetStringPlatformChars (in libjava.dylib) + 1163 [0x1005995e2]
+ ! : | 1 jni_CallObjectMethod (in libjvm.dylib) + 278 [0x105cda1c6]
+ ! : | 1 jni_invoke_nonstatic(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) (in libjvm.dylib) + 698 [0x105ce8605]
+ ! : | 1 JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) (in libjvm.dylib) + 40 [0x105cb4b60]
+ ! : | 1 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) (in libjvm.dylib) + 401 [0x105cb4cf7]
+ ! : | 1 os::stack_shadow_pages_available(Thread*, methodHandle) (in libjvm.dylib) + 1 [0x105df2a67]
+ ! : 1 JNU_GetStringPlatformChars (in libjava.dylib) + 1352 [0x10059969f]
+ ! : 1 jni_GetByteArrayRegion (in libjvm.dylib) + 127 [0x105ce4b37]
+ ! 1 Java_java_io_UnixFileSystem_getBooleanAttributes0 (in libjava.dylib) + 109 [0x10059c531]
+ ! 1 stat$INODE64 (in libsystem_kernel.dylib) + 10 [0x7fff83301dfa]
I've increased my memory to 2G, but the heap display never goes beyond 350M. I occasionally get the "your results took too long" dialoging seen in some content assist activities. Are my indexes corrupt? Any thoughts on how I can get content assist back to normal?

Categories