Problem with popen: OSError: [Errno 12] Cannot allocate memory when running django-jenkins #151

Closed
apelliciari opened this Issue Mar 7, 2013 · 5 comments

Comments

Projects
None yet
4 participants

Hi,

since a few days, when i run django-jenkins i get the error

OSError: [Errno 12] Cannot allocate memory

even if my tests pass.

the complete error (from jenkins) is here https://gist.github.com/apelliciari/5106439

In my test i have some LiveServerTestCase with Selenium.

Searching for the error, i've found these
http://stackoverflow.com/questions/1367373/python-subprocess-popen-oserror-errno-12-cannot-allocate-memory
http://bramp.net/blog/2010/05/python-close_fds-issue/

Hope they are useful, unfortunately my knowledge of python/unix is not so deep, and i can't grok how to fix it.

Is there a way to run test avoiding the forks? I don't care if they take more time.

Owner

kmmbvnr commented Mar 8, 2013

not a django-jenkins issue

kmmbvnr closed this Mar 8, 2013

why not? it's caused by django-jenkins, in some way!

Contributor

suvit commented Apr 22, 2013

I confirm. After tests are passing, django-jenkins (itself or its submodules) eated memory very much.
I run it with

JENKINS_TASKS = (
    'django_jenkins.tasks.run_pylint',
    'django_jenkins.tasks.run_pep8',
    'django_jenkins.tasks.run_pyflakes',
    'django_jenkins.tasks.with_coverage',
    'django_jenkins.tasks.django_tests',
)

Job console output

[skip]
[workspace] $ /bin/sh -xe /tmp/hudson6228443308562633942.sh
+ fab -f deploy/fabfile.py jenkins_test_project
...................................................................................................
----------------------------------------------------------------------
Ran 99 tests in 66.175s

OK
Killed
Fatal error: local() encountered an error (return code 137) while executing 'env/bin/python manage.py jenkins --settings=pwutils.settings.jenkins'

Aborting.
[localhost] local: env/bin/python manage.py jenkins --settings=pwutils.settings.jenkins
Build step 'Use builders from another project' marked build as failure
Recording test results
Skipping Cobertura coverage report as build was not UNSTABLE or better ...
Sending e-mails to: devel@suvit.ru
Finished: FAILURE

I try to render more debug output to console to watch what component gave memory

Contributor

charettes commented Sep 22, 2013

Also affected by this. Someone found a way to allow forkings?

Owner

kmmbvnr commented Sep 22, 2013

You could try to enable/disable JENKINS_TASK one by one to see what cause an error.

If it is b/c of test runner you can try latest version from git, which does not keep links to TestCases and allow to garbage collect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment