Bug 1705480 - mod_wsgi FTBFS with Python 3.8
Summary: mod_wsgi FTBFS with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mod_wsgi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-02 11:39 UTC by Miro Hrončok
Modified: 2019-06-03 11:15 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-06-03 11:15:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (149.78 KB, text/plain)
2019-05-02 11:39 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2019-05-02 11:39:30 UTC
Created attachment 1561559 [details]
Full log from Copr

mod_wsgi 4.6.4-5.fc31 fails top build with Python 3.8:

/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-strict-aliasing -I/usr/include/python3.8m -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -D_GNU_SOURCE  -c -o src/server/wsgi_interp.lo src/server/wsgi_interp.c && touch src/server/wsgi_interp.slo
src/server/wsgi_interp.c: In function 'ShutdownInterpreter_call':
src/server/wsgi_interp.c:341:32: error: dereferencing pointer to incomplete type 'PyInterpreterState' {aka 'struct _is'}
  341 |         tstate = tstate->interp->tstate_head;
      |                                ^~
apxs:Error: Command failed with rc=65536

Full log attached.

Comment 1 Miro Hrončok 2019-05-15 10:40:32 UTC
Victor, could you please have a look here?

Comment 2 Graham Dumpleton 2019-05-15 10:44:50 UTC
The compilation issues have already been addressed in mod_wsgi GitHub repo. Even so, it crashes at run time deep in Python C library. It is not yet known why.

Comment 3 Graham Dumpleton 2019-05-28 02:23:32 UTC
Python 3.8 issue.

See https://bugs.python.org/issue37072

Comment 4 Graham Dumpleton 2019-05-29 00:35:45 UTC
The believed cause of the problem has now been fixed in Python 3.8 code. Will try and test with Python code from repository when have a chance.

Comment 5 Miro Hrončok 2019-05-29 07:36:58 UTC
Cherry-picking the fix to https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Comment 6 Miro Hrončok 2019-05-29 11:21:22 UTC
The package still fails with the original problem and needs to be updated or patched.

Comment 7 Graham Dumpleton 2019-05-29 11:23:21 UTC
The fix in Python 3.8 is likely only to be the first issue. Until that was fixed I couldn't test further to see what the next issue was. Will attempt to test again tomorrow with patched Python 3.8.

Comment 8 Graham Dumpleton 2019-05-29 11:50:54 UTC
Are you sure you have applied the patch correctly? A very quick tests shows it no longer crashes for me. There are other issues with deprecation warnings in Python code components of mod_wsgi-express, but it does handle requests okay.

Comment 9 Miro Hrončok 2019-05-29 12:05:18 UTC
I'm building the Fedora package. You've said in comment #2:

> The compilation issues have already been addressed in mod_wsgi GitHub repo.

This still needs to be fixed...

> Even so, it crashes at run time deep in Python C library. It is not yet
> known why.

...in order to test the fix for this.

Comment 10 Graham Dumpleton 2019-05-29 12:39:37 UTC
That comment was for the original compilation issues which have been fixed in mod_wsgi GitHub repo (develop branch only at this point).

Later you will see I also mention that Python 3.8 crashes. That subsequent crashing issue has been fixed in Python 3.8 source code, it is not an issue in mod_wsgi. You would need to use patch for Python 3.8 in https://bugs.python.org/issue37072

So you can't do anything until patched Python 3.8 has been released, and patched mod_wsgi released.

I thought it was a bit strange you were talking about back porting since two packages have to change.

Comment 11 Miro Hrončok 2019-05-29 12:48:47 UTC
I've backported the CPython change, as I'm the Fedora maintainer of CPython.

Nobody backported the mod_wsgi fix yet.

Comment 12 Graham Dumpleton 2019-05-29 12:50:00 UTC
What version of mod_wsgi are you using? Are you stuck on some ancient version, or can you use the latest if I release a new version?

Comment 13 Miro Hrončok 2019-05-29 12:53:18 UTC
I'm using what is packaged for Fedora rawhide in https://src.fedoraproject.org/rpms/mod_wsgi/blob/master/f/mod_wsgi.spec - 4.6.4.

---

I believe the commit is https://github.com/GrahamDumpleton/mod_wsgi/commit/b03b02df6318afe26052db5b0365732152cacea2 - correct?

Comment 14 Graham Dumpleton 2019-05-29 12:59:04 UTC
Yes, but not sure if also need:

https://github.com/GrahamDumpleton/mod_wsgi/commit/0f34844009075391c55419a3afb90e469facf35e


Note You need to log in before you can comment on or make changes to this bug.