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

LispWorks specific: the process slot of an acceptor may be unbound #174

Open
Yehouda opened this issue Feb 10, 2020 · 2 comments
Open

LispWorks specific: the process slot of an acceptor may be unbound #174

Yehouda opened this issue Feb 10, 2020 · 2 comments

Comments

@Yehouda
Copy link

Yehouda commented Feb 10, 2020

In the LispWorks version of start-listening, the acceptor process slot is is set after comm::start-up-server returns, which happens after the server starts to work, so something may try to access this slot before the setting.

It seems that happens only in (method shutdown (taskmaster)) and (method stop (acceptor)), so causes errors only if the server is being shutdown very quickly. That probably doesn't affect real application, but happens occasionally when we (LispWorks Ltd) run tests that use hunchentoot.

The right way to fix is:

  1. have :initform to the slot, so it is always bound.
  2. In the end of start-listening, after setting the slot, check if the acceptor was already shutdown and if it was, terminate the server.
  3. (method stop (acceptor)) need to check if the process is not NIL.

Other bits:
The terminating of the server should be done now (since LW 6.1) by comm:server-terminate.
The function of the server, when it sees that the acceptor shutdown, can terminate it itself. It should
also close the handle in this case,

@stassats
Copy link
Member

The right way to fix is:

Can you assemble it into a pull request?

@Yehouda
Copy link
Author

Yehouda commented Feb 10, 2020

I didn't know what a pull request is until 10 minutes ago.
I don't actually work with a branch of the source code, I downloaded it from quicklisp.

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

2 participants