Project

General

Profile

Actions

Bug #2755

closed

ndnsec error: executing ndnsec key-gen id: Illegal Instruction

Added by Anche Kuo about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Security
Target version:
Start date:
04/17/2015
Due date:
% Done:

0%

Estimated time:

Description

I am working with ndn on Galileo.

When executing ndnsec key-gen id
An error message occur, saying Illegal Instruction

I can't have this error because nfd-start need this.
Also, I am not sure which exactly function gave this error?
I am guessing it is KeyChain::generateKeyPair called by keyChain.generateRsaKeyPair
Also what does this error message mean? I do have sqlite3 installed on my Galileo and is runnable.

Also, I am executing everything with root identity.

Actions #1

Updated by Junxiao Shi about 9 years ago

  • Category changed from Management to Security

Please obtain a stacktrace with GDB, so that you can see which function throws.

Actions #2

Updated by Anche Kuo about 9 years ago

gdb is a monstrous thing for an embedded system @@
If I really have to guess I'll do it.

But any guess? Is this message a very common error message? It is strictly related to operation on sqlite? or any other guess?

Actions #3

Updated by Davide Pesavento about 9 years ago

Anche Kuo wrote:

gdb is a monstrous thing for an embedded system @@

Learn how to use gdbserver...

In any case this is not a thrown exception. It's the SIGILL signal, meaning that the program is trying to execute an invalid instruction (e.g. garbage or an instruction not supported by the current CPU), or a privileged instruction. Most likely the cross-compilation was done incorrectly (e.g. you targeted the wrong ISA), or there was a stack overflow.

Actions #4

Updated by Anche Kuo about 9 years ago

Most likely the cross-compilation was done incorrectly (e.g. you targeted the wrong ISA), or there was a stack overflow.

I've checked my environment, and it is not clear where I might be wrong... After all Yocto BSP is provided by Intel specifically for their Galileo..

In any case, do you think I can cross compile the ndn-cxx libraries with local python? Because in my cross compilation environment, many python module are missing, so I decided to just use the python from my local machine (I thought it's fine, because waf is only a make tool..)


export PYTHONHOME=/usr


/usr/bin/python waf configure --with-cryptopp=$PKG_CONFIG_SYSROOT_DIR --boost-includes=$PKG_CONFIG_SYSROOT_DIR/usr/include/ --boost-libs=$PKG_CONFIG_SYSROOT_DIR/usr/lib/ --prefix=$PKG_CONFIG_SYSROOT_DIR/usr/

Could this be the cause of problem?

Actions #5

Updated by Anche Kuo about 9 years ago

Problem resolved
After analyzing core dump the problem is with cryptopp's Makefile.

Delete a few lines in the makefile and recompile everything worked

Actions #6

Updated by Anche Kuo about 9 years ago

The solution is here
http://schwannden.gitbooks.io/ndn-on-galileo/content/building_ndn.html
basically libcryptopp's makefile appends -march=native to CXXFLAGS, overwriting -march=i586 from environment-setup-i586-poky-linux-uclibc. After deleting some lines, the compiled libary should work correctly.

Actions #7

Updated by Junxiao Shi about 9 years ago

  • Status changed from New to Rejected

Not a Bug. see note-6

Actions

Also available in: Atom PDF