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

Joseph Witt commented on NIFI-2519:
-----------------------------------

[~ozhurakousky]
Patch that fixes max connections and enforces max data size is attached.

Also, got in a 'STOPPING' state again.  Thread dump results related to SMTP 
included

{quote}
"org.subethamail.smtp.server.Session-/127.0.0.1:61707" Id=88 TIMED_WAITING  on 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@26e92b1f
        at sun.misc.Unsafe.park(Native Method)
        at 
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
        at 
java.util.concurrent.ArrayBlockingQueue.offer(ArrayBlockingQueue.java:379)
        at 
org.apache.nifi.processors.email.SmtpConsumer.data(SmtpConsumer.java:134)
        at org.subethamail.smtp.command.DataCommand.execute(DataCommand.java:64)
        at 
org.subethamail.smtp.server.RequireTLSCommandWrapper.execute(RequireTLSCommandWrapper.java:30)
        at 
org.subethamail.smtp.server.CommandHandler.handleCommand(CommandHandler.java:99)
        at org.subethamail.smtp.server.Session.runCommandLoop(Session.java:244)
        at org.subethamail.smtp.server.Session.run(Session.java:145)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
        Number of Locked Synchronizers: 1
        - java.util.concurrent.ThreadPoolExecutor$Worker@508e2f01
{quote}

{quote}
"StandardProcessScheduler Thread-2" Id=62 TIMED_WAITING  on 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@499006ab
        at sun.misc.Unsafe.park(Native Method)
        at 
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
        at 
java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1465)
        at 
org.subethamail.smtp.server.ServerThread.shutdownSessions(ServerThread.java:239)
        at 
org.subethamail.smtp.server.ServerThread.shutdown(ServerThread.java:190)
        at org.subethamail.smtp.server.SMTPServer.stop(SMTPServer.java:310)
        - waiting on 
org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer@4bd2366c
        at 
org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer.stop(ListenSMTP.java:355)
        - waiting on 
org.apache.nifi.processors.email.ListenSMTP$ConsumerAwareSmtpServer@4bd2366c
        at org.apache.nifi.processors.email.ListenSMTP.stop(ListenSMTP.java:228)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at 
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
        at 
org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
        at 
org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotations(ReflectionUtils.java:233)
        at 
org.apache.nifi.util.ReflectionUtils.quietlyInvokeMethodsWithAnnotation(ReflectionUtils.java:85)
        at 
org.apache.nifi.controller.StandardProcessorNode$2.run(StandardProcessorNode.java:1326)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
        Number of Locked Synchronizers: 1
        - java.util.concurrent.ThreadPoolExecutor$Worker@75caecf7
{quote}

Also

1) There is no LICENSE and NOTICE information present in the nifi-email-nar.  
There definitely should be.  There are numerous jars from Spring and others 
that must be accounted for and if necessary needs to be rolled up to 
nifi-assembly as well.

2) Default throughput is pretty poor due to the yield call happening whenever 
there is no data.  The processor call to check for a message should do some 
short term polling/blocking of say 10-20ms rather than immediately return and 
yield.  This would give far more performance as evidenced by the gains in 
lowering yield to 10ms.

With the blocking fixed and items #1 and #2 addressed I think we're there.

Have a nice flow with this processor listenign to emails being fed to it at a 
decent clip, then doing ExtractEmailHEader and ExtractEmail Attachment.  Works 
great.

> TestListenSMTP ValidEmail fails during parallel build
> -----------------------------------------------------
>
>                 Key: NIFI-2519
>                 URL: https://issues.apache.org/jira/browse/NIFI-2519
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Joseph Witt
>            Assignee: Oleg Zhurakousky
>             Fix For: 1.0.0
>
>
> While running a full NiFi parallel build received the following. So there is 
> some test issue at least that is impacting build stability.
> [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ 
> nifi-email-processors ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 4 source files to 
> /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/test-classes
> [WARNING] 
> /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[122,24]
>  [deprecation] stop() in Thread has been deprecated
> [WARNING] 
> /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[186,24]
>  [deprecation] stop() in Thread has been deprecated
> [WARNING] 
> /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/test/java/org/apache/nifi/processors/email/TestListenSMTP.java:[307,24]
>  [deprecation] stop() in Thread has been deprecated
> [INFO] 
> [INFO] --- maven-compiler-plugin:3.2:testCompile (groovy-tests) @ 
> nifi-email-processors ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Nothing to compile - all classes are up to date
> [INFO] 
> [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ 
> nifi-email-processors ---
> [INFO] Surefire report directory: 
> /home/travis/build/apache/nifi/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/target/surefire-reports
> [INFO] Using configured provider 
> org.apache.maven.surefire.junit4.JUnit4Provider
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.nifi.processors.email.TestListenSMTP
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.473 sec <<< 
> FAILURE! - in org.apache.nifi.processors.email.TestListenSMTP
> ValidEmail(org.apache.nifi.processors.email.TestListenSMTP)  Time elapsed: 
> 0.038 sec  <<< FAILURE!
> java.lang.AssertionError: Sending email failed
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.assertTrue(Assert.java:41)
>       at org.junit.Assert.assertFalse(Assert.java:64)
>       at 
> org.apache.nifi.processors.email.TestListenSMTP.ValidEmail(TestListenSMTP.java:188)
> Running org.apache.nifi.processors.email.TestExtractEmailAttachments
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 sec - in 
> org.apache.nifi.processors.email.TestExtractEmailAttachments
> Running org.apache.nifi.processors.email.TestExtractEmailHeaders
> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 sec - 
> in org.apache.nifi.processors.email.TestExtractEmailHeaders
> Results :
> Failed tests: 
>   TestListenSMTP.ValidEmail:188 Sending email failed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to