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

<jemalloc>: Unsupported system page size #34162

Closed
SnowViet opened this issue Apr 13, 2020 · 9 comments
Closed

<jemalloc>: Unsupported system page size #34162

SnowViet opened this issue Apr 13, 2020 · 9 comments
Labels

Comments

@SnowViet
Copy link

SnowViet commented Apr 13, 2020

The problem

The docker image do not work for 0.108 (even 0.108.3).
See the logfile below
The error seems to be related with page size

<jemalloc>: Unsupported system page size                                                                                                                                                                                        
Fatal Python error: _PyRuntimeState_Init_impl: Can't initialize threads for interpreter

I'm running Home Assistant on a QNAP TS-531P (ARM). Using Container Station.
With the following docker image: armhf-homeassistant

Environment

  • Home Assistant Core release with the issue: 0.108 (and 0.108.3)
  • Last working Home Assistant Core release (if known): 0.107.7
  • Operating environment (Home Assistant/Supervised/Docker/venv): Docker
  • Integration causing this issue: Core
  • Link to integration documentation on our website: -

Problem-relevant configuration.yaml

Not sure if really needed ? Nothing is loaded.

Traceback/Error logs

[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] udev.sh: executing...                                                                                                                                                                                             
starting version 3.2.9                                                                                                                                                                                                          
[21:38:30] INFO: Update udev information                                                                                                                                                                                        
[cont-init.d] udev.sh: exited 0.                                                                                                                                                                                                
[cont-init.d] done.                                                                                                                                                                                                             
[services.d] starting services                                                                                                                                                                                                  
[services.d] done.                                                                                                                                                                                                              
<jemalloc>: Unsupported system page size                                                                                                                                                                                        
<jemalloc>: Unsupported system page size                                                                                                                                                                                        
<jemalloc>: Unsupported system page size                                                                                                                                                                                        
Fatal Python error: _PyRuntimeState_Init_impl: Can't initialize threads for interpreter                                                                                                                                         
                                                                                                                                                                                                                                
[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.   

Additional information

@SnowViet
Copy link
Author

I tried with 0.108.8, it's still the same.

@Almartor
Copy link

Almartor commented May 17, 2020

Same problem here. I installed today homeassistant/home-assistant:latest
on QNAP TS-531X
I followed this guide: https://www.home-assistant.io/docs/installation/docker/

Edit: I have deleted the docker and isntalled 0.107.7 as suggested above and it works perfectly.

@SnowViet
Copy link
Author

Unfortunately I didn't find any solution. So I transferred Home Assistant to my Homelab server.

@kantselovich
Copy link
Contributor

This issue can be traced to PR #33237 that enabled jemalloc memory allocator library for ha running in docker to save memory. https://github.com/home-assistant/core/pull/33237/files#diff-72c67f984f87910be4740f8b8c681946

How to replicate: run python with JEMALLOC enabled.

[~] # docker run -it homeassistant/home-assistant:0.110.3 /bin/bash
bash-5.0#
bash-5.0# uname -a
Linux cdbe547cb815 4.2.8 #2 SMP Fri Feb 14 10:27:18 CST 2020 armv7l Linux
bash-5.0#
bash-5.0#
bash-5.0# LD_PRELOAD="/usr/local/lib/libjemalloc.so.2" python3 -c 'print("hello world!\n")'
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
Fatal Python error: _PyRuntimeState_Init_impl: Can't initialize threads for interpreter

Aborted
bash-5.0#
bash-5.0# python3 -c 'print("hello world!\n")'
hello world!

bash-5.0#

@kantselovich
Copy link
Contributor

kantselovich commented May 28, 2020

The issue seems to affect armv7l hardware that QNAP TS-531X and TS-531P are using.
However, according to jemalloc/jemalloc#1443 there are could be general issues with running jemalloc in Alpine linux in later versions

@kantselovich
Copy link
Contributor

@SnowViet did you close the issue because HA in resent versions works on QNAP TS-531P?

@SnowViet
Copy link
Author

I closed the issue as I'm not using HA on my QNAP anymore. I moved to an amd64 server.

@Almartor
Copy link

I am really interested in using HA in my QNAP TS-531X and I got same error.

If I install HASS.IO will I have same problem?

@kantselovich
Copy link
Contributor

I've submitted a new issue #36273
as this one is closed.

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

Successfully merging a pull request may close this issue.

4 participants