Opened 3 years ago

Closed 3 years ago

#2196 closed defect (fixed)

Fresh installation of I2P on Raspberry Pi cannot seed any nodes (ConcurrentModificationException on removeBlacklistedCerts)

Reported by: foobar Owned by: zzz
Priority: blocker Milestone: 0.9.34
Component: api/crypto Version: 0.9.33
Keywords: Cc:
Parent Tickets: Sensitive: no



I installed I2P on a fresh installation of a Raspberry Pi 3. It runs newest Raspbian:

# cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION="9 (stretch)"

I use the official debian packages:

# cat /etc/apt/sources.list.d/i2p.list 
deb stretch main
deb-src stretch main

It runs 0.9.33:

# dpkg --list | grep i2p
ii  i2p                             0.9.33-1ubuntu1              all          Anonymous network (I2P)
ii  i2p-keyring                     2017.09.21                   all          GnuPG keys of the I2P package repository
ii  i2p-router                      0.9.33-1ubuntu1              all          Router for I2P

Now when I2P starts the first time, it tries to seed from the default list of URls. This fails:

2018/03/31 19:36:34 | --> Wrapper Started as Daemon
2018/03/31 19:36:34 | Java Service Wrapper Community Edition 32-bit 3.5.30
2018/03/31 19:36:34 |   Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
2018/03/31 19:36:34 |
2018/03/31 19:36:34 | 
2018/03/31 19:36:34 | Launching a JVM...
2018/03/31 19:36:35 | WrapperManager: Initializing...
2018/03/31 19:36:37 | Starting I2P 0.9.33-0-1ubuntu1
2018/03/31 19:36:38 | INFO: Locally optimized native BigInteger library loaded from file
2018/03/31 19:36:39 | Warning: Java version: 9-Raspbian OS: Linux arm 4.14.30-v7+
2018/03/31 19:36:39 | Warning: OpenJDK is not recommended for ARM. Use Oracle Java 8
2018/03/31 19:36:39 | Warning: Java 9 support is beta, and not recommended for general use
2018/03/31 19:36:40 | Reseed start
2018/03/31 19:36:40 | Reseeding from
2018/03/31 19:36:42 | Error reseeding from java.util.ConcurrentModificationException
2018/03/31 19:36:42 | Reseed got 0 router infos from with 1 errors
......repeats for every source......

From the router log:

31/03/2018, 19:56:22 ERROR [Reseed      ] uter.networkdb.reseed.Reseeder: Error reseeding from
	at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(
	at java.base/java.util.LinkedHashMap$
	at java.base/java.util.Collections$3.nextElement(
	at net.i2p.crypto.KeyStoreUtil.removeBlacklistedCerts(
	at net.i2p.crypto.KeyStoreUtil.loadSystemKeyStore(
	at net.i2p.util.SSLEepGet.initSSLContext(
	at net.i2p.util.SSLEepGet.<init>(
	at net.i2p.util.SSLEepGet.<init>(
	at net.i2p.util.SSLEepGet.<init>(
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.fetchURL(
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.reseedSU3OrZip(
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.reseedSU3(
	at net.i2p.router.networkdb.reseed.Reseeder$ReseedRunner.run2(
	at net.i2p.router.networkdb.reseed.Reseeder$
	at java.base/

Without looking at the code, looks like a removal from a Map without using an iterator.

This happens also if I manually add a URL. This means, I cannot bootstrap my router at all right now on this vanilla Raspberry Pi installation.


Change History (3)

comment:1 Changed 3 years ago by zzz

Component: unspecifiedapi/crypto
Milestone: undecided0.9.34
Owner: set to zzz
Status: newaccepted

Haven't seen before. I think Java 9 contains a reworked Keystore implementation. As it says in the logs, Java 9 support is beta.

I see what we're doing wrong, we're deleting certs inside the iterator. I'll get a fix in at the last minute for 0.9.34. As a workaround you could try Java 8, but no guarantees.

comment:2 Changed 3 years ago by zzz

Please provide full version information from top of /logs in the console.

comment:3 Changed 3 years ago by zzz

Resolution: fixed
Status: acceptedclosed

Could not reproduce with x86 OpenJDK build 9-Ubuntu+0-9b181-4 or build 1.8.0_151-8u151-b12-0ubuntu0.17.10.2-b12 before or after fix
Fixed in 8565203da08bdc697d0c755787df25f240527535 0.9.33-22-rc

Note: See TracTickets for help on using tickets.