cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Evans (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-3991) Investigate importance of jsvc in debian packages
Date Wed, 07 Mar 2012 03:20:21 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223935#comment-13223935
] 

Eric Evans commented on CASSANDRA-3991:
---------------------------------------

Java's "platform neutrality" makes it impossible to properly daemonize, jsvc is meant as a
work-around.  It disassociates from the controlling terminal, becomes the session leader,
double-forks, sets the PWD to "/", sets the umask to 0, closes file descriptors, etc, etc.

As Sylvain mentions, it's also supposed to restart when the JVM (not the app) crashes.

bq. I guess the main point of JSVC is this? "Jsvc allows the application (e.g. Tomcat) to
perform some privileged operations as root (e.g. bind to a port < 1024), and then switch
identity to a non-privileged user." We don't even use that...

We might be opening root-owned files at start-up (we used to anyway).

If jsvc is buggy (is this memory thing the only problem?) the options would seem to be:

# File a bug report with Debian, commons-daemon, or both
# Fix the jsvc bug(s)
# Try to properly daemonize entirely from shell (I tried doing this with {{bin/cassandra}}
FWIW, I don't think it's practical)
# Rip out jsvc and call it Good Enough(tm)

Looking at the source, jsvc seems pretty simple.  I might be willing to take a crack at bug-fixing
in the weeks to come assuming a) I knew how to reproduce the issue(s), and b) everyone doesn't
already have their hearts set on #4.
                
> Investigate importance of jsvc in debian packages
> -------------------------------------------------
>
>                 Key: CASSANDRA-3991
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3991
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Brandon Williams
>            Assignee: Brandon Williams
>             Fix For: 1.1.1
>
>
> jsvc seems to be buggy at best.  For instance, if you set a small heap like 128M it seems
to completely ignore this and use as much memory as it wants.  I don't know what this is buying
us over launching /usr/bin/cassandra directly like the redhat scripts do, but I've seen multiple
complaints about its memory usage.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message