Open
Description
Description
Swift crashes trying to compile the default "Hello world" when running official swift:6.1.2-noble docker container on Synology DS1815+ DSM 7.1.1-42962 Update 8.
Reproduction
print("Hello, world!")
Stack dump
$ mkdir hello_world
$ cd hello_world
$ swift package init --name hello_world --type executable
Creating executable package: hello_world
Creating Package.swift
Creating .gitignore
Creating Sources/
Creating Sources/main.swift
$ swift run hello_world
error: 'hello_world': Invalid manifest (compiled with: ["/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.jPLkq3/vfs.yaml", "-L", "/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/usr/lib/swift/pm/ManifestAPI", "-swift-version", "6", "-I", "/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "6.1.0", "/mnt/hello_world/Package.swift", "-o", "/tmp/TemporaryDirectory.9L5xKT/hello_world-manifest"])
error: compile command failed due to signal 6 (use -v to see invocation)
Fatal glibc error: cannot get entropy for arc4random
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /usr/bin/swift-frontend -frontend -c -primary-file /mnt/hello_world/Package.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /usr/lib/swift/pm/ManifestAPI -vfsoverlay /tmp/TemporaryDirectory.jPLkq3/vfs.yaml -swift-version 6 -package-description-version 6.1.0 -empty-abi-descriptor -resource-dir /usr/lib/swift -module-name main -in-process-plugin-server-path /usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /usr/lib/swift/host/plugins -plugin-path /usr/local/lib/swift/host/plugins -o /tmp/TemporaryDirectory.FjOlGO/Package-1.o
1. Swift version 6.1.2 (swift-6.1.2-RELEASE)
2. Compiling with the current language version
3. While reading from module 'Swift', builder version '6.1.2(5.10)/Swift version 6.1.2 (swift-6.1.2-RELEASE)', built from source against SDK , resilient, loaded from '/usr/lib/swift/linux/Swift.swiftmodule/x86_64-unknown-linux-gnu.swiftmodule'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x00007f63a88eaca8
1 swift-frontend 0x00007f63a88e8a7e
2 swift-frontend 0x00007f63a88eb348
3 libc.so.6 0x00007f639fe69330
4 libc.so.6 0x00007f639fec2b2c pthread_kill + 284
5 libc.so.6 0x00007f639fe6927e gsignal + 30
6 libc.so.6 0x00007f639fe4c8ff abort + 223
7 libc.so.6 0x00007f639fe4d7b6
8 libc.so.6 0x00007f639feb4a59
9 libc.so.6 0x00007f639fe6a595 arc4random + 133
10 swift-frontend 0x00007f63a88df879
11 swift-frontend 0x00007f63a88dfa4a
12 swift-frontend 0x00007f63a88633d5
13 swift-frontend 0x00007f63a6327762
14 swift-frontend 0x00007f63a6326472
15 swift-frontend 0x00007f63a6327d1f
16 swift-frontend 0x00007f63a3b2a681
17 swift-frontend 0x00007f63a3b2a2c8
18 swift-frontend 0x00007f63a3b2abdc
19 swift-frontend 0x00007f63a3cd4aaa
20 swift-frontend 0x00007f63a3542b93
21 swift-frontend 0x00007f63a3543507
22 swift-frontend 0x00007f63a34f9ce7
23 swift-frontend 0x00007f63a34fcc50
24 swift-frontend 0x00007f63a3cd4aaa
25 swift-frontend 0x00007f63a3cd5280
26 swift-frontend 0x00007f63a2925959
27 swift-frontend 0x00007f63a29241b4
28 swift-frontend 0x00007f63a267e331
29 swift-frontend 0x00007f63a2465869
30 libc.so.6 0x00007f639fe4e1ca
31 libc.so.6 0x00007f639fe4e28b __libc_start_main + 139
32 swift-frontend 0x00007f63a24649b5
error: 'hello_world': Invalid manifest (compiled with: ["/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.3jxsRS/vfs.yaml", "-L", "/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/usr/lib/swift/pm/ManifestAPI", "-swift-version", "6", "-I", "/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "6.1.0", "/mnt/hello_world/Package.swift", "-o", "/tmp/TemporaryDirectory.wp8CGP/hello_world-manifest"])
error: compile command failed due to signal 6 (use -v to see invocation)
Fatal glibc error: cannot get entropy for arc4random
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /usr/bin/swift-frontend -frontend -c -primary-file /mnt/hello_world/Package.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /usr/lib/swift/pm/ManifestAPI -vfsoverlay /tmp/TemporaryDirectory.3jxsRS/vfs.yaml -swift-version 6 -package-description-version 6.1.0 -empty-abi-descriptor -resource-dir /usr/lib/swift -module-name main -in-process-plugin-server-path /usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /usr/lib/swift/host/plugins -plugin-path /usr/local/lib/swift/host/plugins -o /tmp/TemporaryDirectory.fl3Kgu/Package-1.o
1. Swift version 6.1.2 (swift-6.1.2-RELEASE)
2. Compiling with the current language version
3. While reading from module 'Swift', builder version '6.1.2(5.10)/Swift version 6.1.2 (swift-6.1.2-RELEASE)', built from source against SDK , resilient, loaded from '/usr/lib/swift/linux/Swift.swiftmodule/x86_64-unknown-linux-gnu.swiftmodule'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x00007fc8f3a3fca8
1 swift-frontend 0x00007fc8f3a3da7e
2 swift-frontend 0x00007fc8f3a40348
3 libc.so.6 0x00007fc8eafbe330
4 libc.so.6 0x00007fc8eb017b2c pthread_kill + 284
5 libc.so.6 0x00007fc8eafbe27e gsignal + 30
6 libc.so.6 0x00007fc8eafa18ff abort + 223
7 libc.so.6 0x00007fc8eafa27b6
8 libc.so.6 0x00007fc8eb009a59
9 libc.so.6 0x00007fc8eafbf595 arc4random + 133
10 swift-frontend 0x00007fc8f3a34879
11 swift-frontend 0x00007fc8f3a34a4a
12 swift-frontend 0x00007fc8f39b83d5
13 swift-frontend 0x00007fc8f147c762
14 swift-frontend 0x00007fc8f147b472
15 swift-frontend 0x00007fc8f147cd1f
16 swift-frontend 0x00007fc8eec7f681
17 swift-frontend 0x00007fc8eec7f2c8
18 swift-frontend 0x00007fc8eec7fbdc
19 swift-frontend 0x00007fc8eee29aaa
20 swift-frontend 0x00007fc8ee697b93
21 swift-frontend 0x00007fc8ee698507
22 swift-frontend 0x00007fc8ee64ece7
23 swift-frontend 0x00007fc8ee651c50
24 swift-frontend 0x00007fc8eee29aaa
25 swift-frontend 0x00007fc8eee2a280
26 swift-frontend 0x00007fc8eda7a959
27 swift-frontend 0x00007fc8eda791b4
28 swift-frontend 0x00007fc8ed7d3331
29 swift-frontend 0x00007fc8ed5ba869
30 libc.so.6 0x00007fc8eafa31ca
31 libc.so.6 0x00007fc8eafa328b __libc_start_main + 139
32 swift-frontend 0x00007fc8ed5b99b5
Expected behavior
It should have printed out "Hello, world!"
Environment
Host
$ uname -a
Linux hostaname 3.10.108 #42962 SMP Mon Aug 19 15:12:09 CST 2024 x86_64 GNU/Linux synology_avoton_1815+
$ cat /etc.defaults/VERSION
majorversion="7"
minorversion="1"
major="7"
minor="1"
micro="1"
productversion="7.1.1"
buildphase="GM"
buildnumber="42962"
smallfixnumber="8"
nano="8"
base="42962"
builddate="2025/02/07"
buildtime="11:18:23"
$ /lib/libc.so.6
GNU C Library (GNU libc) stable release version 2.26, by Roland McGrath et al.
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.5.0.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
$ docker --version
Docker version 20.10.3, build 55f0773
Container
$ uname -a
Linux swift6docker 3.10.108 #42962 SMP Mon Aug 19 15:12:09 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
$ ldd --version
ldd (Ubuntu GLIBC 2.39-0ubuntu8.4) 2.39
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.2 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
$ swiftc --version
Swift version 6.1.2 (swift-6.1.2-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional information
Similar bugs are mentioned a lot with other software when running on 3.10 Linux kernel. Unfortunately upgrading to a newer kernel is not supported for Synology 1815+.