[ https://issues.apache.org/jira/browse/JAMES-4039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848882#comment-17848882 ]
ilya terskov edited comment on JAMES-4039 at 5/23/24 8:38 AM: -------------------------------------------------------------- After server restarted incoming mailbox (one mail) was lost and all trashed mails was recovered in eM clinet 0 trashed mails in mailbird and thunder they exist was (Author: JIRAUSER305519): After server restarted incoming mailbox (one mail) was lost and all trashed mails was recovered > Unstable Mailbox > ---------------- > > Key: JAMES-4039 > URL: https://issues.apache.org/jira/browse/JAMES-4039 > Project: James Server > Issue Type: Bug > Components: James Core, mailbox > Affects Versions: 3.8.1 > Environment: debian 11, oracle jdk 21 > Reporter: ilya terskov > Priority: Major > > after i send some mail > smtp-source -A -C100 -r 1 -l 500 -m 5000 -s 20 -d -c -f a...@other.com -M > other.com -t it@kantarera.online 172.16.149.37:25 > server going work strange > eM Client cant get mails completly > Mailbird load all > Thunderbird load all > After i try delete some mails in Mailbird - they got deleted BUT > now eM Client see no mail (even trashed) > Thunder see all mails like it not beed trashed > Mailbird see mail as it supposed to be partly in Incoming mail and partly in > trashed > i tried restarting docker - not helping > logs about trashing in Maibird > 07:53:12.848 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:13.012 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:13.180 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:13.339 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:13.515 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:13.664 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:13.826 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:14.056 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:14.224 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:14.391 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:14.568 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:14.741 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:14.919 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:15.084 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:15.285 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > 07:53:15.471 [INFO ] o.a.j.u.AuditTrail - IMAP EXPUNGE succeeded. > logs errors > 07:53:12.847 [ERROR] o.a.j.e.d.InVmEventDelivery - Error while processing > listener > org.apache.openjpa.persistence.InvalidStateException: The context has been > closed. The stack trace at which the context was closed is available if > Runtime=TRACE logging is enabled. > at > org.apache.openjpa.kernel.BrokerImpl.assertOpen(BrokerImpl.java:4897) > at > org.apache.openjpa.kernel.BrokerImpl.beginOperation(BrokerImpl.java:2056) > at org.apache.openjpa.kernel.BrokerImpl.newQuery(BrokerImpl.java:3926) > at > org.apache.openjpa.kernel.DelegatingBroker.newQuery(DelegatingBroker.java:1426) > at > org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:1226) > at > org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:108) > at > org.apache.james.mailbox.jpa.mail.JPAMessageMapper.findMessagesInMailboxBetweenUIDs(JPAMessageMapper.java:459) > at > org.apache.james.mailbox.jpa.mail.JPAMessageMapper.findAsList(JPAMessageMapper.java:143) > at > org.apache.james.mailbox.jpa.mail.JPAMessageMapper.lambda$findInMailboxReactive$2(JPAMessageMapper.java:116) > at > com.github.fge.lambdas.supplier.SupplierChainer.lambda$sneakyThrow$195(SupplierChainer.java:74) > at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:46) > at > reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194) > 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) > also some log errors > 07:52:26.040 [ERROR] o.a.j.i.p.AbstractMailboxProcessor - Unexpected error > during IMAP processing > org.apache.openjpa.persistence.EntityNotFoundException: The instance of type > "class org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage" > with oid > "org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage-org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage$MailboxIdUidKey@2c37" > no longer exists in the data store. This may mean that you deleted the > instance in a separate transaction, but this context still has a cached > version. > at > org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:3279) > at > org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.java:3358) > at > org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManagerImpl.java:1747) > at > org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1678) > at > org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage.pcGetheader(JPAMailboxMessage.java) > at > org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage.getHeaderContent(JPAMailboxMessage.java:117) > at > org.apache.james.mailbox.store.ResultUtils.createHeaders(ResultUtils.java:156) > at > org.apache.james.mailbox.store.MessageResultImpl$HeadersImpl.headers(MessageResultImpl.java:376) > at > org.apache.james.imap.processor.fetch.FetchResponseBuilder.getHeaders(FetchResponseBuilder.java:416) > at > org.apache.james.imap.processor.fetch.FetchResponseBuilder.fields(FetchResponseBuilder.java:409) > at > org.apache.james.imap.processor.fetch.FetchResponseBuilder.bodyContent(FetchResponseBuilder.java:307) > at > org.apache.james.imap.processor.fetch.FetchResponseBuilder.bodyFetch(FetchResponseBuilder.java:298) > at > org.apache.james.imap.processor.fetch.FetchResponseBuilder.lambda$build$1(FetchResponseBuilder.java:148) > at > org.apache.james.mailbox.NullableMessageSequenceNumber.fold(NullableMessageSequenceNumber.java:62) > at > org.apache.james.imap.processor.fetch.FetchResponseBuilder.build(FetchResponseBuilder.java:125) > at > org.apache.james.imap.processor.fetch.FetchProcessor.toResponse(FetchProcessor.java:297) > at > org.apache.james.imap.processor.fetch.FetchProcessor.lambda$processMessageRanges$17(FetchProcessor.java:256) > at > reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:183) > at > reactor.core.publisher.FluxFilter$FilterSubscriber.onNext(FluxFilter.java:113) > at > reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.innerNext(FluxConcatMapNoPrefetch.java:258) > at > reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:863) > at > reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129) > at > reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:440) > at > reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:527) > at > reactor.core.scheduler.ImmediateScheduler$ImmediateSchedulerWorker.schedule(ImmediateScheduler.java:84) > at > reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.trySchedule(FluxPublishOn.java:312) > at > reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.onNext(FluxPublishOn.java:237) > at > reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.onNext(FluxSubscribeOn.java:151) > at > reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:335) > at > reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:294) > at > reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.requestUpstream(FluxSubscribeOn.java:131) > at > reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.onSubscribe(FluxSubscribeOn.java:124) > at > reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:201) > at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:83) > at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54) > at > reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194) > 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) > and some more errors > 07:46:02.619 [ERROR] o.a.j.e.d.InVmEventDelivery - Error while processing > listener > java.nio.channels.ClosedByInterruptException: null > at > java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(Unknown > Source) > at java.base/sun.nio.ch.FileChannelImpl.endBlocking(Unknown Source) > at java.base/sun.nio.ch.FileChannelImpl.readInternal(Unknown Source) > at java.base/sun.nio.ch.FileChannelImpl.read(Unknown Source) > at > org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:162) > ... 51 common frames omitted > Wrapped by: java.io.IOException: null: NIOFSIndexInput(path="/root/_2gs.tii") > at > org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:180) > at > org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:270) > at > org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:136) > at > org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:111) > at org.apache.lucene.store.DataOutput.copyBytes(DataOutput.java:132) > at > org.apache.lucene.index.CompoundFileWriter.copyFile(CompoundFileWriter.java:235) > at > org.apache.lucene.index.CompoundFileWriter.close(CompoundFileWriter.java:201) > at > org.apache.lucene.index.DocumentsWriter.flush(DocumentsWriter.java:604) > at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3587) > at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3552) > at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:450) > at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:399) > at org.apache.lucene.index.IndexReader.open(IndexReader.java:296) > at > org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.update(LuceneMessageSearchIndex.java:1259) > at > org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.lambda$update$4(LuceneMessageSearchIndex.java:1253) > at > com.github.fge.lambdas.runnable.RunnableChainer.doRun(RunnableChainer.java:18) > at > com.github.fge.lambdas.runnable.ThrowingRunnable.run(ThrowingRunnable.java:16) > ... 35 common frames omitted > Wrapped by: com.github.fge.lambdas.ThrownByLambdaException: > java.io.IOException: null: NIOFSIndexInput(path="/root/_2gs.tii") > at > com.github.fge.lambdas.runnable.ThrowingRunnable.run(ThrowingRunnable.java:20) > at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73) > at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32) > at > reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:253) > at > reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) > at reactor.core.publisher.MonoUsing.subscribe(MonoUsing.java:109) > at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) > at reactor.core.publisher.Mono.subscribe(Mono.java:4512) > at > reactor.core.publisher.MonoIgnorePublisher.subscribe(MonoIgnorePublisher.java:57) > at > reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:80) > at > reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46) > at reactor.core.publisher.Mono.subscribe(Mono.java:4496) > at > reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:430) > at > reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:335) > at > reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:294) > at > reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:373) > at > reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:201) > at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:83) > at reactor.core.publisher.Mono.subscribe(Mono.java:4512) > at > reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:430) > at > reactor.core.publisher.FluxArray$ArraySubscription.slowPath(FluxArray.java:126) > at > reactor.core.publisher.FluxArray$ArraySubscription.request(FluxArray.java:99) > at > reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:373) > at reactor.core.publisher.FluxMerge.subscribe(FluxMerge.java:73) > at > reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:76) > at > reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:264) > at > reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) > at > reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165) > at > reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:252) > at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) > at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) > 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) > sorry if too much logs -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org