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

BOT-3EN: snekbox hits a recusion exceded exception in pathlib when parsing lots of nested directories and 500s #172

Closed
sentry-io bot opened this issue Mar 11, 2023 · 3 comments · Fixed by #173
Assignees

Comments

@sentry-io
Copy link

sentry-io bot commented Mar 11, 2023

Summary

Sending this code:

# https://discord.com/channels/267624335836053506/267659945086812160/1084230562622996601
import os

x = ""
for _ in range(1000):
    x += "a/"
    os.mkdir(x)

open(f"{x}hello.txt", "w").write("test")

Got this error:

# https://discord.com/channels/267624335836053506/267659945086812160/1084230566007799818
ClientResponseError: 500, message='Internal Server Error', url=URL('http://snekbox.default.svc.cluster.local/eval')

Which, according to grafana, is snekbox dying somewhere in pathlib while calling scandir.

Sentry Issue: BOT-3EN

@ionite34
Copy link
Member

Related to Cpython#102613. We should probably switch to glob instead of pathlib for now.

@ionite34
Copy link
Member

Also related to python/cpython#100282, could remove check after fix upstream

@zmievsa
Copy link

zmievsa commented Mar 22, 2023

@ionite34 Barney Gale has just merged #100282!

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 a pull request may close this issue.

2 participants