Bug#943608: tests segfault when run with Python 3.8
On 25/12/2019 11:41, Pierre-Elliott Bécue wrote: > Le mardi 10 décembre 2019 à 12:27:35-0700, Daniele Nicolodi a écrit : >> Hello, >> >> On Tue, 26 Nov 2019 13:06:24 +0100 "Dr. Tobias Quathamer" >> wrote:> I've forwarded this bug upstream, and further >> investigation by them >>> seems to indicate that this is actually a bug in CPython. >>> >>> I'm therefore cloning and reassigning this bug, feel free to >>> revert this if you don't agree. >> >> A while ago I opened a merge request with upstream with a workaround >> that fixes the segfault with CPython 3.8. As it seems that CPython 3.8.1 >> will be released with the bug not fixed, it may be worth to apply the >> patch to the Debian package. >> >> https://bitbucket.org/blais/beancount/pull-requests/139 >> >> All the patch does is to make the C code Python 3.9 ready, avoiding >> raising a warning, which ultimately results in the segfault. The patch >> seems very low risk to me. > > Dear Daniele, > > Thanks for the patch. > > I adapted it a little to reduce it's volume: > > https://salsa.debian.org/python-team/applications/beancount/blob/debian/master/debian/patches/0003-parser-Work-around-python3.8-bug-causing-a-segmentat.patch > > The #define PY_SSIZE_T_CLEAN was in both parser.h and parser.c, and the > removal of the two other includes seems out of scope for this bugfix > IMO. > > Is it fine with you? Because the PY_SSIZE_T_CLEAN define modifies the API exposed by Python.h, I think it is better to explicitly define it everywhere Python.h is included. However, if the reduced version solves the problem you are seeing, I don't see a reason to insist. Please note that removing the other two includes is technically also a bug-fix as those are technically two Python internal header files. I removed the includes because I am not sure how including those files directly interacts with the changes to the public API enabled by PY_SSIZE_T_CLEAN. Again, if you don't see any problem, I don't see a reason to insist. The patch I proposed has been merged upstream, along with another that solves another problem in the test suite with Python 3.8 (although I didn't encounter this second bug in my testing). You may want to base your package on a more recent (but unreleased) version. Since the 2.2.3 release I see mainly bug-fixes and improvements to the emacs beancount-mode (which I don't know if you package along with the application). Cheers, Dan
Bug#943608: tests segfault when run with Python 3.8
Le mardi 10 décembre 2019 à 12:27:35-0700, Daniele Nicolodi a écrit : > Hello, > > On Tue, 26 Nov 2019 13:06:24 +0100 "Dr. Tobias Quathamer" > wrote:> I've forwarded this bug upstream, and further > investigation by them > > seems to indicate that this is actually a bug in CPython. > > > > I'm therefore cloning and reassigning this bug, feel free to > > revert this if you don't agree. > > A while ago I opened a merge request with upstream with a workaround > that fixes the segfault with CPython 3.8. As it seems that CPython 3.8.1 > will be released with the bug not fixed, it may be worth to apply the > patch to the Debian package. > > https://bitbucket.org/blais/beancount/pull-requests/139 > > All the patch does is to make the C code Python 3.9 ready, avoiding > raising a warning, which ultimately results in the segfault. The patch > seems very low risk to me. Dear Daniele, Thanks for the patch. I adapted it a little to reduce it's volume: https://salsa.debian.org/python-team/applications/beancount/blob/debian/master/debian/patches/0003-parser-Work-around-python3.8-bug-causing-a-segmentat.patch The #define PY_SSIZE_T_CLEAN was in both parser.h and parser.c, and the removal of the two other includes seems out of scope for this bugfix IMO. Is it fine with you? Cheers! -- Pierre-Elliott Bécue GPG: 9AE0 4D98 6400 E3B6 7528 F493 0D44 2664 1949 74E2 It's far easier to fight for one's principles than to live up to them. signature.asc Description: PGP signature
Bug#943608: tests segfault when run with Python 3.8
Hello, On Tue, 26 Nov 2019 13:06:24 +0100 "Dr. Tobias Quathamer" wrote:> I've forwarded this bug upstream, and further investigation by them > seems to indicate that this is actually a bug in CPython. > > I'm therefore cloning and reassigning this bug, feel free to > revert this if you don't agree. A while ago I opened a merge request with upstream with a workaround that fixes the segfault with CPython 3.8. As it seems that CPython 3.8.1 will be released with the bug not fixed, it may be worth to apply the patch to the Debian package. https://bitbucket.org/blais/beancount/pull-requests/139 All the patch does is to make the C code Python 3.9 ready, avoiding raising a warning, which ultimately results in the segfault. The patch seems very low risk to me. Cheers, Dan
Bug#945522: Bug#943608: tests segfault when run with Python 3.8
[Changed the BTS bug address to the python3.8 bug] Am 26.11.19 um 13:35 schrieb Matthias Klose: > thanks. was this checked with python3.8 3.8.0-4 or -5? Hi, hm, I don't know about upstream. However, I've just tried to build beancount in sid with python3.8 3.8.0-5 and can still confirm this bug. Regards, Tobias signature.asc Description: OpenPGP digital signature
Bug#943608: tests segfault when run with Python 3.8
On 26.11.19 13:06, Dr. Tobias Quathamer wrote: > control: clone 943608 -1 > control: reassign -1 src:python3.8 > control: retitle -1 python3.8: Py_BuildValue("(s#O)", ...) segfaults if > entered with exception raised > control: forwarded -1 https://bugs.python.org/issue38913 > control: affects -1 src:beancount > control: block 943608 by -1 > > Am 27.10.19 um 11:21 schrieb Matthias Klose: >> Package: src:beancount >> Version: 2.2.3-1 >> Severity: important >> Tags: sid bullseye >> User: debian-pyt...@lists.debian.org >> Usertags: python3.8 >> >> At least some of the tests segfault, when run with Python 3.8. Not >> architecture specific. Example logs at >> https://launchpadlibrarian.net/448643351/buildlog_ubuntu-focal-amd64.beancount_2.2.3-1_BUILDING.txt.gz > > Hi, > > I've forwarded this bug upstream, and further investigation by them > seems to indicate that this is actually a bug in CPython. > > I'm therefore cloning and reassigning this bug, feel free to > revert this if you don't agree. thanks. was this checked with python3.8 3.8.0-4 or -5?
Bug#943608: tests segfault when run with Python 3.8
control: clone 943608 -1 control: reassign -1 src:python3.8 control: retitle -1 python3.8: Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised control: forwarded -1 https://bugs.python.org/issue38913 control: affects -1 src:beancount control: block 943608 by -1 Am 27.10.19 um 11:21 schrieb Matthias Klose: > Package: src:beancount > Version: 2.2.3-1 > Severity: important > Tags: sid bullseye > User: debian-pyt...@lists.debian.org > Usertags: python3.8 > > At least some of the tests segfault, when run with Python 3.8. Not > architecture specific. Example logs at > https://launchpadlibrarian.net/448643351/buildlog_ubuntu-focal-amd64.beancount_2.2.3-1_BUILDING.txt.gz Hi, I've forwarded this bug upstream, and further investigation by them seems to indicate that this is actually a bug in CPython. I'm therefore cloning and reassigning this bug, feel free to revert this if you don't agree. Regards, Tobias
Bug#943608: tests segfault when run with Python 3.8
confirmed in unstable as well: https://buildd.debian.org/status/fetch.php?pkg=beancount&arch=amd64&ver=2.2.3-1%2Bb1&stamp=1574207855&raw=0
Bug#943608: tests segfault when run with Python 3.8
Package: src:beancount Version: 2.2.3-1 Severity: important Tags: sid bullseye User: debian-pyt...@lists.debian.org Usertags: python3.8 At least some of the tests segfault, when run with Python 3.8. Not architecture specific. Example logs at https://launchpadlibrarian.net/448643351/buildlog_ubuntu-focal-amd64.beancount_2.2.3-1_BUILDING.txt.gz