Forums

OSError(38, 'Function not implemented') since the begining of feb

Hello, I went back to my app https://www.pythonanywhere.com, just to discover it has not been working for at least a month.

Looking at the log :

2013-01-31 19:31:15,478 :Error from app: (<type 'exceptions.OSError'>, OSError(38, 'Function not implemented'), <traceback object at 0x7fc9c400ca70>)

The regex tester used a subprocess call to run the regex in a separate process than the main thread. So did you change the Python ability to run a subprocess on this hosting or is it something completly unrelated ?

Apparently, the problem can appear if some devices are not mounted:

http://comments.gmane.org/gmane.network.shinken.devel/1185

@ksmauel, is that running in a console, a scheduled task or as part of a web app?

Hi, the app is now running fine. I have no idea what, when, how nor why.

Was this error from the multiprocessing module? If so, I've only seen it as the result of /dev/shm not being available, as the article you linked mentions. It's not really a proper device, it's just a RAM disk which is used as shared memory (see here for a brief discussion). I could imagine that incorrect permissions or other problems could also raise issues like this.

However, in principle other issues can generate it, in particular restricted functionality from a virtualised environment can cause it - for example, I've seen that error raised where people call mkdir() on code running in Google App Engine (which has very limited support for files). If you have the full backtrace of where the issue occurred that might be useful for future reference, so we can see exactly which call raised the issue.

Hmm, we do have a /dev/shm for our user sandboxes -- we actually added it entirely to make multiprocessing work. It's quite small (1Mb) but should be enough. But right, it's presumably a result of there not being something in our sandboxes, I just don't quite know what.

@ksamuel -- as @Cartroo says, if this happens again, the full stacktrace would be really helpful. If it's got sensitive information in it that you'd rather not share in the forums, you can send it directly to us using the "Send feedback" link at the top of the page.

Yes, I even knew that PA had /dev/shm and completely failed to mention it in my post, sorry about that. I suppose feasibly it could be a size issue if the code's trying to use an awful lot of locks or something, but 1MB feels like it should be plenty for most standard tasks.