0

全部,

我在运行我的程序时使用以下 VM 开关。该程序存在已知的内存泄漏。

最初堆满了,我理解 OutOfMemoryError 的原因。但后来(124.283)Full GC 回收了一些空间。那么为什么我仍然收到 OutOfMemoryError 呢?

提前致谢

虚拟机参数

-XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xms32m -Xmx32m

这是GC数据


堆满


123.540:[Full GC 123.540:[Tenured:21888K->21887K(21888K),0.1215501 秒] 31679K->31679K(31680K),[Perm:2054K->2054K(12288K)],0.121603 秒][0.121603 秒]。 sys=0.00, real=0.13 secs] 123.665: [Full GC 123.665: [Tenured: 21887K->21887K(21888K), 0.1504579 secs] 31679K->31575K(31680K), [Perm : 2054K->2054K1()] 0.1505627 secs] [Times: user=0.16 sys=0.00, real=0.16 secs] 线程“RMI TCP 连接(空闲)”java.lang.OutOfMemoryError 中的异常:线程“AWT-EventQueue-0”java 中的 Java 堆空间异常。 lang.NullPointerException:在 sun.java2d.windows.GDIWindowSurfaceData.(Unknown Source) 在 sun.java2d.windows.GDIWindowSurfaceData.createData(Unknown Source) 在 sun.java2d.windows.GDIWindowSurfaceData.initOps(Native Method) 处的已处置组件。 awt.Win32GraphicsConfig。createSurfaceData(Unknown Source) at sun.java2d.ScreenUpdateManager.createScreenSurface(Unknown Source) at sun.java2d.d3d.D3DScreenUpdateManager.createScreenSurface(Unknown Source) at sun.awt.windows.WComponentPeer.replaceSurfaceData(Unknown Source) at sun.awt。 windows.WComponentPeer.replaceSurfaceData(Unknown Source) at sun.awt.windows.WComponentPeer$2.run(Unknown Source) at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)在 java.awt.event.InvocationEvent.dispatch(Unknown Source) 在 java.awt.EventQueue.dispatchEvent(Unknown Source) 在 java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 在 java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)在 java.awt.EventDispatchThread。pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 123.829: [Full GC 123.829: [Tenured : 21887K->21887K(21888K), 0.1306163 secs] 31679K->30695K(31680K), [Perm : 2056K->2056K(12288K)], 0.1306809 secs] [Times: user=0.113 sys=0.00, real=0.]线程“RMI TCP 连接(空闲)”中的异常 java.lang.OutOfMemoryError:Java 堆空间 线程“RMI TCP 连接(空闲)”中的异常 java.lang.OutOfMemoryError:Java 堆空间 124.040:[Full GC 124.040:[Tenured: 21888K->21887K(21888K), 0.1259948 secs] 31680K->27400K(31680K), [Perm : 2057K->2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.1s]13秒]13秒]java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 123.829 处的 EventDispatchThread.pumpEvents(Unknown Source): [Full GC 123.829: [Tenured: 21887K->21887K(21888K), 0.1306163 secs] 31679K->30695K(31680K), [Perm : 2056K->2056K(12288K)], 0.1306809 secs] [Times: user=0.13 sys=0.00, real=0.13 secs] 线程“RMI TCP Connection(idle)”中的异常" java.lang.OutOfMemoryError: Java heap space Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space 124.040: [Full GC 124.040: [Tenured: 21888K->21887K(21888K), 0.1259948 secs ] 31680K->27400K(31680K), [Perm : 2057K->2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs]java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 123.829 处的 EventDispatchThread.pumpEvents(Unknown Source): [Full GC 123.829: [Tenured: 21887K->21887K(21888K), 0.1306163 secs] 31679K->30695K(31680K), [Perm : 2056K->2056K(12288K)], 0.1306809 secs] [Times: user=0.13 sys=0.00, real=0.13 secs] 线程“RMI TCP Connection(idle)”中的异常“ java.lang.OutOfMemoryError:线程“RMI TCP 连接(空闲)”中的 Java 堆空间异常 java.lang.OutOfMemoryError:Java 堆空间 124.040:[Full GC 124.040:[Tenured:21888K->21887K(21888K),0.1259948 秒] 31680K->27400K(31680K), [Perm : 2057K->2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs]pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 123.829: [Full GC 123.829: [Tenured: 21887K->21887K(21888K), 0.1306163 secs] 31679K->30695K(31680K), [Perm: 2056K -> 2056K(12288K)],0.1306809 秒] [时间:用户 = 0.13 系统 = 0.00,真实 = 0.13 秒] 线程“RMI TCP 连接(空闲)”中的异常 java.lang.OutOfMemoryError:线程中的 Java 堆空间异常“ RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space 124.040: [Full GC 124.040: [Tenured: 21888K->21887K(21888K), 0.1259948 secs] 31680K->27400K(31680K), [Perm : 2057K- >2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs]pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 123.829: [Full GC 123.829: [Tenured: 21887K->21887K(21888K), 0.1306163 secs] 31679K->30695K(31680K), [Perm: 2056K -> 2056K(12288K)],0.1306809 秒] [时间:用户 = 0.13 系统 = 0.00,真实 = 0.13 秒] 线程“RMI TCP 连接(空闲)”中的异常 java.lang.OutOfMemoryError:线程中的 Java 堆空间异常“ RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space 124.040: [Full GC 124.040: [Tenured: 21888K->21887K(21888K), 0.1259948 secs] 31680K->27400K(31680K), [Perm : 2057K- >2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs][Perm : 2056K->2056K(12288K)], 0.1306809 secs] [Times: user=0.13 sys=0.00, real=0.13 secs] 线程“RMI TCP Connection(idle)”中的异常 java.lang.OutOfMemoryError: Java heap space线程“RMI TCP Connection(idle)”中的异常 java.lang.OutOfMemoryError:Java 堆空间 124.040:[Full GC 124.040:[Tenured:21888K->21887K(21888K),0.1259948 秒]31680K->27400K(31680K),[ Perm : 2057K->2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs][Perm : 2056K->2056K(12288K)], 0.1306809 secs] [Times: user=0.13 sys=0.00, real=0.13 secs] 线程“RMI TCP Connection(idle)”中的异常 java.lang.OutOfMemoryError: Java heap space线程“RMI TCP Connection(idle)”中的异常 java.lang.OutOfMemoryError:Java 堆空间 124.040:[Full GC 124.040:[Tenured:21888K->21887K(21888K),0.1259948 秒]31680K->27400K(31680K),[ Perm : 2057K->2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs]1259948 secs] 31680K->27400K(31680K), [Perm : 2057K->2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs]1259948 secs] 31680K->27400K(31680K), [Perm : 2057K->2057K(12288K)], 0.1260596 secs] [Times: user=0.13 sys=0.00, real=0.13 secs]


堆内存在下面的 Full GC 中回收


124.283:[Full GC 124.283:[Tenured:21888K->15215K(21888K),0.0945810 秒] 31680K->15215K(31680K),[Perm:2057K->2055K(12288K)],0.0945810 秒],0.094603 秒。 sys=0.00, real=0.09 secs] 124.829: [GC 124.829: [DefNew: 8704K->988K(9792K), 0.0079326 secs] 23919K->16203K(31680K), 0.0079854 secs] [Times: user=0.00 sys=0.00,真实= 0.00秒]线程“RMI TCP连接(空闲)”中的异常java.lang.OutOfMemoryError:线程“RMI TCP连接(空闲)”中的Java堆空间异常java.lang.OutOfMemoryError:线程“RMI中的Java堆空间异常” TCP 连接(空闲)”java.lang.OutOfMemoryError:线程“RMI TCP 连接(空闲)”中的 Java 堆空间异常 java.lang.OutOfMemoryError:线程“RMI TCP 连接(空闲)”java.lang 中的 Java 堆空间异常。内存不足错误:线程“RMI TCP 连接(空闲)”中的 Java 堆空间异常 java.lang.OutOfMemoryError:线程“RMI TCP 连接(空闲)”中的 Java 堆空间异常 java.lang.OutOfMemoryError:线程“RMI TCP 连接”中的 Java 堆空间异常(空闲)“java.lang.OutOfMemoryError:Java 堆空间异常在线程“RMI TCP 连接(空闲)”java.lang.OutOfMemoryError:Java 堆空间

4

0 回答 0