You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2014/04/28 00:34:14 UTC
[jira] [Comment Edited] (CASSANDRA-5635) ThriftServer.stop() hangs
forever
[ https://issues.apache.org/jira/browse/CASSANDRA-5635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982494#comment-13982494 ]
Dave Brosius edited comment on CASSANDRA-5635 at 4/27/14 10:33 PM:
-------------------------------------------------------------------
On trunk at least, what's keeping it alive is the threads
COMMIT-LOG-ALLOCATOR (CommitLogSegmentManager.java)
PERIODIC-COMMIT-LOG-SYNCER (PeriodicCommitLogService.java)
ACCEPT-(ip) (MessagingService)
not of which are terminated by CassandraDaemon.stop()
might need a StorageService.instance.drain(); afterwards.
was (Author: dbrosius):
On trunk at least, what's keeping it alive is the threads
COMMIT-LOG-ALLOCATOR (CommitLogSegmentManager.java)
PERIODIC-COMMIT-LOG-SYNCER (PeriodicCommitLogService.java)
ACCEPT-(ip) (MessagingService)
not of which are terminated by CassandraDaemon.stop()
> ThriftServer.stop() hangs forever
> ---------------------------------
>
> Key: CASSANDRA-5635
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5635
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.2.4
> Reporter: Robert Stupp
>
> I've written a very small main() method just to start to test "how to embed Cassandra". But the code hangs while executing CassandraDaemon.stop()...
> I've used a default {{cassandra.yaml}} file.
> {noformat}
> cassandraDaemon = new CassandraDaemon();
> cassandraDaemon.init(null);
> cassandraDaemon.start();
> cassandraDaemon.stop();
> {noformat}
> {{CassandraDaemon.stop()}} calls {{ThriftServer.stop()}, which ends somehow in {{TCustomServerSocket.close()}}, which sets its field {{serverSocket=null}}. This causes {{CustomTThreadPoolServer.server()}} to loop forever, because it's {{stopped}} field is still {{false}} - {{TServerTransport.accept()}} immediatly throws a {{TTransportException}} because {{TCustomServerSocket}}'s {{serverSocket}} is {{null}}.
--
This message was sent by Atlassian JIRA
(v6.2#6252)