[
https://issues.apache.org/jira/browse/JAMES-3915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735948#comment-17735948
]
René Cordier commented on JAMES-3915:
-------------------------------------
[https://github.com/apache/james-project/pull/1600] has been merged!
> NPE in LuceneMessageSearchIndex for MailboxEvents.Added while running imapsync
> ------------------------------------------------------------------------------
>
> Key: JAMES-3915
> URL: https://issues.apache.org/jira/browse/JAMES-3915
> Project: James Server
> Issue Type: Bug
> Affects Versions: 3.9.0
> Environment: Ran in docker container
> Reporter: Wojtek
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> While running imapsync, we encountered error
> {{o.a.j.e.d.EventDelivery$Retryer$BackoffRetryer - listener
> org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex exceeded
> maximum retry(8) to handle event org.apache.james.mailbox.even}}
> {{ts.MailboxEvents.Added}}
> There doesn't seem to be more information (i.e. which email triggered the
> issue). From the cursory check it seems that the message that would be added
> to the index is probably "faulty" so the header can't be properly parsed (?!)
> resulting in null.
> There is another tiny nuisance - before this finall exception/stacktrace,
> there are repeated "plain" stacktrace (I would guess the retries yielding the
> failure at retry) - is there a way to avoid the retry NPEs being logged and
> only leaving the final one (with retry failure)?
> Stacktrace (final entry):
> {{21:45:28.406 [ERROR] o.a.j.e.d.EventDelivery$Retryer$BackoffRetryer -
> listener org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex
> exceeded maximum retry(8) to handle event org.apache.james.mailbox.even}}
> {{ts.MailboxEvents.Added}}
> {{java.lang.NullPointerException: null}}
> {{ at java.base/java.io.ByteArrayInputStream.<init>(Unknown Source)}}
> {{ at
> org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage.getHeaderContent(JPAMailboxMessage.java:116)}}
> {{ at
> org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage.getFullContent(AbstractJPAMailboxMessage.java:492)}}
> {{ at
> org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage.getAttachments(AbstractJPAMailboxMessage.java:533)}}
> {{ at
> org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.hasAttachment(LuceneMessageSearchIndex.java:784)}}
> {{ at
> org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.createMessageDocument(LuceneMessageSearchIndex.java:576)}}
> {{ at
> org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.lambda$add$3(LuceneMessageSearchIndex.java:1261)}}
> {{ at
> com.github.fge.lambdas.runnable.RunnableChainer.doRun(RunnableChainer.java:18)}}
> {{ at
> com.github.fge.lambdas.runnable.ThrowingRunnable.run(ThrowingRunnable.java:16)}}
> {{ at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)}}
> {{ at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)}}
> {{ at
> reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:190)}}
> {{ ... 9 common frames omitted}}
> {{Wrapped by: reactor.core.Exceptions$RetryExhaustedException: Retries
> exhausted: 8/8}}
> {{ at reactor.core.Exceptions.retryExhausted(Exceptions.java:306)}}
> {{ at
> reactor.util.retry.RetryBackoffSpec.lambda$static$0(RetryBackoffSpec.java:68)}}
> {{ at
> reactor.util.retry.RetryBackoffSpec.lambda$null$4(RetryBackoffSpec.java:560)}}
> {{ at
> reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:183)}}
> {{ at
> reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)}}
> {{ at
> reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:471)}}
> {{ at
> reactor.core.publisher.SinkManyEmitterProcessor.tryEmitNext(SinkManyEmitterProcessor.java:269)}}
> {{ at
> reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:100)}}
> {{ at
> reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27)}}
> {{ at
> reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onError(FluxRetryWhen.java:190)}}
> {{ at
> reactor.core.publisher.MonoIgnoreElements$IgnoreElementsSubscriber.onError(MonoIgnoreElements.java:84)}}
> {{ at
> reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onError(MonoPeekTerminal.java:258)}}
> {{ at
> reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onError(FluxContextWrite.java:121)}}
> {{ at
> reactor.core.publisher.MonoUsing$MonoUsingSubscriber.onError(MonoUsing.java:260)}}
> {{ at
> reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onError(MonoIgnoreThen.java:278)}}
> {{ at
> reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:241)}}
> {{ at
> reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:315)}}
> {{ at
> reactor.core.publisher.MonoIgnoreElements$IgnoreElementsSubscriber.onError(MonoIgnoreElements.java:84)}}
> {{ at
> reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.maybeOnError(FluxConcatMapNoPrefetch.java:326)}}
> {{ at
> reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:211)}}
> {{ at
> reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:440)}}
> {{ at
> reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:527)}}
> {{ at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)}}
> {{ at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)}}
> {{ at java.base/java.util.concurrent.FutureTask.run(Unknown Source)}}
> {{ at
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
> Source)}}
> {{ at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)}}
> {{ at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)}}
> {{ at java.base/java.lang.Thread.run(Unknown Source)}}
> Stacktrace (repeating NPEs):
> {{21:45:19.638 [ERROR] o.a.j.e.d.InVmEventDelivery - Error while processing
> listener}}
> {{java.lang.NullPointerException: null}}
> {{ at java.base/java.io.ByteArrayInputStream.<init>(Unknown Source)}}
> {{ at
> org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage.getHeaderContent(JPAMailboxMessage.java:116)}}
> {{ at
> org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage.getFullContent(AbstractJPAMailboxMessage.java:492)}}
> {{ at
> org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage.getAttachments(AbstractJPAMailboxMessage.java:533)}}
> {{ at
> org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.hasAttachment(LuceneMessageSearchIndex.java:784)}}
> {{ at
> org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.createMessageDocument(LuceneMessageSearchIndex.java:576)}}
> {{ at
> org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.lambda$add$3(LuceneMessageSearchIndex.java:1261)}}
> {{ at
> com.github.fge.lambdas.runnable.RunnableChainer.doRun(RunnableChainer.java:18)}}
> {{ at
> com.github.fge.lambdas.runnable.ThrowingRunnable.run(ThrowingRunnable.java:16)}}
> {{ at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)}}
> {{ at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)}}
> {{ at
> reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:190)}}
> {{ at
> reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:440)}}
> {{ at
> reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:527)}}
> {{ at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)}}
> {{ at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)}}
> {{ at java.base/java.util.concurrent.FutureTask.run(Unknown Source)}}
> {{ at
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
> Source)}}
> {{ at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)}}
> {{ at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)}}
> {{ at java.base/java.lang.Thread.run(Unknown Source)}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]