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

Add memory leak detection during server process execution #357

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Add logging to unified file (gh-324).
- Add memory leak detection during server process execution (gh-349).

## 1.0.1

Expand Down
11 changes: 11 additions & 0 deletions luatest/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,17 @@ function Server:stop()
)
)
end
if self.process.output_beautifier.stderr:find('LeakSanitizer') then
error(
('Memory leak during process execution (alias: %s, workdir: %s, pid: %s)\n%s')
:format(
self.alias,
fio.basename(self.workdir),
self.process.pid,
self.process.output_beautifier.stderr
)
)
end
log.debug('Killed server process PID ' .. self.process.pid)
self.process = nil
end
Expand Down
Loading