@eyedeekay
&zzz
+R4SAS
+RN
+StormyCloud
+T3s|4
+acetone
+dr|z3d
+hk
+orignal
+postman
+radakayot
+snex
+weko
+wodencafe
Arch
BravoOreo
Dann
FreeB
FreefallHeavens_
Irc2PGuest11045
Irc2PGuest48814
Irc2PGuest59134
Irc2PGuest60478
Irc2PGuest7448
Irc2PGuest90968
Leopold
Onn4l7h
Onn4|7h
Sleepy_
Soni
T3s|4_
Teeed
aeiou
aisle
ardu
b3t4f4c3__
bak83_
dickless
dr4wd3
enoxa
eyedeekay_bnc_
hagen_
not_bob_afk
phil
plap
poriori
profetikla
qend-irc2p
rapidash
solidx66_
u5657
uop23ip
w8rabbit
x74a6h
zzz
but yeah, I'm out too, later...
eyedeekay
I was trying to figure out how to package docs together with the code, each directory has a README.md that contains the godoc and that call tree formatted
eyedeekay
\/tree/graph/
RN
net.i2p.router.JobQueueRunner : Error processing job [Handle Database Lookup Message] on thread 1: java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -8 is negative
RN
<Afkaid> java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -8 is negative
RN
anything of concern?
RN
taking an overdue look at my logs, and I have a crit with a negative length:
RN
CRIT [uildExecutor] uter.tunnel.pool.BuildExecutor: B0rked in the tunnel builder
RN
java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -9 is negative
RN
both mention arraycopy
RN
can add ntcp reader to the list
RN
doubt the value of the negative value matters but I can get the negative if it will add to a positive outcome
RN
</math_nerd_joke>
orignal
zzz, yes, I'm doing the same changes
dr|z3d
cannon or canon, RN?
Afkaid
CRIT [uildExecutor] uter.tunnel.pool.BuildExecutor: B0rked in the tunnel builder
Afkaid
java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -25 is negative
dr|z3d
is that normal I2P or I2P+, Afkaid?
Afkaid
normal
Afkaid
2.8.1-0
dr|z3d
if you've got a stack trace with the error, you might want to paste it on cake.i2p with a 24h expiry.
dr|z3d
looks like it relates to this method:
dr|z3d
/**
dr|z3d
* Calculate the hash and cache the result.
dr|z3d
* @param source what to hash
dr|z3d
*/
dr|z3d
public final Hash calculateHash(byte[] source, int start, int len) {
dr|z3d
MessageDigest digest = acquire();
dr|z3d
digest.update(source, start, len);
dr|z3d
byte rv[] = digest.digest();
dr|z3d
releaseit(digest);
dr|z3d
return Hash.create(rv);
dr|z3d
}
dr|z3d
or maybe the issue's upstream with java.. what java version?
Afkaid
Where do I find Java version?
dr|z3d
on /logs
Afkaid
17.0.14
Afkaid
The notification bubble on the left panel is nice to spot the critical errors :-)
dr|z3d
:)
Afkaid
good idea
dr|z3d
haven't implemented that in + yet. on the todo list.
Afkaid
I should try + one day
dr|z3d
are the errors you're seeing frequent?
dr|z3d
I just wonder if a java upgrade might be worth a try, 21 or 23 perhaps.
Afkaid
Since the 2.8.1-0 update, I saw the first one 2 times, and the second one 1 time
dr|z3d
ok, well, zzz will be around later and he'll have a look.
Afkaid
I don't see any newer version on the repository
dr|z3d
24 is technically current now, but your repo may not be offering newer versions.
Afkaid
yes
Afkaid
these errors appears after I played a bit with the parameters, increasing the bandwidth values and forcing floodfill
dr|z3d
probably not related.
Afkaid
ok, I have to go, good luck with this one!
dr|z3d
aight, laters o/
RN
dr|z3d, the three errors were from Canon. IDK already ACK.
RN
afkaid and I both saw them
zzz
I saw one similar to Afkaid's but different. RN, need your full stack trace
zzz
@@
zzz
oh wow I'm getting a lot of them on one router
zzz
hopefully the bubbles will help us catch things sooner
zzz
seeing it about once an hour on a high-traffic router, so I should be able to narrow it down soon
zzz
sadly, this will force a 2.8.2
dr|z3d
possibly the same issue? cake.i2p/view/SjjArX0zjp_9pU5JLiVbLfkIC1nDqhXmzCk8djwZf_seyDcOSc4w/SjjArX0zjp.txt
dr|z3d
this chunk of the stacktrace looks like it might be the root cause:
dr|z3d
| INFO | Compiling: 21331 4 java.lang.invoke.MethodType::methodType (69 bytes)
dr|z3d
| INFO | Compiling: 21324 ! 4 net.i2p.router.networkdb.kademlia.PersistentDataStore$ReadRouterJob::read (1423 bytes)
dr|z3d
| INFO | - waiting on <no object reference available>
dr|z3d
| INFO | - waiting on <no object reference available>
dr|z3d
| INFO | - parking to wait for <0x000000072c7340a0> (a java.util.concurrent.SynchronousQueue$Transferer)
dr|z3d
| INFO | - parking to wait for <0x00000006062f6d48> (a java.util.concurrent.SynchronousQueue$Transferer)
dr|z3d
| INFO | - locked <0x000000072dab92f0> (a net.i2p.client.streaming.impl.PacketLocal)
dr|z3d
| INFO | - locked <0x000000072d9cf3c0> (a java.lang.Object)
zzz
no
dr|z3d
different issue entirely then?
zzz
but I've looked at your PersistentDataStore mods recently, and I think they're deeply flawed, and in the wrong place
dr|z3d
only seeing this on a single router, haven't seen it elsewhere.
zzz
because I looked at doing what I think you're trying to do, which is not write out some RIs, and I would do it a lot differently
dr|z3d
ok, so at least conceptually we're on the same page, even if my implementation sucks :)
dr|z3d
and yeah, I'm trying to keep "uniniteresting" RIs off storage and in RAM only.
zzz
can't make heads or tails out of that paste but it seems to point to PersistentDataStore, maybe
dr|z3d
smells like it, not sure what no object reference available points to, maybe OS level fail. dunno.
RN
zzz, pm'd a cake link with some log snips... let me know if you neeed more :)
zzz
I'm good, look similar to the ones I have, thanks
zzz
drz, no time to do a full breakdown of your PDS mods but here's where I started as a simple alternative:
zzz
@@ -1441,6 +1446,9 @@ public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacad
zzz
// + new Date(routerInfo.getPublished()));
zzz
_context.peerManager().setCapabilities(key, routerInfo.getCapabilities());
zzz
+ // don't store old routers to disk
zzz
+ if (persist && VersionComparator.comp(routerInfo.getVersion(), StoreJob.MIN_STORE_VERSION) < 0)
zzz
+ persist = false;
zzz
_ds.put(key, routerInfo, persist);
zzz
if (rv == null)
zzz
_kb.add(key);
zzz
untested
zzz
well, tested not to explode, but not verified that it works
dr|z3d
ok, that looks vaguely similar to what I'm doing, in part at least.
zzz
was it right after startup? because if it was compiling PDS it must have been...
dr|z3d
I'm also not storing RIs to disk if they don't meet a b/w tier threshold iirc.
zzz
it it was at startup, restart and chalk it up to JVM insanity
zzz
I suggest you stare hard at PDS though to verify it's doing what you think it is
dr|z3d
doesn't appear that the error occurs right after startup, no.
zzz
and/or stare at your RI files on disk to verify it's excluding what you want it to
dr|z3d
though it might have been, the errors were repeating. some memory management issues on that box, might be related.
dr|z3d
I've started at those long enough to know it's doing what it should be. On startup, the netdb accurately reflects the filtered RIs.
dr|z3d
*stared
zzz
ok
zzz
it seems like the JVM ran out of... something?
dr|z3d
could be RAM, like I said, box is acting a bit strange, so probably something specific to that box.
zzz
ok, since I'm waiting for a router to restart, I'll give you one more clue on why I think it's bad code in PDS
zzz
in PDS.write() :
zzz
... calculate isOld, isBad, noSSU, isSlow, and a whole bunch of stuff....
dr|z3d
yup
zzz
if (dbFile.lastModified() < dataPublishDate) {
zzz
... write the file to disk ...
zzz
} else {
zzz
... deal with all your isXXX stuff and take actions...
zzz
}
zzz
so all your added code is only if you did NOT write the file to disk???
zzz
and, btw, that conditional should always be true, you're always writing new RIs to disk, so it seems like you would rarely hit all that code ever
dr|z3d
yeah, ok, I think I see what you mean. I probably want to check the various conditions at the top, ie if (dbFile.lastModified() < dataPublishDate && !isBanned etc etc)
dr|z3d
or just create a new boolean, isGood or something, and only write to disk if those conditions are met.
dr|z3d
otherwise, spit out the debug logs as before.
dr|z3d
thanks, I'll optimize and fix.
eyedeekay
What are you guys doing to reproduce the CRIT? I've got a reachable box on the release build, forced floodfill, high participating traffic, 1GB RAM for the JVM, can't seem to make it happen naturally
zzz
yeah drz it just seems wildly foobarred, and in the wrong place, put it in KNDF like my patch, putting policy down in PDS seems wrong
zzz
eyedeekay, what JVM are you on?
eyedeekay
17 on that machine, with the Debian package
zzz
I'm seeing a few per hour on the deb box which is Java 11, the other report was Java 17. Never seen on my boxes
eyedeekay
Ah you're looking at the deb box. I had a similar idea the machine I'm talking about is the git box
zzz
ok I just found the issue, will put up a -1-rc soon
eyedeekay
OK I'll be ready to look it over, ping me
zzz
it's related to using the SHA256's from the pool in Noise
zzz
we're doing a double-free of them back to the pool, so then we have two threads using the same SHA256 at once
dr|z3d
so needs a synchronized?
zzz
yes and a already-freed check
zzz
dunno why it's so common on some boxes and not others
zzz
the pool change was on Feb. 7 so I'm a little stumped on why it wasn't seen until after the release
dr|z3d
could be java version related? not seeing it at all here, I think I'm on at least 21 on all my boxes.
zzz
shouldn't be, but who knows