Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] skywalking-pyhton can't pass the e2e test with psutil==5.9.6 #11481

Open
2 of 3 tasks
jaychoww opened this issue Nov 1, 2023 · 4 comments
Open
2 of 3 tasks

[Bug] skywalking-pyhton can't pass the e2e test with psutil==5.9.6 #11481

jaychoww opened this issue Nov 1, 2023 · 4 comments
Assignees
Labels
bug Something isn't working and you are sure it's a bug! python Python agent related

Comments

@jaychoww
Copy link

jaychoww commented Nov 1, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

Python Agent (apache/skywalking-python)

What happened

The e2e tests broke after the psutil 5.9.6 was released, according to the release note:
psutil 5.9.6
Maybe it changed the implementation of the psutil.cpu_percent(), I'm not sure.
When I fixed the psutil==5.9.5, the e2e test passed.

What you expected to happen

The python-agent should work correctly with psutil 5.9.6

How to reproduce

This issue can be reproduced on both ubuntu 20.04 x64 and macOS M1:

export SW_CTL_COMMIT=0883266bfaa36612927b69e35781b64ea181758d SW_OAP_COMMIT=574b83f095861d4199fdb78aa52923765cf921a1
 export BASE_PYTHON_IMAGE=3.8-slim
docker build --build-arg BASE_PYTHON_IMAGE -t apache/skywalking-python-agent:latest-e2e --no-cache . -f tests/e2e/base/Dockerfile.e2e
e2e run -c tests/e2e/case/grpc/single/e2e.yaml     

The packages on consumer and provider:

pip list
Package            Version
------------------ ---------
aiohttp            3.8.6
aiokafka           0.8.1
aiosignal          1.3.1
annotated-types    0.6.0
anyio              3.7.1
apache-skywalking  1.0.1
async-timeout      4.0.3
attrs              23.1.0
blinker            1.7.0
certifi            2023.7.22
charset-normalizer 3.3.2
click              8.1.7
exceptiongroup     1.1.3
fastapi            0.104.1
Flask              3.0.0
frozenlist         1.4.0
grpcio             1.59.2
grpcio-tools       1.59.2
gunicorn           21.2.0
h11                0.14.0
idna               3.4
importlib-metadata 6.8.0
itsdangerous       2.1.2
Jinja2             3.1.2
kafka-python       2.0.2
MarkupSafe         2.1.3
multidict          6.0.4
packaging          23.2
pip                23.3.1
protobuf           4.25.0
psutil             5.9.6
pydantic           2.4.2
pydantic_core      2.10.1
requests           2.31.0
setuptools         57.5.0
sniffio            1.3.0
starlette          0.27.0
typing_extensions  4.8.0
urllib3            2.0.7
uvicorn            0.23.2
uvloop             0.17.0
uWSGI              2.0.23
Werkzeug           3.0.1
wheel              0.41.3
wrapt              1.15.0
yarl               1.9.2
zipp               3.17.0

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@jaychoww jaychoww added the bug Something isn't working and you are sure it's a bug! label Nov 1, 2023
@wu-sheng wu-sheng added the python Python agent related label Nov 1, 2023
@Superskyyy
Copy link
Member

Superskyyy commented Nov 1, 2023

Hi, thanks for the report. Please kindly paste the e2e log here, so that we know what exactly got broken in 5.9.6? Since restricting the package version will impact user env too, we want the version constraint as loose as possible. I don't see any backward incompatible changes with the cpu_percent method, could it be a broken build specific to os?

@jaychoww
Copy link
Author

jaychoww commented Nov 2, 2023

Hi, thanks for the report. Please kindly paste the e2e log here, so that we know what exactly got broken in 5.9.6? Since restricting the package version will impact user env too, we want the version constraint as loose as possible. I don't see any backward incompatible changes with the cpu_percent method, could it be a broken build specific to os?

The cpu_percent() method is my conjecture, and I'm not sure, but this problem appears to be reproduced on both Ubuntu x64 and MacOS M1. It seems irrelevant to the operating system.

The log for e2e running on macOS is here:

e2e.log

The consumer log:
consumer.log

The provider log:
provider.log

@Superskyyy
Copy link
Member

So essentially each and every case fails, that is weird, please hold that PR a bit, I will try run it on my GHA to pinpoint the problem.

@Superskyyy
Copy link
Member

The workaround is merged in apache/skywalking-python#326 but lets keep this issue open until next release, I might fix it up according to upstream changes.

@wu-sheng wu-sheng added this to the Python - 1.1.0 milestone Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working and you are sure it's a bug! python Python agent related
Projects
None yet
Development

No branches or pull requests

4 participants