Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Tom_K_1
Beginner
313 Views

Segmentation fault with icc 16.0.3 on Ubuntu

Hi,

I'm having trouble compiling code with icc 2016 update 3 on a clean install of 64-bit Ubuntu 16.04 [icc version 16.0.3 (gcc version 5.0.0 compatibility)]. In many (but by no means all) cases it produces a binary which immediately gives a segfault on execution. The simplest case I have found occurs when compiling with the flag -lirng, but I think it is a deeper problem as I have also observed it in other circumstances when -lirng is not used.

Steps to reproduce:

main.c:

#include <stdio.h>

int main() {
   printf("Hello\n");
   return 0;
};

 

Then

 

icc main.c -o main.x -lirng
./main.x 
Segmentation fault (core dumped)

 

LD_LIBRARY_PATH is:

/opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64:
/opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64:
/opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/intel64/lib:
/opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/mic/lib:
/opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64:
/opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64_lin:
/opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/intel64/lib:
/opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/mic/lib:
/opt/intel/compilers_and_libraries_2016.3.210/linux/ipp/lib/intel64:
/opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64:
/opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64:
/opt/intel/compilers_and_libraries_2016.3.210/linux/tbb/lib/intel64/gcc4.4:
/opt/intel/debugger_2016/libipt/intel64/lib:
/opt/intel/compilers_and_libraries_2016.3.210/linux/daal/lib/intel64_lin:
/opt/intel/compilers_and_libraries_2016.3.210/linux/daal/../tbb/lib/intel64_lin/gcc4.4:
/opt/intel/compilers_and_libraries_2016.3.210/linux/daal/../compiler/lib/intel64_lin

 

The gdb backtrace is as follows:

Starting program: /home/twk/tmp/executable-3/main.x 

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff720b729 in ?? ()
(gdb) bt
#0  0x00007ffff720b729 in ?? ()
#1  0x00007ffff7de4423 in elf_machine_rela (skip_ifunc=<optimised out>, reloc_addr_arg=<optimised out>, version=0x0, sym=<optimised out>, 
    reloc=0x7ffff6d12e38, map=0x7ffff7fdba08) at ../sysdeps/x86_64/dl-machine.h:310
#2  elf_dynamic_do_Rela (skip_ifunc=<optimised out>, lazy=<optimised out>, nrelative=<optimised out>, relsize=<optimised out>, 
    reladdr=<optimised out>, map=0x7ffff7fdba08) at do-rel.h:170
#3  _dl_relocate_object (scope=<optimised out>, reloc_mode=<optimised out>, consider_profiling=<optimised out>, consider_profiling@entry=0)
    at dl-reloc.c:258
#4  0x00007ffff7ddaf5b in dl_main (phdr=<optimised out>, phnum=<optimised out>, user_entry=<optimised out>, auxv=<optimised out>) at rtld.c:2072
#5  0x00007ffff7df0462 in _dl_sysdep_start (start_argptr=start_argptr@entry=0x7fffffffcac0, dl_main=dl_main@entry=0x7ffff7dd89a0 <dl_main>)
    at ../elf/dl-sysdep.c:249
#6  0x00007ffff7ddbe7a in _dl_start_final (arg=0x7fffffffcac0) at rtld.c:307
#7  _dl_start (arg=0x7fffffffcac0) at rtld.c:413
#8  0x00007ffff7dd7cc8 in _start () from /lib64/ld-linux-x86-64.so.2
#9  0x0000000000000001 in ?? ()
#10 0x00007fffffffcee1 in ?? ()
#11 0x0000000000000000 in ?? ()

 

ldd ./main.x:
	linux-vdso.so.1 =>  (0x00007fff9df23000)
	libirng.so => /opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64/libirng.so (0x00007fee66312000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fee65ff0000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fee65dda000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fee65a10000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fee6580c000)
	libintlc.so.5 => /opt/intel/compilers_and_libraries_2016.3.210/linux/compiler/lib/intel64/libintlc.so.5 (0x00007fee655a0000)
	/lib64/ld-linux-x86-64.so.2 (0x000056146db8f000)

 

I appreciate that Ubuntu 16.04 is not yet officially supported by the Intel compilers, but I would be very grateful if you could confirm you see the same problem and let me know if there is any workaround for the issue.

0 Kudos
9 Replies
Anoop_M_Intel
Employee
313 Views

Hi Tom,

We are working on getting the env for Ubuntu 16.04 setup and reproduce this problem.

Thanks and Regards
Anoop

bernaske
New Contributor I
313 Views

Hi,

i have compile the Sample with the icc 17.0 from Intel Parallel Studio XE Beta update 1 on following Linux OS:

1) openSUSE 13.3 64 Bit Tumbleweed Kernel 4.6.2

2) openSUSE Leap 42.1 / 42.2 64 Bit

3) SUSE Enterprise Server 12 SP 1

and 4) Fedora 23  no Problems , no Errors all works fine , i think its seems a Problem from Ubuntu 16.04

Regards

Franz

 

Anoop_M_Intel
Employee
313 Views

We can reproduce this problem and have notified the compiler engineering on this. Thanks for reporting this issue. Once we are officially compatible with Ubuntu 16.04, this problem should go away. Will keep you posted when we start supporting Ubuntu 16.04.

Thanks and Regards
Anoop

Tom_K_1
Beginner
313 Views

Thanks for looking into this Anoop. Do you know if the plan is to make Intel 2016 officially compatible with Ubuntu 16.04 via an update or will this start with Intel 2017? (and is there an estimated release date for 2017?)

Thanks,

Tom

Michael_D_13
Beginner
313 Views

Hi,

I am experiencing the same issue. Spent a long time debugging this only to land up here :(

icc (ICC) 16.0.3 20160415

 

Thanks

Michael

 

PS: fwiw

icc (ICC) 15.0.6 20151119


works fine

Tom_K_1
Beginner
313 Views

Hi Michael,

I've found that falling back to 16.0.2 also avoids the problem if that helps.

Tom

Darrel_C_
Beginner
313 Views

Same issue here.  I'm in process of setting up a supported platform that also has a Phi coprocessor, but that is, unfortunately, several weeks away and I've been struggling with this issue for a month now.  I guess I'll fall back to 16.2 for the time being.

Mikko_V_
Beginner
313 Views

icc version 16.0.4 fails also... quite disappointing to see Intel ignoring this problem for so long :(

It is confined to linking stage, not using icc as linker works fine. i.e. using gcc with

 gcc -o test test.o -L/opt/intel/compilers_and_libraries_2016.4.258/linux/compiler/lib/intel64 -lintlc -lirng

works.

Not adding libirng.so avoids the issue as this seems to be related with the dynamic linker failing to initialize it and crashing when linked with icc. 

p.s.

besides this excellent example to isolate the issue this happens in "real" programs too e.g. wavpack. 

 

 

 

 

Mikko_V_
Beginner
313 Views

icc 17 does work so after some testing I found that replacing under compilers_and_libraries_2016.4.258/linux/compiler/lib/intel64_lin the file 

libintlc.so.5

with the one from 16.0.2 (perhaps best) or the newest 17.0.0 can fix this issue. Hopefully, no other problems are introduced... 

I have not tested but it is very likely the same must be done for the redistributable libraries as well.

Reply