cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Goffinet (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1462) Unexpected exceptions' stacktraces can be lost
Date Fri, 03 Sep 2010 20:27:34 GMT

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

Chris Goffinet commented on CASSANDRA-1462:
-------------------------------------------

I'd like to chime in on this, as I was looking into this exact issue the other day. Certain
appenders do not support logging stack traces to a File. I would check which you are using.
I just updated my Scribe Appender to support logging stack traces, since the only place was
system.log.

> Unexpected exceptions' stacktraces can be lost
> ----------------------------------------------
>
>                 Key: CASSANDRA-1462
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1462
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.6.5
>            Reporter: David King
>
> o.a.c.thrift.Cassandra.login.process has a catch that looks like:
>         } catch (Throwable th) {
>           LOGGER.error("Internal error processing login", th);
>           TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR,
"Internal error processing login");
>           oprot.writeMessageBegin(new TMessage("login", TMessageType.EXCEPTION, seqid));
>           x.write(oprot);
>           oprot.writeMessageEnd();
>           oprot.getTransport().flush();
>           return;
>         }
> Unfortunately this loses vital debugging information as it loses the stack trace associated
with the exception. In particular it made tracking down the source of this very difficult:
> ERROR [pool-1-thread-9723] 2010-09-03 12:34:16,978 Cassandra.java (line 1659) Internal
error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9556] 2010-09-03 12:34:17,031 Cassandra.java (line 1659) Internal
error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9556] 2010-09-03 12:34:17,129 Cassandra.java (line 1659) Internal
error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,190 Cassandra.java (line 1659) Internal
error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,245 Cassandra.java (line 1659) Internal
error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,285 Cassandra.java (line 1659) Internal
error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,392 Cassandra.java (line 1659) Internal
error processing batch_mutate
> java.lang.NullPointerException
> I'd like to file a bug for that one too, but I have no idea what caused it :)
> For reference, my log4j.properties:
> log4j.rootLogger=INFO,stdout,R
> # stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} %m%n
> # rolling log file
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.file.maxFileSize=20MB
> log4j.appender.file.maxBackupIndex=50
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L) %m%n
> # Edit the next line to point to your logs directory
> log4j.appender.R.File=/cassandra/log/system.log
> # Application logging options
> #log4j.logger.com.facebook=DEBUG
> #log4j.logger.com.facebook.infrastructure.gms=DEBUG
> #log4j.logger.com.facebook.infrastructure.db=DEBUG

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message