You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2011/11/08 16:31:39 UTC

DO NOT REPLY [Bug 52155] New: Application getting stuck at java.io.FileOutputStream.writeBytes

https://issues.apache.org/bugzilla/show_bug.cgi?id=52155

             Bug #: 52155
           Summary: Application getting stuck at
                    java.io.FileOutputStream.writeBytes
           Product: Log4j
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: getprasadin@gmail.com
    Classification: Unclassified


I am using log4j-1.2.15.jar.

Please see the thread dump as shown below. I took the dump of JVM as my
application stopped responding. It is getting stuck at 
java.io.FileOutputStream.writeBytes method every time. every time. My
application is single threaded.
I have declared logger as final private static class variable. Please help me
out

"TIBCO EMS Session Dispatcher (5388033)" prio=6 tid=0x000000002c4c4800
nid=0xf24 runnable [0x000000003339e000]
   java.lang.Thread.State: RUNNABLE
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:260)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    - locked <0x000000000fc8da18> (a java.io.BufferedOutputStream)
    at java.io.PrintStream.write(PrintStream.java:432)
    - locked <0x000000000fc8d9e0> (a java.io.PrintStream)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
    at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
    at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:85)
    - locked <0x000000000fc8db68> (a java.io.OutputStreamWriter)
    at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:168)
    at java.io.PrintStream.write(PrintStream.java:477)
    - locked <0x000000000fc8d9e0> (a java.io.PrintStream)
    at java.io.PrintStream.print(PrintStream.java:619)
    at java.io.PrintStream.println(PrintStream.java:756)
    - locked <0x000000000fc8d9e0> (a java.io.PrintStream)
    at java.lang.Throwable.printStackTrace(Throwable.java:464)
    - locked <0x000000000fc8d9e0> (a java.io.PrintStream)
    at java.lang.Throwable.printStackTrace(Throwable.java:451)
    at org.apache.log4j.helpers.LogLog.error(LogLog.java:145)
    at
org.apache.log4j.helpers.OnlyOnceErrorHandler.error(OnlyOnceErrorHandler.java:78)
    at
org.apache.log4j.helpers.OnlyOnceErrorHandler.error(OnlyOnceErrorHandler.java:68)
    at
org.apache.log4j.helpers.CountingQuietWriter.write(CountingQuietWriter.java:49)
    at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:302)
    at
org.apache.log4j.CompositeRollingAppender.subAppend(CompositeRollingAppender.java:338)
    at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
    at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
    - locked <0x000000000fd1bb50> (a org.apache.log4j.CompositeRollingAppender)
    at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
    at org.apache.log4j.Category.callAppenders(Category.java:206)
    - locked <0x000000000fcd86b0> (a org.apache.log4j.spi.RootLogger)
    at org.apache.log4j.Category.forcedLog(Category.java:391)
    at org.apache.log4j.Category.info(Category.java:666)
    at com.tpt.thresher.util.logging.LogHelper.info(LogHelper.java:56)
    at
com.tpt.thresher.server.posval.complexpricing.componentinstruments.impliedpositions.elements.BaseFutureImpliedPosition.generate(BaseFutureImpliedPosition.java:51)
    at
com.tpt.thresher.server.posval.complexpricing.componentinstruments.impliedpositions.generator.ImpliedPositionGenerator.generateImpliedPosition(ImpliedPositionGenerator.java:71)
    at
com.tpt.thresher.server.posval.complexpricing.componentinstruments.processor.FutureNotPricedComponentValueProcessor.valueLot(FutureNotPricedComponentValueProcessor.java:21)
    at
com.tpt.thresher.server.posval.complexpricing.componentinstruments.processor.BaseComponentValueProecssor.valueAllLots(BaseComponentValueProecssor.java:258)
    at
com.tpt.thresher.server.posval.complexpricing.componentinstruments.processor.BaseComponentValueProecssor.valuePrimarySettlement(BaseComponentValueProecssor.java:214)
    at
com.tpt.thresher.server.posval.complexpricing.componentinstruments.processor.BaseComponentValueProecssor.value(BaseComponentValueProecssor.java:85)
    at
com.tpt.thresher.server.posval.complexpricing.workflow.BaseValueProcesser.value(BaseValueProcesser.java:111)
    at
com.tpt.thresher.server.posval.complexpricing.workflow.BaseTermValuationProcesser.value(BaseTermValuationProcesser.java:1996)
    at
com.tpt.thresher.server.posval.complexpricing.workflow.BaseTermValuationProcesser.value(BaseTermValuationProcesser.java:1870)
    at
com.tpt.thresher.server.posval.complexpricing.helper.TermValuationWorkflow.buildTerm(TermValuationWorkflow.java:388)
    at
com.tpt.thresher.server.posval.complexpricing.workflow.BaseTermValuationProcesser.valueTerm(BaseTermValuationProcesser.java:2487)
    at
com.tpt.thresher.server.posval.complexpricing.concurrent.TermValuationDistributedProcesser.valueTerm(TermValuationDistributedProcesser.java:2536)
    at
com.tpt.thresher.server.posval.complexpricing.concurrent.TermValuationDistributedProcesser.valueTerm(TermValuationDistributedProcesser.java:2270)
    at
com.tpt.thresher.server.posval.complexpricing.concurrent.TermValuationDistributedProcesser.doProcess(TermValuationDistributedProcesser.java:1130)
    - locked <0x00000000100d8858> (a java.lang.Object)
    at
com.tpt.thresher.server.posval.complexpricing.concurrent.TermValuationDistributedProcesser.process(TermValuationDistributedProcesser.java:1112)
    at
com.tpt.thresher.common.concurrent.SpringDistributedProcess.onMessage(SpringDistributedProcess.java:486)
    at com.tibco.tibjms.TibjmsxSessionImp._submit(TibjmsxSessionImp.java:4165)
    at
com.tibco.tibjms.TibjmsxSessionImp._dispatchAsyncMessage(TibjmsxSessionImp.java:2267)
    at
com.tibco.tibjms.TibjmsxSessionImp$Dispatcher.run(TibjmsxSessionImp.java:3689)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 52155] Application getting stuck at java.io.FileOutputStream.writeBytes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52155

prasad <ge...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |getprasadin@gmail.com
         OS/Version|                            |All

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 52155] Application getting stuck at java.io.FileOutputStream.writeBytes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52155

Curt Arnold <ca...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Curt Arnold <ca...@apache.org> 2011-11-10 05:22:37 UTC ---
Please ask usage questions on log4j-user@logging.apache.org. Closing this bug
as INVALID until an specific error is identified.

I don't recognize org.apache.log4j.CompositeRollingAppender initially. The
source is located in the contribs/KevinSteppe directory where it has been since
2002 with only trivial changes to the comments. It is a legacy from the
earliest days of log4j. The problem may or may not be related to the component.

If appears that on the logging request that stalled, an attempt was made to
write to a log file, but an exception was thrown. The exception was processed
by the default error handler which writes calls PrintStackTrace on the
exception. The call to PrintStackTrace stalled for unknown reasons.

To attack the problem, you can either try to find why you are getting an
exception in CountingQuietWriter.write, replace the default error handler with
something else that doesn't try to write to the console, or search your JVM or
environment bug list for reports of problems with
FileOutputStream.writeBytes().

See tests/input/xml/fallback1.xml for an example of configuring an different
error handler.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org