Opened 8 years ago

Closed 8 years ago

#500 closed defect (fixed)

builtin libjbigi crashes router on armel

Reported by: linuxkasten Owned by: zzz
Priority: major Milestone: 0.8.8
Component: router/general Version: 0.8.7
Keywords: Cc:
Parent Tickets:


On my Seagate dockstar (armel cpu), the builtin libjbigi crashes my I2P router on startup. Doesn't matter if I copy it into $I2P/ or leave it loading from inside jbigi.jar. Self-compiled version works. Maybe the library is big instead of little endian?

I2P version: 0.8.7-0
Java version: Sun Microsystems Inc. 1.6.0_18 (OpenJDK Runtime Environment 1.6.0_18-b18)
Platform: Linux arm 2.6.39-2-kirkwood
Processor: uninitialized (arm)
Jbigi: Locally optimized native BigInteger? library loaded from file
Encoding: ANSI_X3.4-1968


Attachments (2)

hs_err_pid19974.log (34.8 KB) - added by linuxkasten 8 years ago. (5.9 KB) - added by linuxkasten 8 years ago.

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by linuxkasten

comment:1 Changed 8 years ago by zzz

  • Owner set to zzz
  • Status changed from new to accepted
~/mtn/i2p.i2p/installer/lib/jbigi> file ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped

I compiled it on an NVidia Tegra (Trimslice).

Signal 4 is illegal instruction.

I assume that it's somehow used an instruction not available on your processor. Or, perhaps, some other bug, everything on the trimslice is beta. Maybe I need to recompile with different compiler arguments. I'm not an ARM expert. Any ideas? Are there differences in instruction set between your processor and mine?

comment:2 Changed 8 years ago by linuxkasten

I'm not an expert, too ;)
I built it on my armel system just using "./ dynamic" inside the core/c/jbigi folder. Maybe it helps if I upload my (unstripped) version ob

Changed 8 years ago by linuxkasten

comment:3 Changed 8 years ago by zzz

I have to find out how to set the compiler to generate instructions that can be used on a wide range of processors. And maybe find a tool to tell me what instructions are in a .so file so I can verify what I build. I think we need the "EABI" instructions.

comment:4 Changed 8 years ago by zzz

I'm a little suspicious of your at 6044 bytes when mine is 83592 bytes.

comment:5 Changed 8 years ago by zzz

Please paste here the output of 'cat /proc/cpuinfo'

comment:6 Changed 8 years ago by linuxkasten

cat /proc/cpuinfo
Processor       : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1191.11
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Seagate FreeAgent DockStar
Revision        : 0000
Serial          : 0000000000000000

May sound stupid, but did you already check the right endianess? "file" doesn't show it, right?

comment:7 Changed 8 years ago by linuxkasten

As I mentioned, mine is dynamically built:

ldd => /usr/lib/ (0x40076000) => /lib/arm-linux-gnueabi/ (0x400ed000)
        /lib/ (0x40040000)

Maybe yours is statically built, that would explain the difference in size.

You used a crosscompiler to generate it, right?

comment:8 Changed 8 years ago by zzz

It's clear that my armv7-compiled libs won't work on v5, and I can't figure out how to build v5-compatible libs on my trimslice, so KillYourTV is going to build v5 libs using qemu. And we're adding support in the installer and the router to detect what version is required and load the correct one.

Yes, everything is little-endian. 'file' says 'LSB'

No I didn't use a cross compiler, the trimslice is native arm.

comment:9 Changed 8 years ago by killyourtv

Perhaps this will work on your system: http://killyourtv.i2p/tmp/i2p-ARM-ONLY-0.8.7-19.jar This installer is 8.6MB and as the name implies it only includes the ARM wrapper/jbigi.

If you'd prefer you can try building it yourself following the instructions at .

In any case, if you can try this out and let us know how it goes it would be appreciated. :)

comment:10 Changed 8 years ago by killyourtv

A user on IRC stated that the installer that I linked above worked on his ARM box.

The release of 0.8.8 should fix this problem.

comment:11 Changed 8 years ago by zzz

  • Resolution set to fixed
  • Status changed from accepted to closed

Hopefully fixed in 0.8.8.

Note: See TracTickets for help on using tickets.