-
Notifications
You must be signed in to change notification settings - Fork 611
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
Memory leak when using junit format. #1103
Comments
This is really weird, because there should be no relations at all between the Symfony annotation cache and the Behat JUnit formatter. Can you share the actual backfire profiles rather than some screenshots, to let us explore them more ? |
Sorry for the delay, here are the profiles: And comparsion: https://blackfire.io/profiles/compare/d543aa8b-c7c6-4496-b5e1-c35722d3cb71/graph Here is the bash script we are using to set-up environment for behat tests to make sure they are repeatable: #!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PHP_DEBUG_RUNTIME="php-debug"
PHP_RUNTIME="php"
BLACKFIRE_RUNTIME="blackfire run php"
if [[ $1 == '--with-debugger' || $1 == '--debugger' ]]
then
phpRuntime="$PHP_DEBUG_RUNTIME"
behatArgs=( "${@:2}" )
elif [[ $1 == '--with-blackfire' || $1 == '--blackfire' ]]
then
phpRuntime="$BLACKFIRE_RUNTIME"
behatArgs=( "${@:2}" )
else
phpRuntime="$PHP_RUNTIME"
behatArgs=( "$@" )
fi
rm -rf $DIR/../var/cache/test/*
$DIR/console cache:warm --env=test --no-debug
$DIR/console doctrine:database:drop --env=test --force
$DIR/console doctrine:schema:create --env=test
$phpRuntime -d memory_limit=256M $DIR/behat "${behatArgs[@]}"
RESULT=$?
$DIR/console doctrine:database:drop --env=test --force
rm -rf $DIR/../var/cache/test/*
exit $RESULT |
@stof Have you looked at those profiles? They will disappear in a week, AFAIK. |
We are experimenting similar issues when adding the JUnit output to our behat execution. Our limits are set to 128 MB and everything runs fine when using only progress or default outputs. |
anyone have any luck here? having similar issues |
We are having the same issue. |
Our tests complete with memory utilization ~110MB when using "pretty" or "progress" formats, but when using "junit" format, they fail after trying to exceed 256MB php memory limit. When run without memory limits with "junit" formater, our test suite completes, but only after taking ~290MB of memory.
Issue seems to be caused by Symfony annotation cache not being garbage collected when junit format is used.
Versions used:
The text was updated successfully, but these errors were encountered: