Unsolved Cross-compiled application running on target gets killed and shows "Illegal Instruction".
-
Qt version : 4.8.6
Linux Kernel : 3.0.8
Arch : armv7l
I have cross compiled Qt 4.8.6 for my target and i have made an application which mainly runs on libQtCore, libQtGui, libQtNetwork, libQtScript and libQtWebkit. The application opens up, but gets SIGKILL when trying to connect to internet and shows "Illegal Instruction".I was having QtWebkit 2.2.0 before and i updated it to QtWebkit 2.3.4. With 2.2.0, the application was running fine, but some features were lacking. That is the reason for updating to 2.3.4.
Can anyone please guide me to what exactly is "Illegal Instruction" ?
-
@name_qt "Illegal Instruction" means that the executable or one of the libs contains machine instructions not supported by the CPU.
What doesfile EXECUTABLE file PATH_TO_LIB
say for your executable and all used libs/plug-ins?
-
@jsulm I apologise for the delay in replying.
I hope this is what you asked for.
Executable :webpage: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
Librarires :
libQtCore.so.4.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), stripped libQtWebKit.so.4.10.4: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped libQtNetwork.so.4.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped libQtGui.so.4.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped libsqlite3.so.0.8.6: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libjpeg.so.9.2.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libxml2.so.2.9.4: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libpng12.so.0.57.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libxslt.so.1.1.29: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
-
@name_qt Looks fine. You can start your app in GDB to see when/where it happens.
Also strace command can help (strace webpage). -
@jsulm I will post the outputs soon.
In between, can this issue have anything related to SSE2 and SSE ? -
@name_qt Well, SSE2 and SSE are not available on ARM, so if you see it in the output then yes it would be something to check.
-
@jsulm I used strace and this is where webpage is getting killed.
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x46f2e500} --- rt_sigaction(SIGILL, {sa_handler=SIG_DFL, sa_mask=[ILL], sa_flags=SA_RESTORER|SA_RESTART, sa_resto0 semctl(425985, 0, IPC_64|IPC_RMID, NULL) = 0 ioctl(11, KDSKBMODE, 0x2) = 0 ioctl(11, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0 ioctl(11, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0 close(11) = 0 ioctl(9, KDSETMODE, 0x1) = 0 write(9, "\33[9;15]\33[?33h\33[?25h\33[?0c\0", 25) = 25 close(9) = 0 tgkill(1694, 1694, SIGILL) = 0 sigreturn({mask=[]}) = 1182397424 --- SIGILL {si_signo=SIGILL, si_code=SI_TKILL, si_pid=1694, si_uid=0} --- +++ killed by SIGILL +++ Illegal instruction
Updation :
webpage is a widget which displays google.com. The widget opens up and google.com front page gets loaded. When i enter something in the search box and press enter, the widget is killed with "Illegal instruction". -
@name_qt What was before that part?
-
-
@name_qt It would be better to run your app in gdb.
-
@jsulm GDB
Starting program: /usr/bin/webpage -qws (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 0x40109000 (LWP 2281)] Program received signal SIGILL, Illegal instruction. [Switching to Thread 0x40109000 (LWP 2281)] 0x444924a0 in ?? ()
-
@name_qt Can you try with a debug build?
Also, after it crashed you can get backtrace with bt in GDB.