8000 Strange error under Apache and mod_wsgi · Issue #8559 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Strange error under Apache and mod_wsgi #8559

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

Closed
blagasz opened this issue Feb 3, 2017 · 9 comments
Closed

Strange error under Apache and mod_wsgi #8559

blagasz opened this issue Feb 3, 2017 · 9 comments

Comments

@blagasz
Copy link
blagasz commented Feb 3, 2017

I am building a web app with Flask when I encountered the strangest error.

pandas-0.19.2 calls in pandas.core.indexing

# 32-bit floating point machine epsilon
_eps = np.finfo('f4').eps

The call never finish in numpy-1.12.0 when called from the Apache server environment with mod_wsgi (compiled for Python/3.5.1+ and runtime using Python/3.5.2). The code loads properly when run from a normal Python/3.5.2 interpreter.

The very same code executes properly with pandas-0.18.1 and numpy-1.11.1 in the same Apache setup.

@charris
Copy link
Member
charris commented Feb 3, 2017

I don't see any changes in numpy/core/{machar.py, getlimits.py} that should make a difference, the only thing added is a number of bits attribute (itemsize * 8). How did you install numpy? Are you sure that that line is where the hang occurs?

@charris charris added this to the 1.12.1 release milestone Feb 3, 2017
@blagasz
Copy link
Author
blagasz commented Feb 3, 2017

I installed numpy with pip3 on Ubuntu. I couldn't get any traceback, so I traced the error with the primitive print messages method. I could trace it to the machar.py line

for _ in range(max_iterN):
and the print statement after the for cycle never gets called.

The strange thing is that it only occurs when run through Apache and mod_wsgi. I also have no idea how's that possible. It would be nice if you could reproduce the error to see if it is really there. It might not even be numpy related just it hangs in numpy code for some strange reason...

By the way, I could reproduce the error without pandas so it is irrelevant in that sense, just the original call was from that package.

@matthew-brett
Copy link
Contributor

I wonder whether this is a problem with the manylinux wheel not finding Python symbols? Have a look at this thread.

Does it work correctly when you compile numpy yourself (pip3 install --no-binary numpy numpy) or use the system numpy (apt-get install python-numpy)?

@charris
Copy link
Member
charris commented Feb 3, 2017

Doesn't seem like the code itself is at fault as the number of repeats is limited.

@njsmith
Copy link
Member
njsmith commented Feb 3, 2017 via email

@pv
Copy link
Member
pv commented Feb 3, 2017 via email

@njsmith
Copy link
Member
njsmith commented Feb 3, 2017 via email

@charris
Copy link
Member
charris commented Feb 3, 2017

Closing this as a duplicate of #5856. I expect this particular problem is fixed by #8505, but the subinterpreter problem in general still remains.

@charris charris closed this as completed Feb 3, 2017
@blagasz
Copy link
Author
blagasz commented Feb 6, 2017

Thank you guys for the quick and satisfying explanation.

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

No branches or pull requests

5 participants
0