You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CIFuzz build failures - _freeze_module segfaults during the build, fuzz testing doesn't start. #116886
Looking at CI history, the last PR merged to main that I can find that passed that test was #116761; the first to fail it was #116528. However, the CIFuzz test isn't run on every PR, and PRs aren't necessarily up to date at time of merge, so the trigger for this failure isn't necessarily in that specific merge range - but I'm guessing it will be close.
Another thought - the issue could be with the CI action itself. The CIFuzz job uses the master branch of the actions, so CPython's CI results are going to be dependent on the stability of the upstream repo.
As an experiment, I modified the CIFuzz checkout on an older version of the action, and ran it on a copy of #116454.
When I tried to reproduce in an Ubuntu 22.04 container, I get these errors:
root@ubuntu-dev:/cpython# make -j4 SHELL="bash -x"
(...)
./Programs/_freeze_module getpath ./Modules/getpath.py Python/frozen_modules/getpath.h
==11165==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55d06e6084c0 in read_text /cpython/Programs/_freeze_module.c:109:9
#1 0x55d06e6084c0 in main /cpython/Programs/_freeze_module.c:225:24
#2 0x7f1097f42d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#3 0x7f1097f42e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#4 0x55d06e580f34 in _start (/cpython/Programs/_freeze_module+0x85f34) (BuildId: f91c6a29210dc0cd457ac4d39f134316a9608c08)
Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
#0 0x55d06e606f60 in main /cpython/Programs/_freeze_module.c:206
SUMMARY: MemorySanitizer: use-of-uninitialized-value /cpython/Programs/_freeze_module.c:109:9 in read_text
==11165==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x55d06e6084cd in read_text /cpython/Programs/_freeze_module.c:116:21
#1 0x55d06e6084cd in main /cpython/Programs/_freeze_module.c:225:24
#2 0x7f1097f42d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#3 0x7f1097f42e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#4 0x55d06e580f34 in _start (/cpython/Programs/_freeze_module+0x85f34) (BuildId: f91c6a29210dc0cd457ac4d39f134316a9608c08)
Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
#0 0x55d06e606f60 in main /cpython/Programs/_freeze_module.c:206
SUMMARY: MemorySanitizer: use-of-uninitialized-value /cpython/Programs/_freeze_module.c:116:21 in read_text
MemorySanitizer: 2 warnings reported.
make: *** [Makefile:1640: Python/frozen_modules/getpath.h] Error 1
make: *** Waiting for unfinished jobs....
I can reproduce the issue by running _freeze_module manually:
# ./Programs/_freeze_module zipimport ./Lib/zipimport.py Python/frozen_modules/zipimport.h
==11199==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x5622e273f4c0 in read_text /cpython/Programs/_freeze_module.c:109:9
#1 0x5622e273f4c0 in main /cpython/Programs/_freeze_module.c:225:24
#2 0x7fa50d770d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#3 0x7fa50d770e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#4 0x5622e26b7f34 in _start (/cpython/Programs/_freeze_module+0x85f34) (BuildId: f91c6a29210dc0cd457ac4d39f134316a9608c08)
Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
#0 0x5622e273df60 in main /cpython/Programs/_freeze_module.c:206
SUMMARY: MemorySanitizer: use-of-uninitialized-value /cpython/Programs/_freeze_module.c:109:9 in read_text
==11199==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x5622e273f4cd in read_text /cpython/Programs/_freeze_module.c:116:21
#1 0x5622e273f4cd in main /cpython/Programs/_freeze_module.c:225:24
#2 0x7fa50d770d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#3 0x7fa50d770e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: c289da5071a3399de893d2af81d6a30c62646e1e)
#4 0x5622e26b7f34 in _start (/cpython/Programs/_freeze_module+0x85f34) (BuildId: f91c6a29210dc0cd457ac4d39f134316a9608c08)
Uninitialized value was created by an allocation of 'stat.i' in the stack frame of function 'main'
#0 0x5622e273df60 in main /cpython/Programs/_freeze_module.c:206
SUMMARY: MemorySanitizer: use-of-uninitialized-value /cpython/Programs/_freeze_module.c:116:21 in read_text
MemorySanitizer: 2 warnings reported.
Commands used to build Python in a fresh Ubuntu 22.04 container:
It's annoying that pull request have a red "X" failure sign when "CIFuzz (memory)" is the only failing job, and it's a known failure. Can we disable the job or change GitHub configuration to not mark a whole PR as failed, when a CIFuzz job fails?
Reopen this if anyone sees failures. The revert was merged based on Github reporting the infrastructure/container-definition issue having been fixed to avoid the problem.
Activity
gpshead commentedon Mar 16, 2024
@illia-v
freakboy3742 commentedon Mar 16, 2024
Looking at CI history, the last PR merged to main that I can find that passed that test was #116761; the first to fail it was #116528. However, the CIFuzz test isn't run on every PR, and PRs aren't necessarily up to date at time of merge, so the trigger for this failure isn't necessarily in that specific merge range - but I'm guessing it will be close.
freakboy3742 commentedon Mar 16, 2024
Another thought - the issue could be with the CI action itself. The CIFuzz job uses the
masterbranch of the actions, so CPython's CI results are going to be dependent on the stability of the upstream repo.As an experiment, I modified the CIFuzz checkout on an older version of the action, and ran it on a copy of #116454.
If I revert to the 10e6cbd7 commit to oss-fuzz from a couple of days ago, the CIFuzz test fails because of a clang issue failing to compile the code, which is at least a different failure, and demonstrates that there's at least some sensitivity to the oss-fuzz version.
vstinner commentedon Mar 16, 2024
When I tried to reproduce in an Ubuntu 22.04 container, I get these errors:
I can reproduce the issue by running
_freeze_modulemanually:Commands used to build Python in a fresh Ubuntu 22.04 container:
Then just to reproduce the issue:
vstinner commentedon Mar 16, 2024
Oh wait,
stat.iis an old issue: #91043vstinner commentedon Mar 16, 2024
The
stat.iissue can be worked around by:illia-v commentedon Mar 17, 2024
I ran CIFuzz for a commit from 3 weeks ago in my fork and it failed whereas the job was succeeding this time ago for PRs continuously.
According to https://oss-fuzz-build-logs.storage.googleapis.com/index.html#cpython3, Google haven't recently had any problems building CPython with the memory sanitizer for OSS-Fuzz.
So, I believe the issue is not with CPython but with the environment created by the action.
vstinner commentedon Mar 18, 2024
It's annoying that pull request have a red "X" failure sign when "CIFuzz (memory)" is the only failing job, and it's a known failure. Can we disable the job or change GitHub configuration to not mark a whole PR as failed, when a CIFuzz job fails?
pythongh-116886: Temporarily disable CIfuzz (memory)
gh-116886: Temporarily disable CIfuzz (memory) (#117018)
pythongh-116886: Temporarily disable CIfuzz (memory) (python#117018)
pythongh-116886: Temporarily disable CIfuzz (memory) (python#117018)
Revert "pythongh-116886: Temporarily disable CIfuzz (memory) (python#…
hugovk commentedon Mar 27, 2024
Should be fixed now: #117289, thanks for following up @illia-v.
Revert "gh-116886: Temporarily disable CIfuzz (memory) (GH-117018)" (G…
gpshead commentedon Mar 28, 2024
Reopen this if anyone sees failures. The revert was merged based on Github reporting the infrastructure/container-definition issue having been fixed to avoid the problem.
Squashed commit of the following:
Squashed commit of the following:
pythongh-116886: Temporarily disable CIfuzz (memory) (python#117018)
Revert "pythongh-116886: Temporarily disable CIfuzz (memory) (pythonG…