Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

从4.1.2升级到5.3.3后出现OOM #564

Closed
codecodesam opened this issue Aug 9, 2023 · 1 comment
Closed

从4.1.2升级到5.3.3后出现OOM #564

codecodesam opened this issue Aug 9, 2023 · 1 comment

Comments

@codecodesam
Copy link

整个项目仅仅升级了aviator的版本,上线运行后就出现了循环gc

打印gc日志观察是metaspace一直在gc,回收不了

有遇到这个问题的大佬有解题思路的吗

项目组对aviator的使用很简单,仅仅为AviatorEvaluator.execute(script)

@codecodesam
Copy link
Author

{Heap before GC invocations=625 (full 84):
 PSYoungGen      total 691712K, used 32K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 685056K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff280000)
  from space 6656K, 0% used [0x00000000ff280000,0x00000000ff288000,0x00000000ff900000)
  to   space 6144K, 0% used [0x00000000ffa00000,0x00000000ffa00000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160732K, capacity 197671K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:36.799+0800: 1026.498: [Full GC (Metadata GC Threshold) [PSYoungGen: 32K->0K(691712K)] [ParOldGen: 305356K->305356K(1398272K)] 305388K->305356K(2089984K), [Metaspace: 160732K->160732K(1273856K)], 0.4460835 secs] [Times: user=2.36 sys=0.01, real=0.44 secs] 
Heap after GC invocations=625 (full 84):
 PSYoungGen      total 691712K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 685056K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff280000)
  from space 6656K, 0% used [0x00000000ff280000,0x00000000ff280000,0x00000000ff900000)
  to   space 6144K, 0% used [0x00000000ffa00000,0x00000000ffa00000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160732K, capacity 197671K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=626 (full 84):
 PSYoungGen      total 691712K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 685056K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff280000)
  from space 6656K, 0% used [0x00000000ff280000,0x00000000ff280000,0x00000000ff900000)
  to   space 6144K, 0% used [0x00000000ffa00000,0x00000000ffa00000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160732K, capacity 197671K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:37.246+0800: 1026.944: [GC (Last ditch collection) [PSYoungGen: 0K->0K(693248K)] 305356K->305356K(2091520K), 0.0134606 secs] [Times: user=0.06 sys=0.00, real=0.02 secs] 
Heap after GC invocations=626 (full 84):
 PSYoungGen      total 693248K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff480000)
  from space 6144K, 0% used [0x00000000ffa00000,0x00000000ffa00000,0x0000000100000000)
  to   space 5632K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000ffa00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160732K, capacity 197671K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=627 (full 85):
 PSYoungGen      total 693248K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff480000)
  from space 6144K, 0% used [0x00000000ffa00000,0x00000000ffa00000,0x0000000100000000)
  to   space 5632K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000ffa00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160732K, capacity 197671K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:37.259+0800: 1026.958: [Full GC (Last ditch collection) [PSYoungGen: 0K->0K(693248K)] [ParOldGen: 305356K->305356K(1398272K)] 305356K->305356K(2091520K), [Metaspace: 160732K->160732K(1273856K)], 0.4964944 secs] [Times: user=2.73 sys=0.02, real=0.49 secs] 
Heap after GC invocations=627 (full 85):
 PSYoungGen      total 693248K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff480000)
  from space 6144K, 0% used [0x00000000ffa00000,0x00000000ffa00000,0x0000000100000000)
  to   space 5632K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000ffa00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160732K, capacity 197671K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=628 (full 85):
 PSYoungGen      total 693248K, used 4K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5581068,0x00000000ff480000)
  from space 6144K, 0% used [0x00000000ffa00000,0x00000000ffa00000,0x0000000100000000)
  to   space 5632K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000ffa00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:37.758+0800: 1027.457: [GC (Metadata GC Threshold) [PSYoungGen: 4K->96K(692736K)] 305360K->305452K(2091008K), 0.0134078 secs] [Times: user=0.06 sys=0.01, real=0.01 secs] 
Heap after GC invocations=628 (full 85):
 PSYoungGen      total 692736K, used 96K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff480000)
  from space 5632K, 1% used [0x00000000ff480000,0x00000000ff498000,0x00000000ffa00000)
  to   space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=629 (full 86):
 PSYoungGen      total 692736K, used 96K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff480000)
  from space 5632K, 1% used [0x00000000ff480000,0x00000000ff498000,0x00000000ffa00000)
  to   space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33148,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:37.772+0800: 1027.470: [Full GC (Metadata GC Threshold) [PSYoungGen: 96K->0K(692736K)] [ParOldGen: 305356K->305356K(1398272K)] 305452K->305356K(2091008K), [Metaspace: 160734K->160734K(1273856K)], 0.4151326 secs] [Times: user=2.44 sys=0.01, real=0.42 secs] 
Heap after GC invocations=629 (full 86):
 PSYoungGen      total 692736K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff480000)
  from space 5632K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000ffa00000)
  to   space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=630 (full 86):
 PSYoungGen      total 692736K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 687104K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff480000)
  from space 5632K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000ffa00000)
  to   space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:38.187+0800: 1027.886: [GC (Last ditch collection) [PSYoungGen: 0K->0K(694272K)] 305356K->305356K(2092544K), 0.0100995 secs] [Times: user=0.04 sys=0.00, real=0.01 secs] 
Heap after GC invocations=630 (full 86):
 PSYoungGen      total 694272K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff680000)
  from space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
  to   space 4608K, 0% used [0x00000000ff680000,0x00000000ff680000,0x00000000ffb00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=631 (full 87):
 PSYoungGen      total 694272K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff680000)
  from space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
  to   space 4608K, 0% used [0x00000000ff680000,0x00000000ff680000,0x00000000ffb00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:38.197+0800: 1027.896: [Full GC (Last ditch collection) [PSYoungGen: 0K->0K(694272K)] [ParOldGen: 305356K->305356K(1398272K)] 305356K->305356K(2092544K), [Metaspace: 160734K->160734K(1273856K)], 0.4244749 secs] [Times: user=2.35 sys=0.02, real=0.42 secs] 
Heap after GC invocations=631 (full 87):
 PSYoungGen      total 694272K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff680000)
  from space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
  to   space 4608K, 0% used [0x00000000ff680000,0x00000000ff680000,0x00000000ffb00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160734K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21951K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=632 (full 87):
 PSYoungGen      total 694272K, used 12706K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 1% used [0x00000000d5580000,0x00000000d61e8980,0x00000000ff680000)
  from space 5120K, 0% used [0x00000000ffb00000,0x00000000ffb00000,0x0000000100000000)
  to   space 4608K, 0% used [0x00000000ff680000,0x00000000ff680000,0x00000000ffb00000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160735K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21952K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:38.629+0800: 1028.328: [GC (Metadata GC Threshold) [PSYoungGen: 12706K->1305K(693760K)] 318062K->306661K(2092032K), 0.0128548 secs] [Times: user=0.06 sys=0.00, real=0.01 secs] 
Heap after GC invocations=632 (full 87):
 PSYoungGen      total 693760K, used 1305K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff680000)
  from space 4608K, 28% used [0x00000000ff680000,0x00000000ff7c6520,0x00000000ffb00000)
  to   space 4608K, 0% used [0x00000000ffb80000,0x00000000ffb80000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160735K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21952K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=633 (full 88):
 PSYoungGen      total 693760K, used 1305K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff680000)
  from space 4608K, 28% used [0x00000000ff680000,0x00000000ff7c6520,0x00000000ffb00000)
  to   space 4608K, 0% used [0x00000000ffb80000,0x00000000ffb80000,0x0000000100000000)
 ParOldGen       total 1398272K, used 305356K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092a33228,0x00000000d5580000)
 Metaspace       used 160735K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21952K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:38.642+0800: 1028.341: [Full GC (Metadata GC Threshold) [PSYoungGen: 1305K->0K(693760K)] [ParOldGen: 305356K->306212K(1398272K)] 306661K->306212K(2092032K), [Metaspace: 160735K->160735K(1273856K)], 0.4047156 secs] [Times: user=2.02 sys=0.02, real=0.41 secs] 
Heap after GC invocations=633 (full 88):
 PSYoungGen      total 693760K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff680000)
  from space 4608K, 0% used [0x00000000ff680000,0x00000000ff680000,0x00000000ffb00000)
  to   space 4608K, 0% used [0x00000000ffb80000,0x00000000ffb80000,0x0000000100000000)
 ParOldGen       total 1398272K, used 306212K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092b09130,0x00000000d5580000)
 Metaspace       used 160735K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21952K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=634 (full 88):
 PSYoungGen      total 693760K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 689152K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff680000)
  from space 4608K, 0% used [0x00000000ff680000,0x00000000ff680000,0x00000000ffb00000)
  to   space 4608K, 0% used [0x00000000ffb80000,0x00000000ffb80000,0x0000000100000000)
 ParOldGen       total 1398272K, used 306212K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092b09130,0x00000000d5580000)
 Metaspace       used 160735K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21952K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:39.047+0800: 1028.746: [GC (Last ditch collection) [PSYoungGen: 0K->0K(694784K)] 306212K->306212K(2093056K), 0.0110117 secs] [Times: user=0.05 sys=0.00, real=0.01 secs] 
Heap after GC invocations=634 (full 88):
 PSYoungGen      total 694784K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 690176K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff780000)
  from space 4608K, 0% used [0x00000000ffb80000,0x00000000ffb80000,0x0000000100000000)
  to   space 4096K, 0% used [0x00000000ff780000,0x00000000ff780000,0x00000000ffb80000)
 ParOldGen       total 1398272K, used 306212K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092b09130,0x00000000d5580000)
 Metaspace       used 160735K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21952K, capacity 24657K, committed 36864K, reserved 1048576K
}
{Heap before GC invocations=635 (full 89):
 PSYoungGen      total 694784K, used 0K [0x00000000d5580000, 0x0000000100000000, 0x0000000100000000)
  eden space 690176K, 0% used [0x00000000d5580000,0x00000000d5580000,0x00000000ff780000)
  from space 4608K, 0% used [0x00000000ffb80000,0x00000000ffb80000,0x0000000100000000)
  to   space 4096K, 0% used [0x00000000ff780000,0x00000000ff780000,0x00000000ffb80000)
 ParOldGen       total 1398272K, used 306212K [0x0000000080000000, 0x00000000d5580000, 0x00000000d5580000)
  object space 1398272K, 21% used [0x0000000080000000,0x0000000092b09130,0x00000000d5580000)
 Metaspace       used 160735K, capacity 197679K, committed 262144K, reserved 1273856K
  class space    used 21952K, capacity 24657K, committed 36864K, reserved 1048576K
2023-08-09T13:37:39.058+0800: 1028.757: [Full GC (Last ditch collection) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant