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

Daemon crashes when process waiting on lock exits #3

Open
rajiv65 opened this issue May 19, 2016 · 0 comments
Open

Daemon crashes when process waiting on lock exits #3

rajiv65 opened this issue May 19, 2016 · 0 comments

Comments

@rajiv65
Copy link

rajiv65 commented May 19, 2016

If process P has asked for a lock on a resource and is waiting on it because someone else has it and if P exits in the meantime, the daemon crashes as it tries to grant the lock when it is P's turn to acquire it. This is because the daemon server is trying to write to a socket is closed. Here is the error message. I think it can be corrected by using a try catch block.

[E 160519 15:16:27 ioloop:435] Exception in callback <tornado.stack_context._StackContextWrapper object at 0x7f07658fafc8>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 421, in _run_callback
callback()
File "/usr/local/lib/python2.7/dist-packages/rdlm/locks_handler.py", line 46, in on_active
self.send_status(201, message="lock acquired at %s" % url, headers={"Location": url})
File "/usr/local/lib/python2.7/dist-packages/rdlm/request_handler.py", line 73, in send_status
"message": message,
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 722, in finish
self.request.finish()
File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py", line 422, in finish
self.connection.finish()
File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py", line 193, in finish
self._finish_request()
File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py", line 229, in _finish_request
self.stream.read_until(b("\r\n\r\n"), self._header_callback)
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 153, in read_until
self._try_inline_read()
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 388, in _try_inline_read
self._check_closed()
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 571, in _check_closed
raise IOError("Stream is closed")
IOError: Stream is closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant