Closed rpedde closed 10 years ago
Very strange. I can't think of any reason that the one process would affect the other like this. Certainly the 20CAC8 brokre is active (and handling messages). I suspect it's some unexpected synchronization in the test case.
What I do see is that the writer still thinks the reader exists, when it's in fact gone. I need to still add some cleanup of dead pipes. We do know in Zyre when a peer disappears, so I can use that to wipe out dangling readers and writers.
It would be worthwhile to delete pipes on close as well -- I suspect some things I see are a result of old "stale" pipes that have been closed both sides, but are still in the "pending timeout" state.
Pipes are deleted on close, when known. They're removed from the hash tables when the writer closes, even if the reader is still busy. There's just some leakage with remote peers being interrupted, I think.
On Thu, May 8, 2014 at 1:00 AM, Ron Pedde notifications@github.com wrote:
It would be worthwhile to delete pipes on close as well -- I suspect some things I see are a result of old "stale" pipes that have been closed both sides, but are still in the "pending timeout" state.
— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/zbroker/issues/70#issuecomment-42494008 .
Okay, so these:
14-05-07 18:35:16 D: 177:write_test : close local reader
14-05-07 18:35:16 D: 177:write_test : $ send CLOSE_OK
14-05-07 18:35:16 D: 177:write_test : > start
14-05-07 18:35:16 D: 178:write_test : writing:
14-05-07 18:35:16 D: 178:write_test : CLOSE
14-05-07 18:35:16 D: 178:write_test : $ close pipe writer
14-05-07 18:35:16 D: 178:write_test : close local writer
14-05-07 18:35:16 D: 178:write_test : $ send CLOSE_OK
14-05-07 18:35:16 D: 178:write_test : > start
14-05-07 18:35:26 D: 177:write_test : start:
14-05-07 18:35:26 D: 177:write_test : expired
14-05-07 18:35:26 D: 177:write_test : $ terminate
14-05-07 18:35:26 D: 178:write_test : start:
14-05-07 18:35:26 D: 178:write_test : expired
14-05-07 18:35:26 D: 178:write_test : $ terminate
The terminates? The hash and data queues are already dropped, the terminate is just a waiting timer that doesn't actually do anything?
Right. The 'expired' event hits after 10 seconds (default timeout on client connections). The 'terminate' action wipes that client connection. At this stage the pipes are already closed and dropped. If 'expired' hits in a state with an open pipe, that are first closed.
I haven't seen this again. I'll reopen if I see this again.
OK, great.
On Thu, May 8, 2014 at 5:13 PM, Ron Pedde notifications@github.com wrote:
Closed #70 https://github.com/zeromq/zbroker/issues/70.
— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/zbroker/issues/70#event-119171945 .
Two separate processes. One writes, the other reads. The reader attaches first, then blocks on a read. The writer connects next, the local writer attaches, but the pipe open apparently hangs until the reader disconnects.
I'm running these processes in python, and I don't think this is python related, but I'm writing a repro case in C to be sure. I'll follow with a C repro case if I duplicate it.
Error in test "scripts/blocks_are_streamish.yml"
Host "writer" (localhost)
Test script
Script Log
Broker Log
Host "reader" (localhost)
Test script
Script Log
Broker Log