[logback-dev] [JIRA] Commented: (LBCLASSIC-112) ch.qos.logback.classic.net.SMTPAppender_SubethaSMTPTest hangs on Mac OS X

Thorbjoern Ravn Andersen (JIRA) noreply-jira at qos.ch
Tue Mar 10 18:32:11 CET 2009


    [ http://jira.qos.ch/browse/LBCLASSIC-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11079#action_11079 ] 

Thorbjoern Ravn Andersen commented on LBCLASSIC-112:
----------------------------------------------------

I can get this too under Java 6.  It appears roughly half the times I have run it so far.

Based on the information in http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html I managed to get a debugger on the hanging spot (for some reason Jconsole did not like the surefire process).

The culprit appears to be that the main thread is waiting for a response from the SMTPserver, which ...

Main thread stack trace: 

Thread [main] (Suspended)	
	SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method]	
	SocketInputStream.read(byte[], int, int) line: 129	
	TraceInputStream.read(byte[], int, int) line: 97	
	BufferedInputStream.fill() line: 218 [local variables unavailable]	
	BufferedInputStream.read() line: 235	
	LineInputStream.readLine() line: 75	
	SMTPTransport.readServerResponse() line: 1440	
	SMTPTransport.issueSendCommand(String, int) line: 1376	
	SMTPTransport.finishData() line: 1215	
	SMTPTransport.sendMessage(Message, Address[]) line: 586	
	Transport.send0(Message, Address[]) line: 169	
	Transport.send(Message) line: 98	
	SMTPAppender(SMTPAppenderBase<E>).sendBuffer(E) line: 279	
	SMTPAppender(SMTPAppenderBase<E>).append(E) line: 150	
	SMTPAppender(AppenderBase<E>).doAppend(E) line: 87	
	AppenderAttachableImpl<E>.appendLoopOnAppenders(E) line: 60	
	Logger.appendLoopOnAppenders(ILoggingEvent) line: 271	
	Logger.callAppenders(ILoggingEvent) line: 258	
	Logger.buildLoggingEventAndAppend(String, Marker, Level, String, Object[], Throwable) line: 440	
	Logger.filterAndLog_0_Or3Plus(String, Marker, Level, String, Object[], Throwable) line: 394	
	Logger.error(String, Throwable) line: 557	
	SMTPAppender_SubethaSMTPTest.htmlLong() line: 181	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 585	
	TestMethod.invoke(Object) line: 59	
	MethodRoadie.runTestMethod() line: 98	
	MethodRoadie$2.run() line: 79	
	MethodRoadie.runBeforesThenTestThenAfters(Runnable) line: 87	
	MethodRoadie.runTest() line: 77	
	MethodRoadie.run() line: 42	
	JUnit4ClassRunner.invokeTestMethod(Method, RunNotifier) line: 88	
	JUnit4ClassRunner.runMethods(RunNotifier) line: 51	
	JUnit4ClassRunner$1.run() line: 44	
	ClassRoadie.runUnprotected() line: 27	
	ClassRoadie.runProtected() line: 37	
	JUnit4ClassRunner.run(RunNotifier) line: 42	
	JUnit4TestSet.execute(ReporterManager, ClassLoader) line: 62	
	JUnit4DirectoryTestSuite(AbstractDirectoryTestSuite).executeTestSet(SurefireTestSet, ReporterManager, ClassLoader) line: 140	
	JUnit4DirectoryTestSuite(AbstractDirectoryTestSuite).execute(ReporterManager, ClassLoader) line: 127	
	Surefire.run(List, List, ClassLoader, ClassLoader, Boolean) line: 177	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 585	
	SurefireBooter.runSuitesInProcess() line: 338	
	SurefireBooter.main(String[]) line: 997	


All threads named SubEtha are in Unsafe.park state (which AFAIK is what unused threads in a thread pool is doing).

Question is if the socket was properly flushed before being closed so a response did not arrive correctly?



> ch.qos.logback.classic.net.SMTPAppender_SubethaSMTPTest hangs on Mac OS X
> -------------------------------------------------------------------------
>
>                 Key: LBCLASSIC-112
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-112
>             Project: logback-classic
>          Issue Type: Bug
>    Affects Versions: 0.9.16
>            Reporter: Joern Huxhorn
>            Assignee: Logback dev list
>         Attachments: logbackTestHang.txt
>
>
> This test keeps hanging repeatedly at the very same spot.
> I'll attach a file with further info.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list