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

nzbget segfaults with time64 on arm32 #127

Closed
capntrips opened this issue Mar 2, 2021 · 5 comments · Fixed by #130
Closed

nzbget segfaults with time64 on arm32 #127

capntrips opened this issue Mar 2, 2021 · 5 comments · Fixed by #130

Comments

@capntrips
Copy link
Contributor

linuxserver.io


Expected Behavior

nzbget should not segfault on arm32

Current Behavior

nzbget segfaults when a time is encountered (when an nzb is in the queue or history).

Steps to Reproduce

  1. Add an nzb on an arm32 platform.

Environment

OS: linux
CPU architecture: arm32
How docker service was installed: from the official docker repo

Command used to create docker container (run/create/compose/screenshot)

docker run -d --name=nzbget --env=PUID=65534 --env=PGID=65534 --env=TZ=America/Chicago --volume=nzbget_data:/config -p 6789:6789 linuxserver/nzbget:latest

Docker logs

[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing... 
usermod: no changes
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
-------------------------------------
To support the app dev(s) visit:
NZBGet: https://nzbget.net/donate
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    65534
User gid:    65534
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-files: executing... 
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
@github-actions
Copy link

github-actions bot commented Mar 2, 2021

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

@capntrips
Copy link
Contributor Author

capntrips commented Mar 2, 2021

I already submitted a bug report with nzbget, but I don't expect immediate resolution, and the arm32 builds won't work, in the meantime.

The issue is that with v21.0-ls71, Alpine was was upgraded to 3.13, which uses musl 1.2.2. As of 1.2.0, musl uses time64, even on 32-bit archs:

musl 1.2.0 changes the definition of time_t, and thereby the definitions of all derived types, to be 64-bit across all archs. This and related changes are collectively referred to as "time64", and are necessary so that data types and functions dealing with time can represent time past early 2038, where the existing 32-bit type on 32-bit archs would overflow.

I asked about legacy compatibility on the musl IRC and was told that apps built against the old headers will continue to use time32. I tested this by compiling nzbget on Alpine 3.12 in the build stage then running it on Alpine 3.13, and it works fine.

I also tested it on the latest Ubuntu base image (which obviously doesn't use musl), and it worked fine (with nearly double the image size).

I'm happy to submit a PR for either of those scenarios.

For anyone that ends up here that wants a quick fix, just roll back to linuxserver/nzbget:v21.0-ls70 for now.

@j0nnymoe
Copy link
Member

j0nnymoe commented Mar 2, 2021

Sounds like you need to upgrade your libseccomp2: https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal

@capntrips
Copy link
Contributor Author

# docker exec nzbget date
Tue Mar  2 02:51:45 CST 2021

Also, if the nzbget binary is compiled on Alpine 3.12, it runs on Alpine 3.13 without issue.

@Roxedus
Copy link
Member

Roxedus commented Mar 19, 2021

I think compiling on 3.12 until/if this get fixed upstream is the best approach.

capntrips added a commit to capntrips/docker-nzbget that referenced this issue Apr 8, 2021
capntrips added a commit to capntrips/docker-nzbget that referenced this issue Apr 8, 2021
[armhf] revert linuxserver#125 and use py3-cryptography alpine package, avoiding rust-lang/cargo#9187

closes linuxserver#127
capntrips added a commit to capntrips/docker-nzbget that referenced this issue Apr 11, 2021
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.

3 participants