Bug 674369
| Summary: | lambda in ctypes causes MemoryError exception in PIL | ||
|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | jspam |
| Component: | python26 | Assignee: | Adrien Devresse <adev88> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | el5 | CC: | dmalcolm, jpazdziora, ravindra.tripathi, utsav_popli |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-06 10:03:24 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
jspam
2011-02-01 16:05:50 UTC
MemoryError indicates an out-of-memory condition. Is the system low on memory? Which architecture is this on? x86_64? Are you installing PIL via an rpm package? If so, what name-version-release? Yes, it is x86_64. I rebuilt the RHEL5 python-imaging using python26. The version is 1.1.5. I should add that just importing PIL is not enough to reproduce. My suggestion is just to delete the line in ctypes: CFUNCTYPE(c_int)(lambda: None) seeing as it's to pass the windows unit tests or so says the comment it should be a minimal change. Thanks I have also faced the similar issue after updating the python2.6 using yum. PIL version: 1.1.7 Kernel version: 2.6.18-238.19.1.el5 64 bit OS SELinux is disabled on our system. mod_python, mod_wsgi, python26 and apache are all installed from yum repositories We have a django application and deployed on apache using mod_python.( got the same issue with mod_wsgi also) I also tried app with python2.7 compiled version, and got the same exception. commenting out the line CFUNCTYPE(c_int)(lambda: None) in both the cases(python repository version and compiled version) fixed the issue for us. I have few queries Is it safe to comment this line out, will there be any impact? Since it was working earlier is there anything in the update that broke this? I am pretty sure we resolved this by making sure $HOME pointed to a writeable location. We mount /tmp noexec and libffi wants to mmap and then exec something in a tmpdir. libffi prefers $HOME if it's writeable. You might have a similar problem Fedora EPEL 5 changed to end-of-life (EOL) status on 2017-03-31. Fedora EPEL 5 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora or Fedora EPEL, please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. Hi,
This particular exception was thrown when I was running mod_wsgi with apache with selinux enabled.
System:
Centos 6.10
2.6.32-754.6.3.el6.x86_64
Scenario:
I was trying to python script from apache (using mod_wsgi). I ran into this issue:
CFUNCTYPE(c_int)(lambda: None)
First observation was apache was unable to write to a file "Permission denied error"
So I create a file manually and setup the file permissions chmod +x and chown -R apache:apache to the file
Still issue persisted.
I disabled SeLinux and rebooted machine. Everything worked fine afterwards !!!!
This is what I did to fix this:
Step 1:
semodule -i myhttp.pp
Step2:
semanage fcontext -a -t httpd_sys_script_exec_t "<file directory path that will be created by python script>(/.*)?"
semanage fcontext -a -t httpd_sys_script_exec_t "path to python script?"
restorecon -Rv <file directory path that will be created by python>
restorecon -Rv <path to python script>
|