Vauxoo / maintainer-quality-tools

QA tools for Odoo maintainers
GNU Affero General Public License v3.0
3 stars 9 forks source link

[REV] revert "Segmentation fault (core dumped)" #320

Closed fernandahf closed 3 years ago

fernandahf commented 3 years ago

Description of the issue/feature this PR addresses:

The reason of websocket-client was deactivated is:

numpy has the following issue:

It is a corner case using a kind of processor, using docker and using python3

More info about:

But who is using numpy?

There are different projects using libraries that depends of numpy: ./web/requirements.txt:2:bokeh==1.1.0 ./reporting-engine/requirements.txt:1:altair ./icm/requirements.txt:1:pandas ./maintainer-quality-tools/requirements.txt:7:websocket-client

So, if we run odoo-bin with loglevel=debug to know what is the last line before to crash.

It was the path:

We could have removed all numpy requirements but there are a lot of them. So we decided that better option was avoid to import the websocket line that import numpy (faster solution) non-installing websocket-client.

However, after researching, we found that:

OpenBLAS creates a number of threads equal to the number of core threads available, so it quickly reached limit_memory_hard and the process was killed (SIGSEGV) Forcing OPENBLAS_NUM_THREADS=1 fixed the issue.

After test building an image to reproduce the error and using that environment variable and it was fixed.

That change was applied in following PRs:

With change applied in docker-ubuntu-base, it's not neccesary avoid to import websocket-client (allow JS tests work again), we are covered with env var OPENBLAS_NUM_THREADS.

Current behavior before PR: websocket-client is not installed by default, avoid that JS tests don't work, at least module is explicitly installed in CI.

Desired behavior after PR is merged: websocket-client is installed by default, JS tests work again without other action required.

-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

fernandahf commented 3 years ago

@moylop260

Could you review this, please?

Regards.

moylop260 commented 3 years ago

👍

moylop260 commented 3 years ago

@fernandahf

Could you send an email to desarrollo please?

fernandahf commented 3 years ago

@moylop260

Done, with this thread: Fix para error de numpy en las imágenes usadas en CI, CD y runbot

Regards.