[Python] Can os.listdir hang with network drives? What system call does it use?

Discussão em 'Python' iniciado por Stack, Maio 26, 2025.

  1. Stack

    Stack Membro Participativo

    What system call does os.listdir internally perform and is there a possiblity of Python process hanging because of a scenario where os.listdir is over a mounted network drive?

    We are suspecting a problem in our app server because of os.listdir which tries to list a samba share mounted on to a linux machine. Apparently DNS of the samba share had changed round about the time we had this issue. We are still trying to replicate this scenario, but can anyone tell me how would it work? And also would commands like ls also hang like this?

    Are there any ways we could handle this at user-space?

    Continue reading...

Compartilhe esta Página