[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-18 Thread STINNER Victor
STINNER Victor added the comment: Do you think that it would be worth it to dump the memory allocation when a Fatal Python error related to a memory error is triggered? -- ___ Python tracker ___

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-17 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Sam! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-17 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 87787c8774221c81602b31b0e0dc0678ad494e91 by Sam Gross in branch '3.9': [3.9] bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564) (GH-29600) https://github.com/python/cpython/commit/87787c8774221c81602b31b0e0dc0678ad49

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-17 Thread miss-islington
miss-islington added the comment: New changeset 1079b3e3cb3eba7062e174ecc6c0ab20c2d0722e by Miss Islington (bot) in branch '3.10': bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564) https://github.com/python/cpython/commit/1079b3e3cb3eba7062e174ecc6c0ab20c2d072

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-17 Thread Sam Gross
Change by Sam Gross : -- pull_requests: +27843 pull_request: https://github.com/python/cpython/pull/29600 ___ Python tracker ___ ___

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 736684b1bb67369a2e95a9f621752deead44e7ef by Sam Gross in branch 'main': bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564) https://github.com/python/cpython/commit/736684b1bb67369a2e95a9f621752deead44e7ef --

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-17 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27842 pull_request: https://github.com/python/cpython/pull/29599 ___ Python tracker _

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-15 Thread Sam Gross
Change by Sam Gross : -- keywords: +patch nosy: +colesbury nosy_count: 2.0 -> 3.0 pull_requests: +27812 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29564 ___ Python tracker __

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2020-12-06 Thread Steve Stagg
Steve Stagg added the comment: So, I'm not an allocator/init/teardown expert, but it looks like: When you fork, PyRuntimeState creates a new mutex, explicitly using the default allocator (without the debug allocator active).. #ifdef HAVE_FORK /* This function is called from PyOS_AfterFork_C

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2020-12-06 Thread Steve Stagg
Steve Stagg added the comment: Something seems to be: breaking alignment, changing the allocator used, or trashing that memory. In my case, the address of the mutex is: 0x5603a330 (*1) below and the surrounding memory: 0x5603a310: n\0\0\03\0\0\0\0\0\0\0(*2)\xdd\xdd\xdd\xdd\xdd\xdd\

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2020-12-06 Thread Steve Stagg
Steve Stagg added the comment: Reproducible on master, but doesn't occur with a debug build. My configure: > ./configure --prefix=$PREFIX --exec-prefix=$EPREFIX > --cache-file=../config.cache --without-ensurepip > /dev/null > PYTHONMALLOC=pymalloc_debug $EPREFIX/bin/python3 ../test.py Crash

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2020-12-02 Thread CendioOssman
New submission from CendioOssman : A python equivalent of the classical daemon() call started throwing an error from 3.8 when the debug hooks are active for pymalloc. If the tracing is also active it segfaults. This simple example triggers it: import os def daemon(): pid = os.fork()