Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

busybox 1.34.1 exited in arm64 with code 139 #149

Closed
vettalwu opened this issue Oct 18, 2022 · 5 comments · Fixed by #150
Closed

busybox 1.34.1 exited in arm64 with code 139 #149

vettalwu opened this issue Oct 18, 2022 · 5 comments · Fixed by #150

Comments

@vettalwu
Copy link

vettalwu commented Oct 18, 2022

Hi, I encounter a problem in a arm64 machine.

Machine info:

» uname -a                                                                                                                                                                      
Linux dizhe-opensource-arm 4.18.0-372.19.1.an8_6.aarch64 #1 SMP Mon Aug 8 10:21:27 CST 2022 aarch64 aarch64 aarch64 GNU/Linux

I run following commnad and got a exited code: 139

docker run -it --rm busybox:1.34.1

When I changed the version to 1.34.0, it's working fine.

@tianon
Copy link
Member

tianon commented Oct 18, 2022

Interesting - 139 is typically a segmentation fault. Unfortunately, I'm not able to reproduce:

$ uname -m
aarch64
$ docker run -it --rm --pull=always busybox
latest: Pulling from library/busybox
89485c9dae0b: Pull complete 
Digest: sha256:9810966b5f712084ea05bf28fc8ba2c8fb110baa2531a10e2da52c1efc504698
Status: Downloaded newer image for busybox:latest
/ # 

@vettalwu
Copy link
Author

I test on another arm64 machine, it can also be reproduced.

#uname -a
Linux ky1 4.19.90-24.4.v2101.ky10.aarch64 #1 SMP Mon May 24 14:45:37 CST 2021 aarch64 aarch64 aarch64 GNU/Linux

@tianon What's your kernel version?

@yosifkit
Copy link
Member

I think the kernel he'd likely be using would be from Debian stable; so 5.10.140 or 5.18.16 depending on whether backports are being used.

Just a random hunch, try adding --ulimit nofile=1024:1024 in the docker run?
Might be similar to docker-library/haproxy#194 & docker-library/rabbitmq#545 or maybe nodejs/help#3202?

@vettalwu
Copy link
Author

@yosifkit I tried the following command, but still failed, exit code is also: 139

docker run --ulimit nofile=1024:1024 -it --rm busybox:1.34.1

@jayl1e
Copy link

jayl1e commented Oct 24, 2022

It is because many arm64 distribution use pagesize 64k.
However latest build use page size 4k. Please fix it, old busybox does not have this problem.
Some machine can't reproduce it because your kernel page size is 4k.

# /lib/ld-linux-aarch64.so.1 /root/busybox
/root/del/busybox: error while loading shared libraries: /root/busybox: ELF load command alignment not page-aligned
# readelf -l busybox

Elf file type is EXEC (Executable file)
Entry point 0x400740
There are 5 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000000400000 0x0000000000400000
                 0x000000000012b2f8 0x000000000012b2f8  R E    1000
  LOAD           0x000000000012bdf0 0x000000000052cdf0 0x000000000052cdf0
                 0x0000000000000611 0x0000000000005070  RW     1000
# getconf PAGESIZE
65536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants