[ https://issues.apache.org/jira/browse/KARAF-6975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lijun Liao updated KARAF-6975: ------------------------------ Attachment: test.script > "java.lang.OutOfMemoryError: GC overhead limit exceeded" thrown while > executing 1000s commands via shell:source > --------------------------------------------------------------------------------------------------------------- > > Key: KARAF-6975 > URL: https://issues.apache.org/jira/browse/KARAF-6975 > Project: Karaf > Issue Type: Bug > Components: karaf > Affects Versions: 4.2.9, 4.2.10 > Environment: I tested with apache-karafa-4.2.10 and 4.2.19 in ubuntu > 18 and JDK 8. > Reporter: Lijun Liao > Priority: Major > Attachments: test.script > > > Copy the following test script to a file, called test.script > {{i = 0}} > {{list1 = [1 2 3 4 5 6 7 8 9 10]; each ($list1) {}} > {{ list2 = [1 2 3 4 5 6 7 8 9 10]; each ($list2) {}} > {{ list3 = [1 2 3 4 5 6 7 8 9 10]; each ($list3) {}} > {{ list4 = [1 2 3 4 5 6 7 8 9 10]; each ($list4) {}} > {{ list5 = [1 2 3 4 5 6 7 8 9 10]; each ($list5) {}} > {{ date > date.txt}} > {{ echo round %(i+=1)}} > {{ }}} > {{ }}} > {{ }}} > {{ }}} > {{}}} > > Steps to reproduce the exception: > # Start karaf with bin/karaf > # Execute shell:source /path/to/test-ome.script > Error shown in the karaf console: > {quote}round 2326 > Exception in thread "pool-5-thread-52" java.lang.OutOfMemoryError: GC > overhead limit exceeded > Error executing command: java.lang.reflect.InvocationTargetException > {quote} > Error in the data/logs/karaf.log > {quote}2020-12-19T20:46:55,963 | INFO | pipe-source test.script | > SourceAction | 35 - org.apache.karaf. > shell.commands - 4.2.10 | Printing file: > /home/lliao/Downloads/apache-karaf-4.2.10/test.script > 2020-12-19T20:47:01,684 | ERROR | Karaf local console user karaf | ShellUtil > | 36 - org.apache > .karaf.shell.core - 4.2.10 | Exception caught while executing command > java.lang.reflect.InvocationTargetException: null > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_272] > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:1.8.0_272] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:1.8.0_272] > at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_272] > at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:143) > ~[?:?] > at > org.apache.karaf.shell.impl.console.SessionFactoryImpl$ShellCommand.lambda$wrap$0(SessionFactoryImpl.java:218) > ~[?:?] > at > org.apache.karaf.shell.impl.console.SessionFactoryImpl$ShellCommand.execute(SessionFactoryImpl.java:264) > ~[?:?] > at > org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) > ~[?:?] > at > org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) > ~[?:?] > at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?] > at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) > ~[?:?] > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?] > at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?] > at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?] > at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?] > at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_272] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > ~[?:1.8.0_272] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > ~[?:1.8.0_272] > at java.lang.Thread.run(Thread.java:748) [?:1.8.0_272] > Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded > {quote} -- This message was sent by Atlassian Jira (v8.3.4#803005)