Closed nukedupe closed 1 year ago
I tried it on a docker host (latest docker-ce on Ubuntu 20.04), where the image didn't exist yet.
I can not confirm your observation.
meyay@host:~$ docker run -ti --rm meyay/languagetool fasttext
Unable to find image 'meyay/languagetool:latest' locally
latest: Pulling from meyay/languagetool
c158987b0551: Pull complete
2bcd61910ced: Pull complete
6ff36a2567eb: Pull complete
5569b024241e: Pull complete
2d97d0ca372f: Pull complete
d2dd47a853cb: Pull complete
676db37404ef: Pull complete
4f4fb700ef54: Pull complete
2b67f8898abb: Pull complete
61a10f29845a: Pull complete
Digest: sha256:7732a4c0a7b09625e10cd2ca8dd5e243755286a76fb44c0ad9ee663cd0d7fc3c
Status: Downloaded newer image for meyay/languagetool:latest
usage: fasttext <command> <args>
The commands supported by fasttext are:
supervised train a supervised classifier
quantize quantize a model to reduce the memory usage
test evaluate a supervised classifier
test-label print labels with precision and recall scores
predict predict most likely labels
predict-prob predict most likely labels with probabilities
skipgram train a skipgram model
cbow train a cbow model
print-word-vectors print word vectors given a trained model
print-sentence-vectors print sentence vectors given a trained model
print-ngrams print ngrams given a trained model and word
nn query for nearest neighbors
analogies query for analogies
dump dump arguments,dictionary,input/output vectors
I tried the current image (for time being latest==5.9==5.9-6) on three different hosts now. I still can not reproduce it.
How do I reproduce the issue you experience? What Host OS, Container Runtime and Container start parameters do I need to use to reproduce your situation?
Thanks for fast response.
Host OS: Docker Version: 20.10.17 Default Runtime: crun Operating System: Ubuntu 22.04.1 LTS
$ docker run -ti --rm meyay/languagetool fasttext
Unable to find image 'meyay/languagetool:latest' locally
latest: Pulling from meyay/languagetool
c158987b0551: Already exists
2bcd61910ced: Pull complete
6ff36a2567eb: Pull complete
5569b024241e: Pull complete
2d97d0ca372f: Pull complete
d2dd47a853cb: Pull complete
676db37404ef: Pull complete
4f4fb700ef54: Pull complete
2b67f8898abb: Pull complete
61a10f29845a: Pull complete
Digest: sha256:7732a4c0a7b09625e10cd2ca8dd5e243755286a76fb44c0ad9ee663cd0d7fc3c
Status: Downloaded newer image for meyay/languagetool:latest
$
$ docker run -ti --rm meyay/languagetool sh
/languagetool # apk add strace
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
(1/5) Installing libbz2 (1.0.8-r4)
(2/5) Installing musl-fts (1.2.7-r3)
(3/5) Installing xz-libs (5.2.9-r0)
(4/5) Installing libelf (0.187-r2)
(5/5) Installing strace (6.0-r0)
Executing busybox-1.35.0-r29.trigger
OK: 21 MiB in 35 packages
/languagetool # strace /usr/local/bin/fasttext
execve("/usr/local/bin/fasttext", ["/usr/local/bin/fasttext"], 0x7fffbbfb8d60 /* 22 vars */) = 0
open("/proc/self/exe", O_RDONLY) = 3
mmap(NULL, 2186, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f35ceb6c000
mprotect(0x7f35ceb6c000, 2186, PROT_READ|PROT_EXEC) = 0
readlink("/proc/self/exe", "/usr/local/bin/fasttext", 4095) = 23
mmap(0x7f35ceb6d000, 357608, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f35ceb6d000
mmap(0x7f35ceb6d000, 20576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f35ceb6d000
mprotect(0x7f35ceb6d000, 20576, PROT_READ) = 0
mmap(0x7f35ceb73000, 270668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0x6000) = 0x7f35ceb73000
mprotect(0x7f35ceb73000, 270668, PROT_READ|PROT_EXEC) = 0
mmap(0x7f35cebb6000, 48464, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0x49000) = 0x7f35cebb6000
mprotect(0x7f35cebb6000, 48464, PROT_READ) = 0
mmap(0x7f35cebc2000, 8256, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0x54000) = 0x7f35cebc2000
mprotect(0x7f35cebc2000, 8256, PROT_READ|PROT_WRITE) = 0
open("/lib/ld-musl-x86_64.so.1", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\272\5\0\0\0\0\0"..., 1024) = 1024
mmap(NULL, 634880, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f35cead1000
mmap(0x7f35cead1000, 83464, PROT_READ, MAP_PRIVATE|MAP_FIXED, 4, 0) = 0x7f35cead1000
mmap(0x7f35ceae6000, 304951, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0x15000) = 0x7f35ceae6000
mmap(0x7f35ceb31000, 218304, PROT_READ, MAP_PRIVATE|MAP_FIXED, 4, 0x60000) = 0x7f35ceb31000
mmap(0x7f35ceb67000, 5204, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x95000) = 0x7f35ceb67000
mmap(0x7f35ceb69000, 8352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f35ceb69000
close(4) = 0
munmap(0x7f35cebc5000, 166094) = 0
mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f35cebed000
close(3) = 0
munmap(0x7f35ceb6c000, 2186) = 0
arch_prctl(ARCH_SET_FS, 0x7f35ceb6ab48) = 0
set_tid_address(0x7f35ceb6afb0) = 83
brk(NULL) = 0x555557369000
brk(0x55555736b000) = 0x55555736b000
mmap(0x555557369000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x555557369000
open("/etc/ld-musl-x86_64.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libstdc++.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libstdc++.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libstdc++.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=2398664, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 2416640, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f35ce883000
mmap(0x7f35ce933000, 1150976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xb0000) = 0x7f35ce933000
mmap(0x7f35cea4c000, 471040, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x1c9000) = 0x7f35cea4c000
mmap(0x7f35ceabf000, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x23b000) = 0x7f35ceabf000
mmap(0x7f35ceace000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f35ceace000
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=120672, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 122880, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f35cebcf000
mmap(0x7f35cebd2000, 90112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x7f35cebd2000
mmap(0x7f35cebe8000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x19000) = 0x7f35cebe8000
mmap(0x7f35cebeb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1c000) = 0x7f35cebeb000
close(3) = 0
mprotect(0x7f35ceabf000, 57344, PROT_READ) = 0
mprotect(0x7f35cebeb000, 4096, PROT_READ) = 0
mprotect(0x7f35ceb67000, 4096, PROT_READ) = 0
mprotect(0x7f35cebc2000, 8192, PROT_READ) = 0
mmap(NULL, 73728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f35ce871000
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x7f35ceb76ede} ---
+++ killed by SIGILL (core dumped) +++
Illegal instruction (core dumped)
What else can I do to support?
Problem solved. It was a VM with QEMU. I have changed CPU from kvm64 to host.
I don't know what caused the problems, the other 300 containers have been running without any problems so far. Maybe UPX packed binary.
Unfortunately, that only solves part of the problem. When I call the binary with parameters it still doesn't run. I will keep trying to find the cause.
# fasttext test /fasttext/lid.176.bin -
Illegal instruction (core dumped)
The problem is the CPU optimization of the fasttext binary.
With kvm64 cpu problematic instruction was: vpxor %xmm0,%xmm0,%xmm0
Now with host cpu: vfnmsub132ss 0x25e8e(%rip),%xmm2,%xmm0
Host cpu is: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
Seems you nailed down the problem.
So far the images are created outside GitHub Actions and indeed were created in a kvm vm using all cpu features of a E3 v5 cpu. I could create the image in a vm using only the kvm64 features for the time being..
Though, once the GHA pipeline does what I want, I plan to use it to build the images.
Tested on latest docker hub image. There is something wrong with fasttext binary. Using Dockerfile local to build image it works.