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

[Bug] Docker container "restarting (132)" with image 0.45.18 or higher #2328

Closed
Nekrotza opened this issue Apr 22, 2024 · 16 comments
Closed
Assignees
Labels
help wanted Extra attention is needed triage upstream-bug issue with library - not directly with changedetection

Comments

@Nekrotza
Copy link

Describe the bug
Image "ghcr.io/dgtlmoon/changedetection.io:0.45.18" or higher causes container status "Restarting (132)".

Version
Works fine until version 0.45.17

To Reproduce
Update from a previous version or a new clean install causes same output.
The hardware is an old Intel Celeron P4600 (2) @ 2GHz with 8GB of RAM.
The Host OS is Debian GNU/Linux 11 (bullseye) x86_64.

The logs are empty.

@Nekrotza Nekrotza changed the title Docker container "restarting (132)" with image 0.45.18 or higher [Bug] Docker container "restarting (132)" with image 0.45.18 or higher Apr 22, 2024
@Tor4nkusu
Copy link

Same here.
Ubuntu 22.04.4 LTS
Upgraded from 0.45.17 to 0.45.20 and docker image is stuck on "Restarting (132)"

@dgtlmoon
Copy link
Owner

"The Host OS" which VM solution are you using?

@Nekrotza
Copy link
Author

Sorry, maybe i expressed myself wrong, i'm not using a VM.

@Tor4nkusu
Copy link

"The Host OS" which VM solution are you using?

I'm on Server 2016 w/ HyperV hosting that ubuntu VM.

@dgtlmoon
Copy link
Owner

hmm a quick google shows me other projects have the same issue, i have no solution or dont really even know where to start

so if anyone has any ideas... :)

@dgtlmoon dgtlmoon added the help wanted Extra attention is needed label Apr 25, 2024
@rklos
Copy link

rklos commented Apr 27, 2024

Hi, I have the same problem on a dedicated server (no virtualisation) with Ubuntu 22.04.4 LTS and Docker 26.0.2.

edit:
Downgrading to Docker 25 didn't change anything, so it's not a problem with new major Docker release.

@Constantin1489
Copy link
Contributor

Is this relevant? https://bugs.launchpad.net/lxml/+bug/2063343

@dgtlmoon
Copy link
Owner

dgtlmoon commented Apr 27, 2024 via email

@0xuser
Copy link

0xuser commented Apr 30, 2024

I have the same problem, I switched back to version 0.45.17.

@dgtlmoon
Copy link
Owner

dgtlmoon commented May 1, 2024

https://bugs.launchpad.net/lxml/+bug/2059910 it looks like there was some changes to lxml and the minimum level of hardware has changed... it is compiled with some instructions that require a more modern CPU

this fits our pattern - the problem seems to affect people with older CPUs

@dgtlmoon dgtlmoon added the upstream-bug issue with library - not directly with changedetection label May 1, 2024
@Constantin1489
Copy link
Contributor

Constantin1489 commented May 13, 2024

@dgtlmoon
Copy link
Owner

This is follow-up: https://bugs.launchpad.net/lxml/+bug/2059910/comments/16

Excellent, so it means lxml 5.2.2 ?

what about this syntax for the requirements.txt?

# 5.2.0 and 5.2.1 had bad CPU flags set causing a crash
lxml >=4.8.0,<6, !=5.2.0, !=5.2.1

@Constantin1489
Copy link
Contributor

Constantin1489 commented May 14, 2024

looks good!
image

python3.12 -m pip uninstall lxml && python3.12 -m pip install lxml==5.2.0 && python3.12 -m pip install -r req.txt

@Constantin1489
Copy link
Contributor

Constantin1489 commented May 14, 2024

Ah forgot this too. So works

image

@dgtlmoon
Copy link
Owner

dgtlmoon commented May 14, 2024

looks good!

@Constantin1489 since 5.2.0/5.2.1 have the extra CFLAGs for better performance on newer CPUs, any chance you can run some of your wonderful speed/benchmark tests on 5.1.9 vs 5.2.0 ?

I'm curious exactly how much faster it is

other thing, would be nice if there was a lxml[modern] pip package where this stuff was set too.. worth asking the maintainer?

@Constantin1489
Copy link
Contributor

Constantin1489 commented May 14, 2024

With this shell script, and let's say the file is data/reddit.html

(python3.12 -m pip uninstall lxml -y && python3.12 -m pip install lxml==5.1.1) > /dev/null 2>/dev/null
python3.12 <<EOF
import timeit
setup_code = """
from lxml import etree, html
parser = etree.HTMLParser()
with open('data/reddit.html', 'rb') as f:
    html_bytes = f.read()
"""
code = """
html.fromstring(html_bytes, parser=parser)
"""
print(timeit.timeit(setup=setup_code, stmt=code, number=1000))
EOF

(python3.12 -m pip uninstall lxml -y && python3.12 -m pip install lxml==5.2.0) > /dev/null 2>/dev/null
python3.12 <<EOF
import timeit
setup_code = """
from lxml import etree, html
parser = etree.HTMLParser()
with open('data/reddit.html', 'rb') as f:
    html_bytes = f.read()
"""
code = """
html.fromstring(html_bytes, parser=parser)
"""
print(timeit.timeit(setup=setup_code, stmt=code, number=1000))
EOF

result was

$python3.12 -c 'print((16.555711069027893 - 16.908115033991635)/ 16.908115033991635  * 100)'
-2.0842297574583437

the difference between 5.1.9 and 5.2.0 is so 2%? I'm not that math savvy...

For two.. I don't know..

dgtlmoon added a commit that referenced this issue May 14, 2024
dgtlmoon added a commit that referenced this issue May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed triage upstream-bug issue with library - not directly with changedetection
Projects
None yet
Development

No branches or pull requests

6 participants