I have a koji server running on a box, that I updated to Fedora 14. Accessing the koji homepage now causes a crash in httpd. Here is the backtrace : (gdb) r -DFOREGROUND -DNO_DETACH -X Starting program: /usr/sbin/httpd -DFOREGROUND -DNO_DETACH -X [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x00007fffeb6ad9f5 in setup_context (message= 'The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead.', category=<type at remote 0x7fffeb97a140>, stack_level=<value optimized out>) at /usr/src/debug/Python-2.7/Python/_warnings.c:449 449 PyFrameObject *f = PyThreadState_GET()->frame; (gdb) bt #0 0x00007fffeb6ad9f5 in setup_context (message= 'The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead.', category=<type at remote 0x7fffeb97a140>, stack_level=<value optimized out>) at /usr/src/debug/Python-2.7/Python/_warnings.c:449 #1 do_warn (message= 'The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead.', category=<type at remote 0x7fffeb97a140>, stack_level=<value optimized out>) at /usr/src/debug/Python-2.7/Python/_warnings.c:593 #2 0x00007fffeb6adf5b in PyErr_WarnEx (category= <type at remote 0x7fffeb97a140>, text=<value optimized out>, stack_level=1) at /usr/src/debug/Python-2.7/Python/_warnings.c:719 #3 0x00007fffeb64291e in PyCObject_FromVoidPtr (cobj=0x7ffff881e720, destr=0) at /usr/src/debug/Python-2.7/Objects/cobject.c:25 #4 0x00007fffeb9cd52b in save_interpreter (name=0x7ffff83348f8 "bellet.info", istate=0x7ffff879bf80) at mod_python.c:185 #5 0x00007fffeb9cd6cd in get_interpreter (name=0x7ffff83348f8 "bellet.info") at mod_python.c:261 #6 0x00007fffeb9d1303 in python_handler (req=0x7ffff8795ff8, phase= 0x7fffeb9d24bf "PythonHandler") at mod_python.c:1628 #7 0x00007ffff7fd8788 in ap_run_handler (r=0x7ffff8795ff8) at /usr/src/debug/httpd-2.2.16/server/config.c:158 ---Type <return> to continue, or q <return> to quit--- #8 0x00007ffff7fd8bec in ap_invoke_handler (r=0x7ffff8795ff8) at /usr/src/debug/httpd-2.2.16/server/config.c:376 #9 0x00007ffff7fe6390 in ap_process_request (r=0x7ffff8795ff8) at /usr/src/debug/httpd-2.2.16/modules/http/http_request.c:282 #10 0x00007ffff7fe3458 in ap_process_http_connection (c=0x7ffff8789fd8) at /usr/src/debug/httpd-2.2.16/modules/http/http_core.c:190 #11 0x00007ffff7fdf3d8 in ap_run_process_connection (c=0x7ffff8789fd8) at /usr/src/debug/httpd-2.2.16/server/connection.c:43 #12 0x00007ffff7feadca in child_main (child_num_arg=<value optimized out>) at /usr/src/debug/httpd-2.2.16/server/mpm/prefork/prefork.c:662 #13 0x00007ffff7feb096 in make_child (s=0x7ffff8212860, slot=0) at /usr/src/debug/httpd-2.2.16/server/mpm/prefork/prefork.c:702 #14 0x00007ffff7feb873 in ap_mpm_run (_pconf=<value optimized out>, plog=<value optimized out>, s=<value optimized out>) at /usr/src/debug/httpd-2.2.16/server/mpm/prefork/prefork.c:978 #15 0x00007ffff7fc375e in main (argc=4, argv=0x7fffffffe628) at /usr/src/debug/httpd-2.2.16/server/main.c:740
mod_python uses the PyCObject API, but this was deprecated in 2.7 (and, in fact will be removed in 3.2, though AIUI, mod_python won't be ported to python 3) From a prepped source tree of mod_python-3.3.1-13: find -exec grep -nH -e "PyCObject" "{}" \; ./src/serverobject.c:228: return PyCObject_FromVoidPtr(self->server, 0); ./src/requestobject.c:1614: return PyCObject_FromVoidPtr(self->request_rec, 0); ./src/connobject.c.buckets:429: return PyCObject_FromVoidPtr(self->conn, 0); ./src/connobject.c:429: return PyCObject_FromVoidPtr(self->conn, 0); ./src/mod_python.c:185: p = PyCObject_FromVoidPtr((void *) idata, NULL); ./src/mod_python.c:264: idata = (interpreterdata *)PyCObject_AsVoidPtr(p); In particular, the final two "grep" hits are in "save_interpreter", and "get_interpreter"; they appear to assume that the call into PyCObject will succeed. If warnings-as-errors is enabled, this will lead to a crash inside Python, perhaps the one seen above.
Upstream notes: http://docs.python.org/dev/whatsnew/2.7.html#capsules
Created attachment 454534 [details] Fix crash by removing use of deprecated functions This patch replaces use of the PyCObject API with PyCapsule API so that it longer uses deprecated functions or crashes.
The patch works for me. Thanks!
This patch also works for me. In my case I had done a fresh beta install, a yum update, and then installed Cobbler. The web interface was causing Seg faults in the Apache error_log. Applying this patch to mod_python and rebuilding allows me to access the site. Previously when I had this problem (a few weeks ago, also on the F14 beta), I had definitely tracked it down to mod_python, but didn't have time to track it further than that.
*** Bug 647457 has been marked as a duplicate of this bug. ***
I think I'm seeing the same with viewvc on F-14.
Anyone has a koji URL to a build where this was fixed?
ping -- does this need to be reassigned to mod_python and the patch applied there?
Reassigning to mod_python. Please apply the patch and rebuild.
Changing priority and severity, because other software is affected by this failure.
Any chance we get %{?dist} added to release at the same time, so that it's easier to tell what the package is for?
jorton: I'll go ahead and push an update to F14 for with the attached patch. I'll leave it in the testing repository for the full two weeks so holler if you think this is the wrong thing to do and I won't push it to stable.
mod_python-3.3.1-14.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mod_python-3.3.1-14.fc14
mod_python-3.3.1-14.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mod_python'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mod_python-3.3.1-14.fc14
mod_python-3.3.1-14.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
With mod_python-3.3.1-12.fc14, trac also segfaulted on Fedora 14. The update mod_python-3.3.1-14.fc14 solved the issue. Thanks!