EvoMaster icon indicating copy to clipboard operation
EvoMaster copied to clipboard

OutOfMemoryError during minimization phase

Open ytfrank opened this issue 11 months ago • 14 comments

The following message occurred after running the driver class: WARN - Fail to load org.evomaster.client.java.instrumentation.staticstate.ExecutionTracer 12 31, 2024 4:31:31 shaded.org.glassfish.jersey.internal.inject.Providers checkProviderRuntime Warning: A provider org.evomaster.client.java.controller.internal.EMController registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider org.evomaster.client.java.controller.internal.EMController will be ignored. 12 31, 2024 4:31:32 shaded.org.glassfish.jersey.internal.Errors logErrors Warning: The following warnings have been detected: WARNING: The (sub)resource method getWarning in org.evomaster.client.java.controller.internal.EMController contains empty path annotation.

Here is the infos:

  1. evoMaster driver, and running the drvier class in idea. Below is some part of class code: public static void main(String[] args) { logger.info("****** main thread started ******"); SutController controller = new KSEmbeddedSutController(); InstrumentedSutStarter starter = new InstrumentedSutStarter(controller);

     starter.start();
     logger.info("****** main thread finished ******");
    

    }

    @Override public String startSut() { try { logger.info("Starting SUT...");

         tomcat = new Tomcat();
         tomcat.setPort(8080);
         tomcat.getConnector();
    
    
         Context context = tomcat.addWebapp("/", "/Users/apple/open-app/target/open-app-1.0-RELEASE");
    
    
         tomcat.start();
         logger.info("Tomcat started successfully on port 8080");
    
         configureDatabaseConnection();
         logger.info("Database connection configured successfully");
    
    
         return "http://localhost:" + getSutPort();
     } catch (Exception e) {
         logger.error("Failed to start SUT", e);
         return "Failed to start Spring MVC application.";
     }
    

    } Our project is a spring mvc service, which deployed on tomcat 8.5.38. Although the evoMaster driver class and sut are in the same jvm, evoMaster cannot find and instrument the classes of the service "open-app-1.0-RELEASE". How can EvoMaster perform white-box testing on services running on Tomcat?

  2. java -jar ~/Downloads/evomaster.jar --maxTime 10s --outputFolder “testcases”

Other important info:

  • version of EvoMaster (EM) used : 3.3.0
  • how EM is run (eg, if from JAR or from one of its OS installers): white-box, embeded
  • version of applicable runtimes (eg, JVM, NodeJS and .Net). For Java, can paste the output of java --version : 1.8.0
  • command-line options used to run EM

ytfrank avatar Dec 31 '24 08:12 ytfrank

Another way is loading the agent in the startSut like below : loadJavaAgent("evomaster-agent.jar"); But how can I get the jar evomaster-agent.jar? I cannot find the jar after "mvn clean install"

ytfrank avatar Dec 31 '24 09:12 ytfrank

Hi @ytfrank thanks for reporting this. But, is it actually failing? Those WARN messages might be misleading, as that class is using JEE annotations that might be picked up by Tomcat.

Can you paste the logs of EvoMaster core process java -jar ~/Downloads/evomaster.jar --maxTime 10s --outputFolder “testcases”?

When you write cannot find and instrument the classes of the service "open-app-1.0-RELEASE", what do you have under getPackagePrefixesToCover()?

I have never run EvoMaster in that way, but in theory there should be no issue. There is no need to do a loadJavaAgent directly, as that is handled by InstrumentedSutStarter automatically

arcuri82 avatar Jan 01 '25 21:01 arcuri82

Thanks for your reply! Here is the infos:

  1. logs
$ java -jar ~/Downloads/evomaster.jar  --maxTime 10s --outputFolder "/Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8"
*
 _____          ___  ___          _
|  ___|         |  \/  |         | |
| |____   _____ | .  . | __ _ ___| |_ ___ _ __
|  __\ \ / / _ \| |\/| |/ _` / __| __/ _ \ '__|
| |___\ V / (_) | |  | | (_| \__ \ ||  __/ |
\____/ \_/ \___/\_|  |_/\__,_|___/\__\___|_|


* EvoMaster version: 3.3.0
* Loading configuration file from: /Users/apple/gitrepo/EvoMaster/client-java/instrumentation/target/em.yaml
* Initializing...
01:27:23.227 [main] WARN  o.t.u.TestcontainersConfiguration - Attempted to read Testcontainers configuration file at file:/Users/apple/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: /Users/apple/.testcontainers.properties (No such file or directory)
* There are 3 usable RESTful API endpoints defined in the schema configuration
* Starting to generate test cases
* Consumed search budget: 148.940%
* Covered targets: 0; time per test: 14885.0ms (1.0 actions); since last improvement: 14s
* Starting to apply minimization phase
* Recomputing full coverage for 1 tests
* No test to minimize
* Minimization phase took 0 seconds
* Evaluated tests: 1
* Evaluated actions: 1
* Needed budget: 100%
* Passed time (seconds): 14
* Execution time per test (ms): Avg=14885.00 , min=14885.00 , max=14885.00
* Execution time per action (ms): Avg=14885.00 , min=14885.00 , max=14885.00
* Computation overhead between tests (ms): Avg=0.00 , min=0.00 , max=0.00
* Computation overhead of resetting the SUT (ms): Avg=6.50 , min=6.00 , max=7.00
* Computation overhead of fetching test results, per test, subset of targets (ms): Avg=74.00 , min=74.00 , max=74.00
* Going to save 1 test to /Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8
* Potential faults: 1
* Covered targets (lines, branches, faults, etc.): 254
* Bytecode line coverage: 5% (103 out of 2130 in 45 units/classes)
* Successfully executed (HTTP code 2xx) 1 endpoints out of 3 (33%)
* EvoMaster process has completed successfully
  1. parf of the driver codes:
    public String getPackagePrefixesToCover() {
        return "com.open.app";   // the package name of the classes in the tomcat app
    }

Debuged the code, it seems the class in "com.open.app.*" can be instrumented by evoMaster:

    public byte[] transformBytes(ClassLoader classLoader, ClassName className, ClassReader reader) {
        Objects.requireNonNull(classLoader);
        Objects.requireNonNull(className);
        Objects.requireNonNull(reader);
        if (!ClassesToExclude.checkIfCanInstrument(classLoader, className)) {
            throw new IllegalArgumentException("Cannot instrument " + className);
        } else {
            int asmFlags = 2;  // enter the line 44 (class Instrumentator)

I'll try the testing later to confirm it.

ytfrank avatar Jan 03 '25 03:01 ytfrank

hi,

considering:

Bytecode line coverage: 5% (103 out of 2130 in 45 units/classes)

then the classes are instrumented.

what happens is that you are running EM only for 10s, and somehow the first call takes 14s. maybe in that Tomcat configuration, the code of app is loaded dynamically on first access? that would explain the results.

try to run EM for longer, eg --maxTime 2m, or even better 5m or 10m and see what you get.

also, for formatting code, can use "```" :)

arcuri82 avatar Jan 03 '25 09:01 arcuri82

Yeah, It works also well for the app on tomcat.

By the way, I tried testing an hour twice, but both were failed due to OutOfMemoryError. Any way to improve or get more debug info for the exception? There was 2 or 3 GB free memory on my laptop during the testing.

1st

$ java -jar ~/Downloads/evomaster.jar --maxTime 3600s --outputFolder "/Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8" *


| | | / | | | | |_ _____ | . . | __ _ | | ___ _ __ | __\ \ / / _ | |/| |/ ` / | / _ \ '| | |\ V / () | | | | (| __ \ || / | _/ _/ _/_| |/_,|/____|_|

  • EvoMaster version: 3.3.0
  • Loading configuration file from: /Users/apple/gitrepo/EvoMaster/client-java/instrumentation/target/em.yaml
  • Initializing... 22:25:06.964 [main] WARN o.t.u.TestcontainersConfiguration - Attempted to read Testcontainers configuration file at file:/Users/apple/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: /Users/apple/.testcontainers.properties (No such file or directory)
  • There are 3 usable RESTful API endpoints defined in the schema configuration
  • Starting to generate test cases
  • Consumed search budget: 21.445%
  • Covered targets: 28207; time per test: 208.9ms (1.8 actions); since last improvement: 1s Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded at org.evomaster.core.problem.rest.RestIndividual.copyContent(RestIndividual.kt:93) at org.evomaster.core.problem.rest.RestIndividual.copyContent(RestIndividual.kt:33) at org.evomaster.core.search.StructuralElement.copy(StructuralElement.kt:324) at org.evomaster.core.search.Individual.copy(Individual.kt:104) at org.evomaster.core.search.EvaluatedIndividual.copy(EvaluatedIndividual.kt:245) at org.evomaster.core.search.service.Archive.sampleIndividual(Archive.kt:211) at org.evomaster.core.search.algorithms.MioAlgorithm.searchOnce(MioAlgorithm.kt:44) at org.evomaster.core.search.service.SearchAlgorithm.search(SearchAlgorithm.kt:73) at org.evomaster.core.Main$Companion.run(Main.kt:558) at org.evomaster.core.Main$Companion.initAndRun(Main.kt:174) at org.evomaster.core.Main$Companion.main(Main.kt:85) at org.evomaster.core.Main.main(Main.kt) (base)

2nd

$ java -jar ~/Downloads/evomaster.jar --maxTime 3600s --outputFolder "/Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8" *


| | | / | | | | |_ _____ | . . | __ _ | | ___ _ __ | __\ \ / / _ | |/| |/ ` / | / _ \ '| | |\ V / () | | | | (| __ \ || / | _/ _/ _/_| |/_,|/____|_|

  • EvoMaster version: 3.3.0
  • Loading configuration file from: /Users/apple/gitrepo/EvoMaster/client-java/instrumentation/target/em.yaml
  • Initializing... 22:50:59.237 [main] WARN o.t.u.TestcontainersConfiguration - Attempted to read Testcontainers configuration file at file:/Users/apple/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: /Users/apple/.testcontainers.properties (No such file or directory)
  • There are 3 usable RESTful API endpoints defined in the schema configuration
  • Starting to generate test cases
  • Consumed search budget: 102.564%
  • Covered targets: 27541; time per test: 17038.8ms (1.9 actions); since last improvement: 2776s
  • Starting to apply minimization phase Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.LinkedHashMap.newNode(LinkedHashMap.java:256) at java.util.HashMap.putVal(HashMap.java:632) at java.util.HashMap.put(HashMap.java:613) at java.util.HashSet.add(HashSet.java:220) at kotlin.collections.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:1296) at kotlin.collections.CollectionsKt___CollectionsKt.toSet(_Collections.kt:1348) at org.evomaster.core.search.service.Archive.coveredTargets(Archive.kt:372) at org.evomaster.core.search.service.Minimizer.recomputeArchiveWithFullCoverageInfo(Minimizer.kt:211) at org.evomaster.core.search.service.Minimizer.minimizeMainActionsPerCoveredTargetInArchive(Minimizer.kt:98) at org.evomaster.core.search.service.SearchAlgorithm.handleAfterSearch(SearchAlgorithm.kt:99) at org.evomaster.core.search.service.SearchAlgorithm.search(SearchAlgorithm.kt:86) at org.evomaster.core.Main$Companion.run(Main.kt:558) at org.evomaster.core.Main$Companion.initAndRun(Main.kt:174) at org.evomaster.core.Main$Companion.main(Main.kt:85) at org.evomaster.core.Main.main(Main.kt) (base)

ytfrank avatar Jan 04 '25 16:01 ytfrank

Hi, it doesn't matter how much memory is left, as Java programs have own limits (typically 1/4 of your total RAM). You can increase the limit by using the -Xmx option. I guess should add some info in the documentation about it

arcuri82 avatar Jan 05 '25 20:01 arcuri82

Thanks for your reply! Tried "-Xmx12g", but still failed. It seems more memory is needed but my laptop is not enough.

java -Xmx12g -jar ~/Downloads/evomaster.jar --maxTime 3600s --outputFolder "/Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8" --exportCoveredTarget true *


| | | / | | | | |_ _____ | . . | __ _ | | ___ _ __ | __\ \ / / _ | |/| |/ ` / | / _ \ '| | |\ V / () | | | | (| __ \ || / | _/ _/ _/_| |/_,|/____|_|

  • EvoMaster version: 3.3.0
  • Loading configuration file from: /Users/apple/em.yaml
  • Initializing... 10:12:00.145 [main] WARN o.t.u.TestcontainersConfiguration - Attempted to read Testcontainers configuration file at file:/Users/apple/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: /Users/apple/.testcontainers.properties (No such file or directory)
  • There are 3 usable RESTful API endpoints defined in the schema configuration
  • Starting to generate test cases
  • Consumed search budget: 62.393%
  • Covered targets: 64589; time per test: 27.9ms (1.2 actions); since last improvement: 0s
  • Consumed search budget: 100.529%
  • Covered targets: 72059; time per test: 484.6ms (1.0 actions); since last improvement: 25s
  • Starting to apply minimization phase Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.AbstractStringBuilder.(AbstractStringBuilder.java:68) at java.lang.StringBuilder.(StringBuilder.java:95) at org.evomaster.core.search.gene.root.CompositeConditionalFixedGene.(CompositeConditionalFixedGene.kt:27) at org.evomaster.core.search.gene.root.CompositeFixedGene.(CompositeFixedGene.kt:13) at org.evomaster.core.search.gene.regex.DisjunctionListRxGene.(DisjunctionListRxGene.kt:21) at org.evomaster.core.search.gene.regex.DisjunctionListRxGene.copyContent(DisjunctionListRxGene.kt:36) at org.evomaster.core.search.gene.regex.DisjunctionListRxGene.copyContent(DisjunctionListRxGene.kt:19) at org.evomaster.core.search.StructuralElement.copy(StructuralElement.kt:324) at org.evomaster.core.search.gene.Gene.copy(Gene.kt:247).

Is there any way to reduce the memory usage? It looks like the option "archiveTargetLimit" works.

ytfrank avatar Jan 06 '25 03:01 ytfrank

hi @ytfrank ,

this is concerning. but, with Covered targets: 72059 it seems like you have a quite large API. exception happens in minimization phase, which might need some optimization in the memory handling. for now, you can try the following:

a) --maxResponseByteSize 10000 (or even lower)

if that is not enough, then try:

b) --minimize false

let me know if that helps

arcuri82 avatar Jan 06 '25 08:01 arcuri82

Great! It works well after adding the options. Still hope the testcases are shorter.

java -Xmx13g -jar ~/Downloads/evomaster.jar --maxTime 600s --outputFolder "/Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8" --exportCoveredTarget true --maxResponseByteSize 5000 --minimize false *


| | | / | | | | |_ _____ | . . | __ _ | | ___ _ __ | __\ \ / / _ | |/| |/ ` / | / _ \ '| | |\ V / () | | | | (| __ \ || / | _/ _/ _/_| |/_,|/____|_|

  • EvoMaster version: 3.3.0
  • Loading configuration file from: /Users/apple/em.yaml
  • Initializing... 16:36:59.552 [main] WARN o.t.u.TestcontainersConfiguration - Attempted to read Testcontainers configuration file at file:/Users/apple/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: /Users/apple/.testcontainers.properties (No such file or directory)
  • There are 3 usable RESTful API endpoints defined in the schema configuration
  • Starting to generate test cases
  • Consumed search budget: 99.992%
  • Covered targets: 21287; time per test: 22.1ms (1.0 actions); since last improvement: 0s
  • Evaluated tests: 21664
  • Evaluated actions: 26956
  • Needed budget: 100%
  • Passed time (seconds): 602
  • Execution time per test (ms): Avg=17.72 , min=6.00 , max=17080.00
  • Execution time per action (ms): Avg=15.45 , min=5.20 , max=17080.00
  • Computation overhead between tests (ms): Avg=9.97 , min=1.00 , max=15516.00
  • Computation overhead of resetting the SUT (ms): Avg=3.49 , min=0.00 , max=16955.00
  • Computation overhead of fetching test results, per test, subset of targets (ms): Avg=1.00 , min=0.00 , max=127.00
  • Going to save 9323 tests to /Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8
  • Potential faults: 21189
  • Covered targets (lines, branches, faults, etc.): 21463
  • Bytecode line coverage: 5% (107 out of 2148 in 47 units/classes)
  • Successfully executed (HTTP code 2xx) 3 endpoints out of 3 (100%)
  • EvoMaster process has completed successfully

ytfrank avatar Jan 06 '25 10:01 ytfrank

hi @ytfrank

can you try with --maxResponseByteSize 5000 but --minimize true, and see if still memory issues?

also Bytecode line coverage: 5% is quite low... does the API have authentication? if so, was EM configured for it? is the API a private one, or an open-source one?

arcuri82 avatar Jan 06 '25 11:01 arcuri82

  1. Unluckily, OOM if "--minimize true": java -Xmx13g -jar ~/Downloads/evomaster.jar --maxTime 600s --outputFolder "/Users/apple/gitrepo/EvoMaster/whitebox/src/main/java/ks/long8" --exportCoveredTarget true --maxResponseByteSize 5000. I will try "--maxResponseByteSize 1000" later.

| | | / | | | | |_ _____ | . . | __ _ | | ___ _ __ | __\ \ / / _ | |/| |/ ` / | / _ \ '| | |\ V / () | | | | (| __ \ || / | _/ _/ _/_| |/_,|/____|_|

  • EvoMaster version: 3.3.0
  • Loading configuration file from: /Users/apple/em.yaml
  • Initializing... 09:32:15.753 [main] WARN o.t.u.TestcontainersConfiguration - Attempted to read Testcontainers configuration file at file:/Users/apple/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: /Users/apple/.testcontainers.properties (No such file or directory)
  • There are 3 usable RESTful API endpoints defined in the schema configuration
  • Starting to generate test cases
  • Consumed search budget: 101.933%
  • Covered targets: 36523; time per test: 162.7ms (1.0 actions); since last improvement: 14s
  • Starting to apply minimization phase
  • Recomputing full coverage for 16522 tests
  • [ERROR] EvoMaster process terminated abruptly. This is likely a bug in EvoMaster. Please copy&paste the following stacktrace, and create a new issue on https://github.com/EMResearch/EvoMaster/issues javax.ws.rs.ProcessingException: GC overhead limit exceeded at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:309) at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:630) at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:665) at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:659) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.process(Errors.java:205) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390) at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:659) at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:629) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:434) at org.glassfish.jersey.client.JerseyInvocation$Builder.put(JerseyInvocation.java:323) at org.evomaster.core.remote.service.RemoteControllerImplementation$registerNewAction$response$1.invoke(RemoteControllerImplementation.kt:405) at org.evomaster.core.remote.service.RemoteControllerImplementation$registerNewAction$response$1.invoke(RemoteControllerImplementation.kt:401) at org.evomaster.core.remote.service.RemoteControllerImplementation.makeHttpCall(RemoteControllerImplementation.kt:92) at org.evomaster.core.remote.service.RemoteControllerImplementation.registerNewAction(RemoteControllerImplementation.kt:401) at org.evomaster.core.problem.enterprise.service.EnterpriseFitness.registerNewAction(EnterpriseFitness.kt:162) at org.evomaster.core.problem.rest.service.ResourceRestFitness.computeFitnessForEachEnterpriseActionGroup(ResourceRestFitness.kt:170) at org.evomaster.core.problem.rest.service.ResourceRestFitness.computeFitnessForEachEnterpriseActionGroup(ResourceRestFitness.kt:137) at org.evomaster.core.problem.rest.service.ResourceRestFitness.doCalculateCoverage(ResourceRestFitness.kt:84) at org.evomaster.core.problem.rest.service.ResourceRestFitness.doCalculateCoverage(ResourceRestFitness.kt:28) at org.evomaster.core.search.service.FitnessFunction.computeWholeAchievedCoverageForPostProcessing(FitnessFunction.kt:122) at org.evomaster.core.search.service.Minimizer.recomputeArchiveWithFullCoverageInfo(Minimizer.kt:231) at org.evomaster.core.search.service.Minimizer.minimizeMainActionsPerCoveredTargetInArchive(Minimizer.kt:98) at org.evomaster.core.search.service.SearchAlgorithm.handleAfterSearch(SearchAlgorithm.kt:99) at org.evomaster.core.search.service.SearchAlgorithm.search(SearchAlgorithm.kt:86) at org.evomaster.core.Main$Companion.run(Main.kt:558) at org.evomaster.core.Main$Companion.initAndRun(Main.kt:174) at org.evomaster.core.Main$Companion.main(Main.kt:85) at org.evomaster.core.Main.main(Main.kt) Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded at java.util.stream.Collectors$$Lambda$58/669053685.get(Unknown Source) at java.util.stream.ReduceOps$3ReducingSink.begin(ReduceOps.java:164) at java.util.stream.ReferencePipeline$2$1.begin(ReferencePipeline.java:169) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:399) at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:265) at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:297) at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$0(JerseyInvocation.java:630) at org.glassfish.jersey.client.JerseyInvocation$$Lambda$109/667680223.call(Unknown Source) at org.glassfish.jersey.client.JerseyInvocation.call(JerseyInvocation.java:665) at org.glassfish.jersey.client.JerseyInvocation.lambda$runInScope$3(JerseyInvocation.java:659) at org.glassfish.jersey.client.JerseyInvocation$$Lambda$110/669700766.call(Unknown Source) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.process(Errors.java:205) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:390) at org.glassfish.jersey.client.JerseyInvocation.runInScope(JerseyInvocation.java:659) at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:629) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:434) at org.glassfish.jersey.client.JerseyInvocation$Builder.put(JerseyInvocation.java:323) at org.evomaster.core.remote.service.RemoteControllerImplementation$registerNewAction$response$1.invoke(RemoteControllerImplementation.kt:405) at org.evomaster.core.remote.service.RemoteControllerImplementation$registerNewAction$response$1.invoke(RemoteControllerImplementation.kt:401) at org.evomaster.core.remote.service.RemoteControllerImplementation.makeHttpCall(RemoteControllerImplementation.kt:92) at org.evomaster.core.remote.service.RemoteControllerImplementation.registerNewAction(RemoteControllerImplementation.kt:401) at org.evomaster.core.problem.enterprise.service.EnterpriseFitness.registerNewAction(EnterpriseFitness.kt:162) at org.evomaster.core.problem.rest.service.ResourceRestFitness.computeFitnessForEachEnterpriseActionGroup(ResourceRestFitness.kt:170) at org.evomaster.core.problem.rest.service.ResourceRestFitness.computeFitnessForEachEnterpriseActionGroup(ResourceRestFitness.kt:137) at org.evomaster.core.problem.rest.service.ResourceRestFitness.doCalculateCoverage(ResourceRestFitness.kt:84)
  1. For the low coverage, you're right, the private api will verify the sign of the params and decrypt first by AOP, like below:

@Component @Aspect @Order(1) public class ApiInterceptor {

@Around(value = "@annotation(verifySign)")
public Object handleData(ProceedingJoinPoint joinPoint, VerifySign verifySign) {
          // check the sign of the params
          // decrypt the data

Is there any way to input the signature and encryption algorithms into EvoMaster?

ytfrank avatar Jan 07 '25 03:01 ytfrank

hi @ytfrank,

regarding (1), it is an issue with minimization algorithm. I think we naively double the memory in that phase... a more memory-aware algorithm should be implemented to avoid such issue. this can be considered a performance bug

regarding (2), I would need more details... especially if there is any example online to clarify what you mean with verify the sign of the params. but better if, for this, you could create a new separate GitHub issue

arcuri82 avatar Jan 07 '25 09:01 arcuri82

OK. I just created a new issue for the low coverage: https://github.com/WebFuzzing/EvoMaster/issues/1154

ytfrank avatar Jan 07 '25 16:01 ytfrank