pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

'sudo' built w/GCC10 on netbsd-9/i386 dies w/SIGILL



I started using pkgsrc "lang/gcc10" as the pkgsrc compiler on netbsd-9/i386
(and amd64).  I've only now updated one other netbsd-9/i386  system with the
resulting packages.  On the build host with:

$ sudo cpuctl identify 0
cpu0: highest basic info 0000000a
cpu0: highest extended info 80000008
cpu0: "Intel(R) Core(TM)2 Quad  CPU   Q8200  @ 2.33GHz"
cpu0: Intel Xeon 31xx, 33xx, 52xx, 54xx, Core 2 Quad 8xxx and 9xxx (686-class), 2327.58 MHz
cpu0: family 0x6 model 0x17 stepping 0x7 (id 0x10677)
cpu0: features 0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE>
cpu0: features 0xbfebfbff<MCA,CMOV,PAT,PSE36,CLFSH,DS,ACPI,MMX,FXSR,SSE,SSE2>
cpu0: features 0xbfebfbff<SS,HTT,TM,PBE>
cpu0: features1 0x8e39d<SSE3,DTES64,MONITOR,DS-CPL,EST,TM2,SSSE3,CX16,xTPR>
cpu0: features1 0x8e39d<PDCM,SSE41>
cpu0: features2 0x20100000<XD,EM64T>
cpu0: features3 0x1<LAHF>
cpu0: I-cache: 32KB 64B/line 8-way, D-cache: 32KB 64B/line 8-way
cpu0: L2 cache: 2MB 64B/line 8-way
cpu0: 64B prefetching
cpu0: ITLB: 128 4KB entries 4-way, 8 2M & 4 4M entries
cpu0: DTLB: 256 4KB entries 4-way, 16 4MB entries 4-way
cpu0: Initial APIC ID 0
cpu0: Cluster/Package ID 0
cpu0: Core ID 0
cpu0: SMT ID 0
cpu0: MONITOR/MWAIT extensions 0x3<EMX,IBE>
cpu0: monitor-line size 64
cpu0: C1 substates 2
cpu0: DSPM-eax 0x1<DTS>
cpu0: DSPM-ecx 0x1<HWF,NTDC=0x0>
cpu0: SEF highest subleaf 00000000
cpu0: Power Management features: 0x0
cpu0: Perfmon: Ver. 2
cpu0: Perfmon: General: bitwidth 40, 2 counters
cpu0: Perfmon: General: avail 0x7f<CORECYCL,INST,REFCYCL,LLCREF,LLCMISS,BRINST>
cpu0: Perfmon: General: avail 0x7f<BRMISPR>
cpu0: Perfmon: Fixed: bitwidth 40, 3 counters
cpu0: Perfmon: Fixed: avail 0x7<INST,CLK_CORETHREAD,CLK_REF_TSC>
cpu0: microcode version 0x70a, platform ID 4

running a full netbsd-9/i386 install with PAE-enabled kernel, all runs
as expected.

On a Soekris net4501 with:

# cpuctl identify 0
cpu0: highest basic info 00000001
cpu0: highest extended info 00000000
cpu0: AMD Am5x86 W/B 133/160 (486-class)
cpu0: family 0x4 model 0xf stepping 0x4 (id 0x4f4)
cpu0: features 0x1<FPU>
cpu0: Initial APIC ID 0

using 'sudo' fails with "Illegal instruction".  Becoming "root" with
'su' and running 'sudo' produces a core dump but it, so far, resists
analysis with 'gdb':

Core was generated by `sudo'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x00006fc0 in ?? ()
(gdb) bt
#0  0x00006fc0 in ?? ()
#1  0xbb739f5d in ?? ()
#2  0xbb7b1f11 in ?? ()
#3  0xbfbfe3d7 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Attempting 'dissassemble' with any of the above addresses results in:

  No function contains specified address.

Attempting 'disassemble' dereferencing any of the above addresses (*0xf00)
results in:

  Cannot access memory at address 0xf00


Since it has no run-time dependencies on pkgsrc GCC10 or other packages
built with pkgsrc GCC10, the workaround is to build "security/sudo" with
the stock GCC 7.5.0 from the "comp.tgz" set for netbsd-9 (9.3_STABLE).

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Home | Main Index | Thread Index | Old Index