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

python2Packages.jinja2: disable tests on 32bit systems #80888

Merged
merged 1 commit into from Feb 25, 2020

Conversation

rnhmjoj
Copy link
Contributor

@rnhmjoj rnhmjoj commented Feb 23, 2020

Motivation for this change

ZHF: #80379

Things done
  • Tested using sandboxing (nix.useSandbox)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested on aarch64, i686, x86_64
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 23, 2020

@GrahamcOfBorg build pkgsi686Linux.python2Packages.jinja2 pkgsi686Linux.pythonPackages.jinja2 python2Packages.jinja2 python3Packages.jinja2

@jonringer
Copy link
Contributor

do we know if these are legitimate failures or not? the build system could be hardcoded to do a 64bit build

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 23, 2020

I have no idea: I couldn't figure out why it's crashing.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 24, 2020

The tests are passing in 19.09. I bisected and 183c6b9 came up.
I still have no idea how a test could crash python.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 24, 2020

I managed to run the tests in gdb and got a backtrace:

Program received signal SIGSEGV, Segmentation fault.
0xf7ebe6bb in visit_decref ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
(gdb) #0  0xf7ebe6bb in visit_decref ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
#1  0xf7eb197d in tb_traverse ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
#2  0xf7ebeab0 in collect ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
#3  0xf7ebf93e in _PyObject_GC_Malloc ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
#4  0xf7ebf99c in _PyObject_GC_New ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
#5  0xf7e2f31b in tuple_iter ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
#6  0xf7dd027a in PyObject_GetIter ()
   from /nix/store/4kn3zpmb1j091lp95n63wwhsnjcbrw5g-python-2.7.17/lib/libpython2.7.so.1.0
...

The test is really crashing the python 2.7 interpreter, specifically the garbage collector.
A crash should never happen in theory, unless you are doing something deliberately or running some C library. This is either a bug in python 2.7 or in some C code that's tricking the interpreter into freeing protected memory. This seems to be the only library around: _speedups.c.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 24, 2020

I showed upstream the trace and it appears the test suite is running out of stack space.
Disabling the tests on 32bit system should be the right thing to do.

@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 24, 2020

@GrahamcOfBorg build pkgsi686Linux.python2Packages.jinja2 pkgsi686Linux.pythonPackages.jinja2 python2Packages.jinja2 python3Packages.jinja2

@rnhmjoj rnhmjoj merged commit 1805cfa into NixOS:master Feb 25, 2020
@rnhmjoj
Copy link
Contributor Author

rnhmjoj commented Feb 25, 2020

Backported in 88c1b21

@rnhmjoj rnhmjoj deleted the jinja2 branch April 7, 2020 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants