Skip to content

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

Closed
@sentry-io

Description

@sentry-io

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions