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

Logs of Concrete Executor should contain Exception with stack trace #1287

Closed
alisevych opened this issue Nov 2, 2022 · 1 comment · Fixed by #1318
Closed

Logs of Concrete Executor should contain Exception with stack trace #1287

alisevych opened this issue Nov 2, 2022 · 1 comment · Fixed by #1318
Assignees
Labels
ctg-bug Issue is a bug ctg-qa Issue is related to QA process status-verified Bug fix is verified

Comments

@alisevych
Copy link
Member

alisevych commented Nov 2, 2022

Description

Logs of Concrete Executor do not contain Exceptions any more.

To Reproduce

  1. Enable logs using ~/.utbot/settings.properties: logConcreteExecutionErrors=true
  2. Run any test generation which leads to concrete execution failure. For example, Concrete execution fails when Fuzzing tries to initialize Date with String #739.
    Or add the following code and generated tests for it:
    /**
     * Should find a branch that returns true and size of array is greater than 1 (non-trivial).
     */
    public static boolean isDiagonal(Collection<Collection<Double>> matrix) {
        int cols = matrix.size();
        if (cols <= 1) {
            return false;
        }
        int i = 0;
        for (Collection<Double> col : matrix) {
            if (col.size() != cols) {
                return false;
            }
            int j = 0;
            for (Double value : col) {
                if (i == j && value == 0.0) return false;
                if (i != j && value != 0.0) return false;
                j++;
            }
            i++;
        }
        return true;
    }
  1. Generated test contains:
///region Errors report for isDiagonal

    public void testIsDiagonal_errors() {
        // Couldn't generate some tests. List of errors:
        // 
        // 4 occurrences of:
        // Concrete execution failed

    }
    ///endregion
  1. Find logs in temp folder: ~\AppData\Local\Temp\UTBot\utbot-childprocess-errors
  2. Open it.

Expected behavior

Log should contain some system information and an exception that is translated into broken test in main process.

Actual behavior

Log contains some child process problem (#848), many lines like this one:

Visual proofs (screenshots, logs, images)

Log is the following:

WARNING: package jdk.internal.jtrfs not in java.base
11:50:04.568 | Info  | RdCoroutineScope          | 1:main @coroutine#1 | RdCoroutineHost overridden 
11:50:04.586 | Info  | ClientProtocolBuilder     | 1:main @coroutine#1 | pid - 14364, port - 50934 
11:50:04.587 | Info  | ClientProtocolBuilder     | 1:main @coroutine#1 | isJvm8 - false, isJvm9Plus - true, isWindows - true 
WARNING: Illegal reflective access by com.esotericsoftware.kryo.kryo5.unsafe.UnsafeUtil (file:/C:/Users/lWX1182794/AppData/Roaming/JetBrains/IntelliJIdea2022.2/plugins/utbot-intellij/lib/utbot-instrumentation-2022.11.495..jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Illegal reflective access by com.esotericsoftware.kryo.kryo5.unsafe.UnsafeUtil (file:/C:/Users/lWX1182794/AppData/Roaming/JetBrains/IntelliJIdea2022.2/plugins/utbot-intellij/lib/utbot-instrumentation-2022.11.495..jar) to method sun.nio.ch.DirectBuffer.cleaner()
11:50:04.685 | Info  | ChildProcess              | 16:Scheduler for Client50934 | setup started 
11:50:04.692 | Info  | ChildProcess              | 16:Scheduler for Client50934 | setup ended 
11:50:04.694 | Info  | ClientProtocolBuilder     | 1:main @coroutine#1 | signalled 
11:50:05.097 | Info  | DynamicClassTransformer   | 16:Scheduler for Client50934 | Transforming: org/utbot/examples/collections/CollectionExample 
11:50:05.162 | Info  | DynamicClassTransformer   | 16:Scheduler for Client50934 | Transforming: org/utbot/examples/collections/CollectionExample$ConcreteList 
11:50:05.163 | Info  | DynamicClassTransformer   | 16:Scheduler for Client50934 | Transforming: org/utbot/examples/collections/CollectionExample$ConcreteMap 
11:51:03.003 | Info  | ChildProcess              | 1:main @coroutine#1 | runBlocking ending 
11:51:03.003 | Info  | ChildProcess              | 1:main          | runBlocking ended 
11:51:03.004 | Info  | Client                    | 16:Scheduler for Client50934 | ClientSocket: start terminating lifetime 
11:51:03.004 | Info  | Client                    | 16:Scheduler for Client50934 | ClientSocket: termination finished 

Environment

Windows 10 Pro
IntelliJ IDEA 2022.2.3
Gradle (UTBotJava) project
JDK 11

Additional context

This was already fixed somehow in #870

@alisevych alisevych added the ctg-bug Issue is a bug label Nov 2, 2022
@korifey korifey moved this to Todo in UTBot Java Nov 2, 2022
@alisevych
Copy link
Member Author

Please note that some exceptions are logged:

Repository owner moved this from Todo to Done in UTBot Java Nov 8, 2022
@alisevych alisevych modified the milestone: 2022.12 Release Nov 8, 2022
@alisevych alisevych added the status-verified Bug fix is verified label Nov 9, 2022
@alisevych alisevych added this to the 2022.12 Release milestone Nov 30, 2022
@alisevych alisevych added the ctg-qa Issue is related to QA process label Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug ctg-qa Issue is related to QA process status-verified Bug fix is verified
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants