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

Failed to collect and upload profile: dictionary changed size during iteration #68

Closed
wasdee opened this issue Jan 19, 2021 · 10 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@wasdee
Copy link

wasdee commented Jan 19, 2021

this is the bug raised in production capture by sentry.

"Failed to collect and upload profile: dictionary changed size during iteration"

CPython, 3.8.2(3.8.2 (default, Apr 23 2020, 14:22:33) [GCC 8.3.0])

@wasdee
Copy link
Author

wasdee commented Jan 19, 2021

It don't know how to reproduce it exactly.

@kalyanac kalyanac added the bug Something isn't working label Jan 19, 2021
@aalexand
Copy link
Contributor

@CircleOnCircles I assume there wasn't a stack?

@wasdee
Copy link
Author

wasdee commented Jan 21, 2021

Could you explain more? What is the stack?

@wasdee
Copy link
Author

wasdee commented Jan 21, 2021

this is a fastapi application.

tool.poetry.dependencies]
python = "^3.7"
fastapi = "^0.61.0"
httpx = { extras = ["http2"], version = "^0.16.1" }
uvicorn = "^0.11.8"
loguru = "^0.5.1"
pydantic = {extras = ["email", "dotenv"], version = "^1.7.3"}
pybase62 = "^0.4.3"
arrow = "^0.15.8"
autoname = "^0.1.1"
sentry-sdk = "^0.16.5"
google-api-python-client = "^1.8.4"
google-auth-httplib2 = "^0.0.4"
google-auth-oauthlib = "^0.4.1"
grpcio = "^1.31.0"
motor = "^2.3.0"
dnspython = "^2.0.0"
line-bot-sdk = "^1.18.0"
tenacity = "^6.3.1"
notifiers = "^1.2.1"
omise = "^0.9.0"
python-multipart = "^0.0.5"
furl = "^2.1.0"
imagekitio = "^2.2.5"
jingdi = "^0.1.0"
pyzbar-x = "^0.2.1"
Pillow = "^8.1.0"
fastapi-utils = "^0.2.1"
google-python-cloud-debugger = "^2.15"
tomlkit = "^0.7.0"
locate = "^0.0.1"
parse-with-dot-access = "^1.18.0"

@wyk9787
Copy link
Contributor

wyk9787 commented Jan 21, 2021

Could you explain more? What is the stack?

I think what @aalexand meant was "Was there a stack trace being printed when your program threw out 'dictionary changed size during iteration'"? If so, could you post it here?

@wasdee
Copy link
Author

wasdee commented Jan 22, 2021

image

What I see in the GCP log explorer. there is no stack trace.

@wyk9787
Copy link
Contributor

wyk9787 commented Jan 26, 2021

Thanks for the screenshot. To better understand the issue, how often do you see this error message in your log?

@wasdee
Copy link
Author

wasdee commented Jan 26, 2021

like a few times a week

@wyk9787
Copy link
Contributor

wyk9787 commented Jan 27, 2021

Thanks! I have applied a patch to the Python agent to print out the stack trace on that code path. Could you update your agent to version 2.0.5: https://pypi.org/project/google-cloud-profiler/ and post this error log again once it happens with the new version?

@wasdee
Copy link
Author

wasdee commented Jan 28, 2021

sure, let close for now, i will reopen it when i faced the bug again

@wasdee wasdee closed this as completed Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants