Open swift-ci opened 6 years ago
Crashes at run time or crashes while trying to compile?
Comment by Mark Lilback (JIRA)
I'm having the same problem when I try running the program on a docker image.
import Foundation
let df = ISO8601DateFormatter()
let date = Date()
print ("date is \(df.string(from: date))")
This works fine on my development machine, but when I deploy it on DigitalOcean I get a crash. The exit code is 132, which I think means certain sse4_2 isn't supported.
This is with 16.04 and the 4.2 2018-07-17 snapshot. This is repeatable with:
# docker run -it library/ubuntu:xenial
root@5c66435cd9bf:/# apt-get update
root@5c66435cd9bf:/# apt-get install clang libicu-dev libcurl4-openssl-dev libxml2
root@5c66435cd9bf:/# curl -O https://swift.org/builds/swift-4.2-branch/ubuntu1604/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-07-17-a/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-07-17-a-ubuntu16.04.tar.gz
root@5c66435cd9bf:/# tar zxf swift-4.2-DEVELOPMENT-SNAPSHOT-2018-07-17-a-ubuntu16.04.tar.gz
root@5c66435cd9bf:/# export PATH=swift-4.2-DEVELOPMENT-SNAPSHOT-2018-07-17-a-ubuntu16.04/usr/bin:$PATH
root@5c66435cd9bf:/# swiftc -o foo foo.swift
root@5c66435cd9bf:/# ./foo
Illegal instruction (core dumped)
This crashes on my local skylake i5 and on DigitalOcean.
Comment by Tobias H (JIRA)
Because I also just ran into this crash on latest Swift 5.3.2:
This crash is caused by missing timezone data. If you install package tzdata
, the date formatter should work.
Environment
- Ubuntu 16.04 - Swift 4.0.2Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 2aec1d2e6e554c6b049c1480090dda9fIssue Description:
Hi,
the following code does work without problems on macOS - but crashes on Linux