Enhancement #1649
If bus is busy cl-logger takes significant time to end
Status: | Resolved | Start date: | 10/29/2013 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | J. Moringen | % Done: | 100% | |
Category: | Common Lisp | |||
Target version: | rsb-0.10 |
Description
- One cl logger in monitor style is the socket server
- Another client makes 100 Hz traffic on the bus
- A cl logger is in detailed style with rst introspection
When I send Ctrl-C to 3., the detailed logger, it immediately stops printing, but takes 5-10 seconds to actually return. There is also a warning:
[ WARN (RSB.TOOLS.LOGGER) ] Did not receive acknowledgment of shutdown handshake.
This is not a problem in using it at all, just an observation regarding the look and feel of the logger.
Associated revisions
Fixed dispatch during shutdown in src/transport/socket/*.lisp
refs #1649
- src/transport/socket/bus-connection.lisp
(send-notification bus-connection cons): drop outgoing notifications
when closing
(handle bus-connection notification): lock the connection while
sending outgoing notifications - src/transport/socket/bus.lisp (handle bus notification): only lock bus
to copy connection list; do not lock during handling
(handle bus cons): likewise
Fixed closing deadlock in src/transport/socket/bus.lisp
refs #1649
The deadlock could occur when connections where dispatching
events (locking the bus) while being removed (also locking the bus).
- src/transport/socket/bus.lisp (bus::removed-connections): new slot;
stores a list of connections queued for closing after having been
removed
(setf bus-connections :around list bus): remove handlers from closed
connections; push removed connections onto `removed-connections' queue
to close them later; error policy calls `close-removed-connections'
(notify connector bus eql :detached): call `close-removed-connections'
after releasing the bus locks
(notify bus eql t eql :detached): cosmetic changes
(close-removed-connections): new function; helper functions for
closing connections after they have been removed from the bus
Finish output before shutdown in src/transport/socket/bus-connection.lisp
refs #1649
- src/transport/socket/bus-connection.lisp (handshake): call
`finish-output' before shutting down the socket
Backport: Fixed dispatch during shutdown in src/transport/socket/*.lisp
refs #1649
- src/transport/socket/bus-connection.lisp
(send-notification bus-connection cons): drop outgoing notifications
when closing
(handle bus-connection notification): lock the connection while
sending outgoing notifications - src/transport/socket/bus.lisp (handle bus notification): only lock bus
to copy connection list; do not lock during handling
(handle bus cons): likewise
Backport: Fixed closing deadlock in src/transport/socket/bus.lisp
refs #1649
The deadlock could occur when connections where dispatching
events (locking the bus) while being removed (also locking the bus).
- src/transport/socket/bus.lisp (bus::removed-connections): new slot;
stores a list of connections queued for closing after having been
removed
(setf bus-connections :around list bus): remove handlers from closed
connections; push removed connections onto `removed-connections' queue
to close them later; error policy calls `close-removed-connections'
(notify connector bus eql :detached): call `close-removed-connections'
after releasing the bus locks
(notify bus eql t eql :detached): cosmetic changes
(close-removed-connections): new function; helper functions for
closing connections after they have been removed from the bus
Backport: Finish output before shutdown in src/transport/socket/bus-connection.lisp
refs #1649
- src/transport/socket/bus-connection.lisp (handshake): call
`finish-output' before shutting down the socket
History
#1 Updated by J. Moringen over 9 years ago
- Status changed from New to In Progress
#2 Updated by J. Moringen over 9 years ago
- Category changed from Common Lisp Tools to Common Lisp
#3 Updated by J. Moringen over 9 years ago
- % Done changed from 0 to 70
#4 Updated by J. Moringen over 9 years ago
- Status changed from In Progress to Feedback
- Target version set to rsb-0.10
- % Done changed from 70 to 90
Should be fixed in 0.9 and master. Please confirm.
#5 Updated by Anonymous over 9 years ago
- Status changed from Feedback to Resolved
- % Done changed from 90 to 100
Confirmed with 0.9 and master.
Using the same setup, logger instantly stops and raises no warning.