msg202357 - (view) |
Author: Michael Haubenwallner (haubi) * |
Date: 2013-11-07 16:04 |
Since python-3.2, there is a race condition building in parallel on AIX:
Consider these Makefile(.pre.in) rules:
$(BUILDPYTHON): ...
$(LINKCC) ... $(LINKFORSHARED) ...
Modules/_testembed: ...
$(LINKCC) ... $(LINKFORSHARED) ...
Modules/_freeze_importlib: ...
$(LINKCC) ...
On AIX, the variables get these values:
LINKCC = $(srcdir)/Modules/makexp_aix Modules/python.exp ...
LINKFORSHARED = -Wl,-bE:Modules/python.exp ...
Now $(BUILDPYTHON) and Modules/_testembed may run in parallel, causing Modules/python.exp to be created by two instances of makexp_aix eventually running at the same time.
Attached patch fixes this problem for cpython tip (doubt supporting AIX 4.1 and earlier still is necessary).
Thank you!
|
msg202379 - (view) |
Author: Martin v. Löwis (loewis) * |
Date: 2013-11-07 18:01 |
Wouldn't it be better if linking _testembed generated _testembed.exp instead of generating python.exp? I hope using $@.exp somehow could help. Hard-coding the name of the export file sounds like a flaw in the first place.
|
msg202407 - (view) |
Author: Michael Haubenwallner (haubi) * |
Date: 2013-11-08 07:14 |
I'm unsure about the real purpose of _testembed, but given the name it does make sense to me to export the same symbols as $(BUILDPYTHON), thus reusing python.exp.
|
msg202435 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2013-11-08 16:45 |
+1
|
msg219742 - (view) |
Author: Michael Haubenwallner (haubi) * |
Date: 2014-06-04 06:35 |
Patch including configure update now.
|
msg281827 - (view) |
Author: Eric N. Vander Weele (ericvw) * |
Date: 2016-11-27 14:26 |
I also have found this goes back since Python 2.7.
I have refreshed the patched for the tip of CPython. What can I do to help push this forward?
|
msg281833 - (view) |
Author: Eric N. Vander Weele (ericvw) * |
Date: 2016-11-27 18:53 |
I may be able to simplify the build on AIX by removing ld_so_aix and python.exp entirely. Would this be a preferred solution if I am able to get something working? If so, should I create a separate issue to track the change?
|
msg375626 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2020-08-18 21:07 |
The original patch is a bit dated, do we still need the export symbol generation?
https://www.ibm.com/support/knowledgecenter/en/SSGH3R_16.1.0/com.ibm.xlcpp161.aix.doc/proguide/compiling_shared_aix.html
"Use the -G option to create a shared library from the generated object files, and to enable runtime linking with applications that support it."
"If you do not specify a -bE option, all the global symbols are exported except for those symbols that have the hidden or internal visibility attribute."
|
msg375627 - (view) |
Author: David Edelsohn (David.Edelsohn) * |
Date: 2020-08-18 21:10 |
Yes, export file generation still is required.
Python does not need to utilize runtime linking. Using -G is a very bad choice and severely discouraged with severe performance and other penalties.
|
msg376059 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2020-08-29 11:51 |
Okay, thanks. The -G option is of course attractive for Linux projects
because it requires minimal changes in the build machinery.
I've added support for libmpdec/libmpdec++ (next release) for AIX-style
shared libraries (shr.o inside libmpdec.a). The AIX linker has a certain
elegance, but it requires something like 150 lines of code changes and
conditionals inside the Makefiles.
I can confirm that -G is substantially slower, so I'm going to commit this
patch soon.
|
msg376063 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2020-08-29 14:03 |
I can't find the reason for:
if test -z "$EXPORTSYMS"; then
EXPORTSYMS="Modules/python.exp"
fi
Modules/python.exp is hardcoded elsewhere, and I'd rather set
EXPORTSYMS unconditionally on AIX and unset it unconditionally
for all other systems (which don't build with the patch if
EXPORTSYMS happens to be defined).
|
msg376067 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2020-08-29 15:00 |
New changeset e6dcd371b2c54a94584dd124e8c592a496d46a47 by Stefan Krah in branch 'master':
bpo-19521: Fix parallel build race condition on AIX (GH-21997)
https://github.com/python/cpython/commit/e6dcd371b2c54a94584dd124e8c592a496d46a47
|
msg376069 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2020-08-29 16:36 |
New changeset 88b86a9752afc2c50ca196f6ba1a8d62d71cf398 by Miss Islington (bot) in branch '3.9':
bpo-19521: Fix parallel build race condition on AIX (GH-22001)
https://github.com/python/cpython/commit/88b86a9752afc2c50ca196f6ba1a8d62d71cf398
|
msg376070 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2020-08-29 16:40 |
This is in master and 3.9.1. I'll not backport to 3.8 because a release candidate is imminent.
|
msg376681 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2020-09-10 12:22 |
I have been asked to backport this to 3.8. There's a very small window
of opportunity:
3.8.6: Monday, 2020-09-21
3.8.7rc1: Monday, 2020-11-02
3.8.7: Monday, 2020-11-16 (final version!)
Backporting procedures since 3.8 are unclear and a source of
constant friction, so most core developers seem to have stopped
doing any backports at all. It is not a battle I'll choose, but
if you get a second core dev to review this trivial patch I'll
commit it.
There's a simple solution for 3.8: Do not use the parallel build,
the regular build takes around 4 min.
For the buildbots you can ask the operator for a custom command
line.
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:53 | admin | set | github: 63720 |
2020-09-10 12:22:11 | skrah | set | status: closed -> open
messages:
+ msg376681 |
2020-08-29 16:40:36 | skrah | set | status: open -> closed versions:
+ Python 3.9 type: behavior messages:
+ msg376070
resolution: fixed stage: patch review -> resolved |
2020-08-29 16:36:47 | skrah | set | messages:
+ msg376069 |
2020-08-29 15:56:05 | miss-islington | set | pull_requests:
+ pull_request21108 |
2020-08-29 15:55:59 | miss-islington | set | nosy:
+ miss-islington pull_requests:
+ pull_request21107
|
2020-08-29 15:00:15 | skrah | set | messages:
+ msg376067 |
2020-08-29 14:03:57 | skrah | set | messages:
+ msg376063 |
2020-08-29 11:51:02 | skrah | set | messages:
+ msg376059 |
2020-08-29 10:48:58 | skrah | set | stage: patch review pull_requests:
+ pull_request21103 |
2020-08-18 21:10:01 | David.Edelsohn | set | messages:
+ msg375627 |
2020-08-18 21:07:26 | skrah | set | messages:
+ msg375626 |
2020-08-15 21:06:03 | skrah | set | versions:
+ Python 3.10, - Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 |
2020-08-15 21:05:36 | skrah | set | nosy:
+ skrah, Michael.Felt, kadler, BTaskaya
|
2020-08-15 21:05:30 | skrah | link | issue40424 superseder |
2017-03-16 13:09:47 | haubi | set | pull_requests:
+ pull_request560 |
2016-11-27 18:53:54 | ericvw | set | messages:
+ msg281833 |
2016-11-27 14:26:10 | ericvw | set | files:
+ aix-parallel-build-race-refresh.patch
messages:
+ msg281827 title: parallel build race condition on AIX since python-3.2 -> Parallel build race condition on AIX since python-2.7 |
2016-11-27 13:56:32 | ericvw | set | nosy:
+ ericvw
versions:
+ Python 2.7, Python 3.6, Python 3.7 |
2014-06-06 11:08:26 | haubi | set | hgrepos:
+ hgrepo251 |
2014-06-04 06:35:59 | haubi | set | files:
+ issue19521-parallel-build-race-on-aix.patch
messages:
+ msg219742 |
2014-06-04 06:33:35 | haubi | set | hgrepos:
- hgrepo248 |
2014-06-04 06:03:14 | haubi | set | hgrepos:
+ hgrepo248 |
2013-11-08 16:45:49 | David.Edelsohn | set | nosy:
+ David.Edelsohn messages:
+ msg202435
|
2013-11-08 07:14:47 | haubi | set | messages:
+ msg202407 |
2013-11-07 18:01:12 | loewis | set | nosy:
+ loewis messages:
+ msg202379
|
2013-11-07 16:04:54 | haubi | create | |