Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knossosdataset seg.zip file locking broken #21

Open
jmrk84 opened this issue Oct 21, 2018 · 0 comments
Open

knossosdataset seg.zip file locking broken #21

jmrk84 opened this issue Oct 21, 2018 · 0 comments
Labels

Comments

@jmrk84
Copy link
Member

jmrk84 commented Oct 21, 2018

Under some circumstances, this lock mechanism (which looks very fishy upon superficial inspection, a semaphore is certainly something different) appears to fail, leading to ugly race conditions during knossos dataset writing (line 1928):

                  while True:
                    try:
                        os.makedirs(folder_path+"block")    # Semaphore --------
                        break
                    except:
                        if time.time() - \
                                os.stat(folder_path+"block").st_mtime > 5:
                            os.rmdir(folder_path+"block")
                            os.makedirs(folder_path+"block")
                            break
                        time.sleep(1)`



@jmrk84 jmrk84 added the bug label Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant