Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1893837 - swift crash with SIGILL when running from console
Summary: swift crash with SIGILL when running from console
Keywords:
Status: CLOSED DUPLICATE of bug 1888848
Alias: None
Product: Fedora
Classification: Fedora
Component: swift-lang
Version: 32
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ron Olson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-02 18:30 UTC by Sergei Nikulov
Modified: 2020-11-02 22:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-02 22:13:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sergei Nikulov 2020-11-02 18:30:40 UTC
Description of problem:

swift-lang crashed with SIGILL

Version-Release number of selected component (if applicable):

╰─$ uname -a
Linux zeus 5.8.16-200.fc32.x86_64 #1 SMP Mon Oct 19 14:17:16 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
╰─$ cat /etc/redhat-release 
Fedora release 32 (Thirty Two)

Swift version 5.3 (swift-5.3-RELEASE)


How reproducible:


Steps to Reproduce:
1. Open terminal
2. type swift hit Enter
3. Error: swift crashed with SIGILL

Actual results:

╰─$ swift                                                                                                           Stack dump:
0.      Program arguments: swift 
1.      Swift version 5.3 (swift-5.3-RELEASE)
 #0 0x0000000004d4017f llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/libexec/swift/bin/swift+0x4d4017f)
 #1 0x0000000004d3e430 llvm::sys::RunSignalHandlers() (/usr/libexec/swift/bin/swift+0x4d3e430)
 #2 0x0000000004d405a5 SignalHandler(int) (/usr/libexec/swift/bin/swift+0x4d405a5)
 #3 0x00007f2e02aeba90 __restore_rt (/lib64/libpthread.so.0+0x14a90)
 #4 0x00000000018b3db7 std::vector<swift::DiagnosticState::Behavior, std::allocator<swift::DiagnosticState::Behavior> >::_M_fill_insert(__gnu_cxx::__normal_iterator<swift::DiagnosticState::Behavior*, std::vector<swift::DiagnosticState::Behavior, std::allocator<swift::DiagnosticState::Behavior> > >, unsigned long, swift::DiagnosticState::Behavior const&) (/usr/libexec/swift/bin/swift+0x18b3db7)
 #5 0x00000000018acfbf swift::DiagnosticState::DiagnosticState() (/usr/libexec/swift/bin/swift+0x18acfbf)
 #6 0x00000000004eb75c run_driver(llvm::StringRef, llvm::ArrayRef<char const*>) (/usr/libexec/swift/bin/swift+0x4eb75c)
 #7 0x00000000004eab1d main (/usr/libexec/swift/bin/swift+0x4eab1d)
 #8 0x00007f2e02540042 __libc_start_main (/lib64/libc.so.6+0x27042)
 #9 0x00000000004ea6ae _start (/usr/libexec/swift/bin/swift+0x4ea6ae)
[1]    32380 illegal hardware instruction (core dumped)  swift


Expected results:

swift runs without any issues

Additional info:

╰─$ dmesg

[32471.077389] traps: swift[29919] trap invalid opcode ip:18b3db7 sp:7ffdb44a5ce0 error:0 in swift[400000+71af000]


My CPU is AMD Phenom, so maybe this is an issue

╰─$ cat /proc/cpuinfo                                                                                               132 ↵
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Phenom(tm) II P960 Quad-Core Processor
stepping        : 3
microcode       : 0x10000c8
cpu MHz         : 1800.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 3590.82
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Phenom(tm) II P960 Quad-Core Processor
stepping        : 3
microcode       : 0x10000c8
cpu MHz         : 1300.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 4
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 3590.82
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 2
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Phenom(tm) II P960 Quad-Core Processor
stepping        : 3
microcode       : 0x10000c8
cpu MHz         : 800.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 4
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 3590.82
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 3
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Phenom(tm) II P960 Quad-Core Processor
stepping        : 3
microcode       : 0x10000c8
cpu MHz         : 800.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 3590.82
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

Comment 1 Ron Olson 2020-11-02 22:13:22 UTC
This is the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1888848. The crux of the issue is that the AMD processor is lacking SSSE3 support. I have successfully built and tested a version that is patched to work with older AMD processors and have offered a COPR repo for it; I've been working with upstream to see what might be feasible; the lowest common denominator processor set by the build script is for an Intel Core 2 Duo, which does suppose SSSE3 instructions.

*** This bug has been marked as a duplicate of bug 1888848 ***


Note You need to log in before you can comment on or make changes to this bug.