Skip to content

Too many permissions file rereads - can slow down much #796

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

Open
alisevych opened this issue Aug 26, 2022 · 0 comments
Open

Too many permissions file rereads - can slow down much #796

alisevych opened this issue Aug 26, 2022 · 0 comments
Assignees
Labels
comp-sandboxing Issue is related to sandboxing unpermitted operations by Java Security Manager ctg-enhancement New feature, improvement or change request spec-performance Performance-related issue

Comments

@alisevych
Copy link
Member

Description

Currently if there is some unrecognized permission - we have 55K errors in concrete execution logs.
It shows indirectly that there are many permission read attempts. And this is only for one method test generation.
Permissions file is not expected to be changed during UTBot execution.
So it can be read only before test generation - to save time.

To Reproduce

Steps to reproduce the behavior:

  1. Open IntelliJ IDEA with installed UTBot plugin (with Security Manager turned on)
  2. Open/create a project with JDK 8/11
  3. Add the following class:
public class SecurityCheck {
    public String property(String key) {
        return System.getProperty(key);
    }
}
  1. Create or put the following text into user.home}/.utbot/sandbox.policy // here "test" is invalid
grant {
    permission java.util.PropertyPermission "*", "test";
};
  1. Generate tests for the SecurityCheck class
  2. Check Concrete executor logs

Expected behavior

Permissions file can be read once before test generation - to save time.

Actual behavior

There are about 55K errors "invalid permission: test" in concrete executor log.
This shows that UTBot is trying to read and recognize this permission many times during test execution.

Visual proofs (screenshots, logs, images)

Many errors with the following text:

java.security.policy: error adding Permission, java.util.PropertyPermission:
	java.lang.IllegalArgumentException: invalid permission: test

Environment

Windows 10 Pro
IntelliJ IDEA 2022.1 - 2022.1.4
JDK 8 / 11

@alisevych alisevych added the ctg-enhancement New feature, improvement or change request label Aug 26, 2022
@korifey korifey moved this to Todo in UTBot Java Aug 26, 2022
@alisevych alisevych changed the title Too many permissions file reads Too many permissions file reads - can slow down much Oct 10, 2022
@alisevych alisevych added the ctg-bug Issue is a bug label Oct 10, 2022
@alisevych alisevych changed the title Too many permissions file reads - can slow down much Too many permissions file rereads - can slow down much Nov 16, 2022
@alisevych alisevych added spec-performance Performance-related issue comp-sandboxing Issue is related to sandboxing unpermitted operations by Java Security Manager and removed ctg-bug Issue is a bug labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-sandboxing Issue is related to sandboxing unpermitted operations by Java Security Manager ctg-enhancement New feature, improvement or change request spec-performance Performance-related issue
Projects
Status: Todo
Development

No branches or pull requests

2 participants