Opened 5 years ago

Closed 4 years ago

#1287 closed defect (fixed)

3 Bote errors:ConcurrentExecutionException,TooSmallPackets

Reported by: user Owned by: str4d
Priority: minor Milestone: 0.9.21
Component: apps/plugins Version: 0.9.12
Keywords: I2P-Bote Cc:
Parent Tickets: Sensitive: no

Description

3 errors:

  • about unability to check for update (maybe this should only be logged if it happens repeatedly, not if eepproxy fails once or eepsite down. for the future it could even be thought about a p2p update where instrad of checking the eepsite, other bote nodes arequeried and only updates signed by a signer on a configurable list of trusted signers are accepted)
  • CEE
  • dunno how those too small packets come about, maybe it's during shutdown? Is it save to simply rm them? will they be redownloaded, or a packet once downloaded is deleted for good? I know received mails are deleted, but not sure it's on a per-packet basis or only once the mail is complete AND correctly assembled. Anyhow, bote should recover from that on its own
    20.05.14 23:39:41 ERROR [UpdateCheckr] i2p.bote.service.UpdateChecker: Can't check update URL: http://tjgidoycrw6s3guetge3kvrvynppqjmvqsosmtbmgqasa6vmsf6a.b32.i2p/i2pbote-update.xpi2p
    20.05.14 21:38:29 ERROR [UpdateCheckr] i2p.bote.service.UpdateChecker: Can't check update URL: http://tjgidoycrw6s3guetge3kvrvynppqjmvqsosmtbmgqasa6vmsf6a.b32.i2p/i2pbote-update.xpi2p
    20.05.14 20:38:09 ERROR [UpdateCheckr] i2p.bote.service.UpdateChecker: Can't check update URL: http://tjgidoycrw6s3guetge3kvrvynppqjmvqsosmtbmgqasa6vmsf6a.b32.i2p/i2pbote-update.xpi2p
    20.05.14 19:29:21 ERROR [onsole Jetty] i2p.bote.service.EmailChecker : Error while checking whether new mail has arrived.
         java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
         at java.util.concurrent.FutureTask.report(Unknown Source)
         at java.util.concurrent.FutureTask.get(Unknown Source)
         at i2p.bote.service.EmailChecker.newMailReceived(EmailChecker.java:158)
         at i2p.bote.I2PBote.newMailReceived(I2PBote.java:555)
         at i2p.bote.util.GeneralHelper.isNewMailReceived(GeneralHelper.java:315)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at javax.el.BeanELResolver.getValue(BeanELResolver.java:83)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
         at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
         at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:938)
         at i2p.bote.jsp.buttonFrame_jsp._jspx_meth_c_005fif_005f8(buttonFrame_jsp.java:824)
         at i2p.bote.jsp.buttonFrame_jsp._jspx_meth_c_005fif_005f4(buttonFrame_jsp.java:423)
         at i2p.bote.jsp.buttonFrame_jsp._jspService(buttonFrame_jsp.java:115)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
         at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
         at i2p.bote.web.CharsetFilter.doFilter(CharsetFilter.java:38)
         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
         at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
         at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
         at org.eclipse.jetty.server.Server.handle(Server.java:370)
         at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
         at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
         at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
         at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
         at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
         at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
         at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
         at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
         Caused by: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
         at java.util.concurrent.FutureTask.report(Unknown Source)
         at java.util.concurrent.FutureTask.get(Unknown Source)
         at i2p.bote.network.CheckEmailTask.call(CheckEmailTask.java:131)
         at i2p.bote.network.CheckEmailTask.call(CheckEmailTask.java:61)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         ... 3 more
         Caused by: java.util.ConcurrentModificationException
         at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
         at java.util.ArrayList$Itr.next(Unknown Source)
         at i2p.bote.network.kademlia.BucketManager.getAllUnlockedPeers(BucketManager.java:267)
         at i2p.bote.network.kademlia.ClosestNodesLookupTask.call(ClosestNodesLookupTask.java:106)
         at i2p.bote.network.kademlia.KademliaDHT.getClosestNodes(KademliaDHT.java:178)
         at i2p.bote.network.kademlia.KademliaDHT.find(KademliaDHT.java:261)
         at i2p.bote.network.kademlia.KademliaDHT.findAll(KademliaDHT.java:188)
         at i2p.bote.network.CheckEmailTask$EmailPacketTask.run(CheckEmailTask.java:201)
         at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
         ... 4 more
    20.05.14 18:26:24 ERROR [ExpiratnThrd] i2p.bote.folder.Folder : Can't create a FolderElement from file: C:\ProgramData\Application Data\i2p\i2pbote\dht_email_pkt\pko46K5LXBn0-91y4A2a62mhvPsgDNOlTDtU4b~CGyQ=.pkt (file size=8192)
         i2p.bote.packet.MalformedPacketException: Can't instantiate packet for type code <E>
         at i2p.bote.packet.DataPacket.createPacket(DataPacket.java:104)
         at i2p.bote.packet.I2PBotePacket.createPacket(I2PBotePacket.java:118)
         at i2p.bote.packet.I2PBotePacket.createPacket(I2PBotePacket.java:90)
         at i2p.bote.folder.PacketFolder.createFolderElement(PacketFolder.java:85)
         at i2p.bote.folder.PacketFolder.createFolderElement(PacketFolder.java:42)
         at i2p.bote.folder.Folder$3.findNextElement(Folder.java:169)
         at i2p.bote.folder.Folder$3.next(Folder.java:150)
         at i2p.bote.folder.PacketFolder$1.next(PacketFolder.java:106)
         at i2p.bote.folder.PacketFolder$1.next(PacketFolder.java:90)
         at i2p.bote.folder.EmailPacketFolder.deleteExpired(EmailPacketFolder.java:143)
         at i2p.bote.service.ExpirationThread.run(ExpirationThread.java:53)
         Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedConstructorAccessor8.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at i2p.bote.packet.DataPacket.createPacket(DataPacket.java:101)
         ... 10 more
         Caused by: java.nio.BufferUnderflowException
         at java.nio.HeapByteBuffer.get(Unknown Source)
         at java.nio.ByteBuffer.get(Unknown Source)
         at i2p.bote.packet.dht.EncryptedEmailPacket.<init>(EncryptedEmailPacket.java:102)
         ... 14 more

Subtickets

Change History (6)

comment:1 Changed 5 years ago by str4d

Keywords: I2P-Bote added; bote removed
Milestone: 0.9.14
Owner: changed from HungryHobo to str4d
Status: newaccepted

Update checker has been dropped from trunk by HungryHobo (it was there before I2P did automatic plugin update checks).

Looking into the other errors.

Last edited 5 years ago by str4d (previous) (diff)

comment:2 Changed 5 years ago by str4d

Keywords: race added; packets removed

comment:3 Changed 4 years ago by str4d

Keywords: race removed

ConcurrentModificationException duplicated in #1586, fixed there.

Still looking into the BufferUnderflowException.

Last edited 4 years ago by str4d (previous) (diff)

comment:4 Changed 4 years ago by str4d

Milestone: 0.9.21

The MalformedPacketException error above is exactly that, an error when trying to read a packet from file. Generally this is unrecoverable. These fall into two categories:

  • DHT packets that are being stored by I2P-Bote for another user (the case in the error logs above)
  • Incomplete email packets that have been successfully decrypted after downloading from a remote user, but either the packet inside was originally corrupt, or the unencrypted packet is later corrupted on-disk.

DHT packets can be safely deleted because we can assume that the packet was either corrupted during network transfer to us (but has been safely stored with another I2P-Bote node), or was corrupt from the beginning and shouldn't be stored at all.

Incomplete email packets, I'm not sure about. In most cases, emails are compressed prior to being split into packets, so if one of the packets is corrupted locally then the email is unrecoverable (because packets are deleted from the DHT as soon as they are fetched). But is there a case for potentially recovering some email data? Right now, nothing is ever deleted from the incomplete folder unless a full email has been formed, but this should probably be changed to deleting unused incomplete packets after 100 days (when the missing packets will have definitely been deleted from the DHT). Or possibly even sooner? Research is needed into the origin of these packets (whether from incomplete downloads, or packets from old emails being downloaded later from servers that didn't get the deletion request).

For now, I will delete malformed DHT packets, and leave the existing error for incomplete email packets.

comment:5 Changed 4 years ago by str4d

Status: acceptedtesting

Malformed DHT packets deleted in 3838fb2d792f8ff033b3dc5b94713f854f43538b.

comment:6 Changed 4 years ago by str4d

Resolution: fixed
Status: testingclosed

No further comments, so closing this (incomplete email packets will be handled separately later).

Note: See TracTickets for help on using tickets.