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

[BUG] UTBot server dies on specific project with custom build script #490

Closed
tyuldashev opened this issue Oct 12, 2022 · 4 comments · Fixed by #568
Closed

[BUG] UTBot server dies on specific project with custom build script #490

tyuldashev opened this issue Oct 12, 2022 · 4 comments · Fixed by #568
Assignees
Labels
bug Something isn't working verified Bug fix is verified

Comments

@tyuldashev
Copy link
Collaborator

Description

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/libbpf/libbpf project
  2. Unpack and add attached utbot_build.sh to the root of the project utbot_build.zip
  3. Unpack and replace Makefile from src with attached one
    Makefile.zip
  4. Configure UTbot so it successfully configures on the project
  5. Try to generate tests for any 'C' file in src folder

Expected behavior
Tests are generated.

Actual behavior
Generation fails with an error
image

Server process exited without any logs.

Additional information
I've added utbot_build.sh file which enters src folder and starts make.
Also Makefile was modified, so it outputs to build directory

@tyuldashev tyuldashev added the bug Something isn't working label Oct 12, 2022
@tyuldashev tyuldashev moved this to Todo in UTBot C/C++ Oct 12, 2022
@tyuldashev
Copy link
Collaborator Author

Let me know if whole project need to be sent to you directly. Unfortunately GitHub cannot upload it.

@kichunya
Copy link
Collaborator

I checked this bug on redis.
There are some problems with project:

  1. Script utbot_build.sh:
    make distclean
    This command does not build a project.
    Instead of this use
    make MALLOC=libc
  2. In addition, even if i use this command, all project builds in /redis but not in /redis/build, how it should be ( View custom support)

To check whether the server crashes because of this, I propose to fix the configuration of the project so that it is built in the /redis/build/ directory.

@tyuldashev
Copy link
Collaborator Author

After discussion it was decided to add proper handling and logging of the error which causes Segmentation fault, so server doesn't die but reports details of configuration problem.

Proper configuration of the project is out of the scope current issue.

@kichunya kichunya linked a pull request Dec 19, 2022 that will close this issue
Repository owner moved this from Todo to Done in UTBot C/C++ Dec 26, 2022
@tyuldashev
Copy link
Collaborator Author

The server doesn't fault so often anymore even when miss-configuration happens, so we can close this case now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified Bug fix is verified
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants