-
Notifications
You must be signed in to change notification settings - Fork 17
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
Missing dependency when using botsing-maven-plugin #58
Comments
Currently, we are not supporting the chained stack traces. ENGINEERING is working on a pre-processing module to parse all types of the stack traces. For now, You should choose only one of the stack traces as input. For instance, The given log file should be like this:
or this:
|
Ok, there should be an error message then, never an "index out of bounds"... Works better now (tried the 1st one), but the generated test class has one empty method called "notGeneratedAnyTest()". Took 30 minutes with a lots of logs like this one: Final messages from Botsing say that "the target crash is not covered": [INFO] MaxTime : 1,801 / 1,800 Finished! |
The generated test will be saved when Botsing reaches to fitness function 0. In your case, you executed Botsing on your crash for 17 seconds, and it reaches to fitness function value 4.5. I suggest you increase the search budget. Also, it would be helpful if you can try this crash by different target frames. You can set the target frame to any frame which points to a class in your project. For instance for the following stack trace, you can try with frame levels 1, 2, 3, and 4.
|
Just tried today, after git pull (version is now 1.0.4-SNAPSHOT, with evosuite 1.0.7 installed). mvn eu.stamp-project:botsing-maven:1.0.4-SNAPSHOT:botsing -Dcrash_log=/tmp/ex1.log -Dtarget_frame=4 -Dorg.slf4j.simpleLogger.log.org.evosuite=off -Dorg.slf4j.simpleLogger.showLogName=true Error follows (looks like a maven dependencty issue ?): |
Hi @gibello |
@luandrea could you check that guava is indeed in the classpath built by |
Hi @gibello , |
Hi @xdevroey, |
Yes, but that does not mean that the class loader of the instrumentation mechanism used in Botsing has access to it. If it is not provided when calling @pderakhshanfar tried to run botsing in command line on the authzforce project and he could replicate the first frame of the stack trace provided by @gibello. Could you check that the guava jar is in the classpath built by |
Sorry @xdevroey , I didn't understand your request. [INFO] evo_logger - - /home/luca/Progetti/stamp/botsing/botsing-examples/target/classes [INFO] evo_logger - - /home/luca/.m2/repository/junit/junit/4.12/junit-4.12.jar [INFO] evo_logger - - /home/luca/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar [INFO] evo_logger - - /home/luca/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar [INFO] eu.stamp.botsing.reproduction.CrashReproduction - Analysing dependencies done!` @gibello: Can you see something like this in your Maven output? Can you add it here? |
Hi, java -jar /home/gibello/.m2/repository/eu/stamp-project/botsing-reproduction/1.0.3/botsing-reproduction-1.0.3.jar -crash_log /tmp/ex1.log -target_frame 4 -project_cp ./dependencies/ I get this (and botsing never exits - at least for one hour, then I stopped it): 09:28:06.718 [main] INFO e.s.b.reproduction.CrashReproduction - Starting the dependency analysis. The number of detected jar files is 119. |
Ok, so the original issue is in the Maven plugin. In the command line, it could at least start the dependency analysis. I have opened another issue with your last comment @gibello. See #61 |
@luandrea can you try to run the Maven plugin on the project and see why there are missing dependencies in the |
I made a new release, please see botsing-1.0.4 |
I just run botsing-maven 1.0.5-SNAPSHOT on pdp-engine module of authzforce-core and succesfully generated a reproduction test. |
I confirm, thanks @luandrea and all :) |
Characteristics
Description
Tried to run botsing maven plugin on a stack trace from ow2 authzforce project ( https://gitlab.ow2.org/authzforce)
mvn eu.stamp-project:botsing-maven:botsing -Dcrash_log=/tmp/ex1.log -Dtarget_frame=2 -e
An exception (String index out of range) is raised in Botsing, looks like a parsing issue:
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring (String.java:1927)
at eu.stamp.botsing.StackTrace.stringToStackTraceElement (StackTrace.java:98)
at eu.stamp.botsing.StackTrace.setup (StackTrace.java:77)
at eu.stamp.botsing.CrashProperties.setupStackTrace (CrashProperties.java:180)
at eu.stamp.botsing.Botsing.setupStackTrace (Botsing.java:117)
at eu.stamp.botsing.Botsing.parseCommandLine (Botsing.java:63)
at eu.stamp.botsing.BotsingMojo.execute (BotsingMojo.java:96)
Steps to reproduce
Exception file used attached
ex1.log
Full stack trace
[ERROR] Failed to execute goal eu.stamp-project:botsing-maven:1.0.3:botsing (default-cli) on project authzforce-ce-core: Error executing Botsing: String index out of range: -1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal eu.stamp-project:botsing-maven:1.0.3:botsing (default-cli) on project authzforce-ce-core: Error executing Botsing
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing Botsing
at eu.stamp.botsing.BotsingMojo.execute (BotsingMojo.java:99)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring (String.java:1927)
at eu.stamp.botsing.StackTrace.stringToStackTraceElement (StackTrace.java:98)
at eu.stamp.botsing.StackTrace.setup (StackTrace.java:77)
at eu.stamp.botsing.CrashProperties.setupStackTrace (CrashProperties.java:180)
at eu.stamp.botsing.Botsing.setupStackTrace (Botsing.java:117)
at eu.stamp.botsing.Botsing.parseCommandLine (Botsing.java:63)
at eu.stamp.botsing.BotsingMojo.execute (BotsingMojo.java:96)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
The text was updated successfully, but these errors were encountered: