cdsteinkuehler/QuartusBuildVMs

Quartus failed to run in Docker

LinuxFanatic777 opened this issue · 2 comments

Hello!
I tried to run more recent version of Quartus 17.x (free edition) inside Docker version 17.06.2-ce, build cec0b72. It fails in quartus_map:

Info: *******************************************************************
Info: Running Quartus Prime Analysis & Synthesis
    Info: Version 17.0.0 Build 595 04/25/2017 SJ Lite Edition
    Info: Processing started: Wed Sep  6 09:35:48 2017
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off test_autobuild -c test_autobuild
*** Error in `quartus_map': free(): invalid pointer: 0x00007f50beec49a0 ***
Error (293007): Current module quartus_map ended unexpectedly. Verify that you have sufficient memory available to compile your design. You can view disk space and physical RAM requirements on the System and Software Requirements page of the Intel FPGA website (http://dl.altera.com/requirements/).

GDB says it crash here. Docker base image is Ubuntu 14.04.5 LTS however on latest Debian 8.x error is absolutely same. Debian in VirtualBox do not have such problem. It looks like fail in udev subsystem when license manager attempts to check hist id (network card is presented inside Docker as eth0). Or should I directly tell to Quartus that I'm using free version and license check is not needed?

Info: Command: quartus_map --read_settings_files=on --write_settings_files=off test_autobuild -c test_autobuild
[New Thread 0x7fffb2619700 (LWP 67)]
*** Error in `/root/intelFPGA_lite/17.0/quartus/linux64/quartus_map': free(): invalid pointer: 0x00007fffb0e8c9a0 ***

Program received signal SIGABRT, Aborted.
0x00007fffb70b2c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt full
#0  0x00007fffb70b2c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
        resultvar = 0
        pid = 63
        selftid = 63
#1  0x00007fffb70b6028 in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x7fffca79c4b8, sa_sigaction = 0x7fffca79c4b8}, sa_mask = {__val = {0, 140737488335744, 
              140737488335840, 140733193388079, 140737488335904, 140737488335824, 9, 0, 140736304849300, 38654705664, 0, 0, 0, 140736191780344, 0, 
              140736160014520}}, sa_flags = 0, sa_restorer = 0x7fffb7e763f8 <std::string::_Rep::_S_empty_rep_storage+24>}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007fffb70ef2a4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fffb7201310 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
        ap = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7fffffffb600, reg_save_area = 0x7fffffffb590}}
        fd = 9
        on_2 = <optimized out>
        list = <optimized out>
        nlist = <optimized out>
        cp = <optimized out>
        written = <optimized out>
#3  0x00007fffb70fb82e in malloc_printerr (ptr=<optimized out>, str=0x7fffb71fd45e "free(): invalid pointer", action=1) at malloc.c:4998
        buf = "00007fffb0e8c9a0"
        cp = <optimized out>
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3842
        size = <optimized out>
        fb = <optimized out>
        nextchunk = <optimized out>
        nextsize = <optimized out>
        nextinuse = <optimized out>
        prevsize = <optimized out>
        bck = <optimized out>
        fwd = <optimized out>
        errstr = <optimized out>
        locked = <optimized out>
#5  0x00007fffb09a846f in udev_device_unref () from /lib/x86_64-linux-gnu/libudev.so.1
No symbol table info available.
#6  0x00007fffb09ab871 in ?? () from /lib/x86_64-linux-gnu/libudev.so.1
No symbol table info available.
#7  0x00007fffb09aba4e in ?? () from /lib/x86_64-linux-gnu/libudev.so.1
No symbol table info available.
#8  0x00007fffb09ac280 in udev_enumerate_scan_devices () from /lib/x86_64-linux-gnu/libudev.so.1
No symbol table info available.
#9  0x00007fffbfb2dac7 in ?? () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#10 0x00007fffbfb2df29 in Ox3476f8750e1da711 () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#11 0x00007fffbfaff806 in ?? () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#12 0x00007fffbfaff338 in Ox3476f8367c6535b1 () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#13 0x00007fffbfaefe68 in ?? () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#14 0x00007fffbfaf05d7 in lc_getid_type () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#15 0x00007fffbfaa2f23 in cpt_flexlm_get_local_hostid_by_type () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#16 0x00007fffbfaa3074 in cpt_flexlm_get_local_hostid () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#17 0x00007fffbfa86591 in CPT_FLEXLM_MGR::get_local_hostid(CPT_HOSTID_TYPE, std::vector<std::string, std::allocator<std::string> >*) ()
   from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#18 0x00007fffbfa8a86e in CPT_MANAGER::get_local_hostid(CPT_HOSTID_TYPE, std::vector<std::string, std::allocator<std::string> >*) ()
   from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.
#19 0x00007fffbfa8c88c in cpt_get_unique_id() () from /root/intelFPGA_lite/17.0/quartus/linux64/libsys_cpt.so
No symbol table info available.

This is not the Quartus support forum, try asking Intel.

For anyone who stumbles upon this:
This issue happens when there is no physical NIC in the docker instance. Docker flag --net=host will fix the issue. Quartus licence check requires a physical NIC in order to get a MAC address for the licence check. Without --net=host, all the interfaces are virtual. (As a bonus, when running docker in AWS Codebuild, Add a VPC to the instance to create a physical NIC, otherwise it will also fail this way).