Skip to content

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

Closed

Description

@sentry

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

Activity

  1. ionite34 commented on Mar 11, 2023

    @ionite34
    Contributor

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

  2. self-assigned this
    on Mar 12, 2023
  3. ionite34 commented on Mar 12, 2023

    @ionite34
    Contributor

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

  4. zmievsa commented on Mar 22, 2023

    @zmievsa

    @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

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