osvenskan / posix_ipc

Other
137 stars 25 forks source link

shared memory object leaked. #6

Closed chenjiasheng closed 6 years ago

chenjiasheng commented 6 years ago

I pressed CTRL + C during demo/premise.py running, but now I can't start it again:

(tensorflow_python3) chenjiasheng@ubuntu:~/code/posix_ipc/demo$ python premise.py premise@1516155434.937690: Oooo 'ello, I'm Mrs. Premise! Traceback (most recent call last): File "premise.py", line 21, in size=params["SHM_SIZE"]) posix_ipc.ExistentialError: Shared memory with the specified name already exists

Removing /run/shm/four_yorkshiremen dosen't solve it.

(tensorflow_python3) chenjiasheng@ubuntu:~/code/posix_ipc/demo$ ll /run/shm total 4 drwxrwxrwt 2 root root 80 Jan 17 10:14 ./ drwxr-xr-x 33 root root 1200 Jan 16 17:12 ../ -rw------- 1 chenjiasheng chenjiasheng 4096 Jan 17 10:14 four_yorkshiremen -rw------- 1 chenjiasheng chenjiasheng 32 Jan 17 09:41 sem.wuthering_heights

Re-open and unlink/close_fd the shared memory object dosen't work either. I don't like to reboot or change the memory object name. Please help me out. Thank you!

chenjiasheng commented 6 years ago

found cleanup.py. my fault, sorry for disturbing.