Skip to content

Conversation

@radarhere
Copy link
Contributor

Over at https://github.com/python-pillow/Pillow, we use CIFuzz.

At 2022-01-19T23:18:02Z, our CI job passed - https://github.com/python-pillow/Pillow/runs/4875290907
At 2022-01-20T10:29:08Z, our CI job failed - https://github.com/python-pillow/Pillow/runs/4880666670

2022-01-20T10:42:29.4244546Z   File "post-processing/fuzz_utils.py", line 17, in <module>
2022-01-20T10:42:29.4244876Z ModuleNotFoundError: No module named 'cxxfilt'

Taking a look at

pip3 install --upgrade setuptools
pip3 install cxxfilt pyyaml beautifulsoup4 lxml soupsieve matplotlib
mkdir -p $SRC/inspector
find $SRC/ -name "*.data" -exec cp {} $SRC/inspector/ \;
find $SRC/ -name "*.data.yaml" -exec cp {} $SRC/inspector/ \;
# Move coverage report.
find /workspace/ -name "*.covreport" -exec cp {} $SRC/inspector/ \;
cd $SRC/inspector
python3 $SRC/fuzz-introspector/post-processing/main.py --target_dir=$SRC/inspector --git_repo_url=$GIT_REPO --coverage_url=$COVERAGE_URL

I'm wondering if the required modules are being installed in a different copy of Python than what is later used. Since the base-builder-python installs Python, this doesn't seem impossible.

So this PR suggests installing the Python modules through python3 -m pip rather than pip3. I don't guarantee that it will fix the problem I mentioned, but you might agree that it is a good practice regardless.

@radarhere
Copy link
Contributor Author

Someone else's thoughts on why python3 -m pip is better than pip3 - https://stackoverflow.com/questions/41307101/difference-between-pip3-and-python3-m-pip/67084664#67084664

@jonathanmetzman
Copy link
Contributor

Sorry I thought I fixed this issue with #7199

I can consider your patch, but there is another underlying problem that I will try to fix first.

@jonathanmetzman
Copy link
Contributor

By the way, is it intentional that CIFuzz only runs on your C/C++ PRs?
https://github.com/python-pillow/Pillow/blob/main/.github/workflows/cifuzz.yml#L6

@jonathanmetzman jonathanmetzman self-requested a review February 1, 2022 15:07
@jonathanmetzman
Copy link
Contributor

Sorry I thought I fixed this issue with #7199

I think I did fix this in #7199 Can you trigger CIFuzz again please?

@radarhere
Copy link
Contributor Author

Thanks, yes, it passes now. And yes, we're deliberately only running CIFuzz for C changes.

If you would like to merge this in just for the sake of python3 -m pip vs pip3, you can, but I'm also happy for this to be closed.

@jonathanmetzman
Copy link
Contributor

/gcbrun trial_build.py python c c++ --engine libfuzzer --sanitizer coverage address

@maflcko
Copy link
Contributor

maflcko commented Apr 2, 2024

Needs the merge conflicts solved, if still relevant.

@radarhere radarhere closed this Apr 2, 2024
@radarhere radarhere deleted the pip branch April 2, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants