I have mounted a debian (linaro) based rootfs.img.raw
created from sparse image (with simg2img
) and ran chroot:
$ sudo chroot /mnt/intrinsycimg qemu-aarch64-static /bin/bash
using qemu to emulate ARM64. My qemu-aarch64
version is 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.26).
Using pip (version 18.1) on python (version 3.7.3) I tried to install a random package with it, but I get the following error:
root@user:/home/linaro# pip3 install --user progress
qemu: Unsupported syscall: 278
Collecting progress
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Could not find a version that satisfies the requirement progress (from versions: )
No matching distribution found for progress
I tried adding a --trusted-host
flag as per this github issue answer and I got a malloc failure:
root@user:/home/linaro# pip3 install progress --trusted-host pypi.org --trusted-host files.pythonhosted.org
qemu: Unsupported syscall: 278
Collecting progress
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))': /simple/progress/
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Could not fetch URL https://pypi.org/simple/progress/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/progress/ (Caused by SSLError(SSLError(336236609, '[SSL] malloc failure (_ssl.c:2994)'))) - skipping
Could not find a version that satisfies the requirement progress (from versions: )
No matching distribution found for progress
I also tried to mount /run
, /dev
, /sys
and /proc
(e.g sudo mount --rbind /run/ /mnt/linaroimg/run/
) as this user suggested, but I get the same result.
My openssl version is OpenSSL 1.1.1d
and I found an issue regarding malloc failure for 1.1.1d, so if I run the same command I get the same error:
root@user:/home/linaro# python3 -c 'import urllib.request; urllib.request.urlopen("https://pypi.org")'
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
qemu: Unsupported syscall: 278
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.7/urllib/request.py", line 1285, in do_open
h = http_class(host, timeout=req.timeout, **http_conn_args)
File "/usr/lib/python3.7/http/client.py", line 1383, in __init__
context = ssl._create_default_https_context()
File "/usr/lib/python3.7/ssl.py", line 565, in create_default_context
context = SSLContext(PROTOCOL_TLS)
File "/usr/lib/python3.7/ssl.py", line 388, in __new__
self = _SSLContext.__new__(cls, protocol)
ssl.SSLError: [SSL] malloc failure (_ssl.c:2994)
I tried manually compiling OpenSSL_1_1_1g
version:
root@user:/home/linaro# openssl version
OpenSSL 1.1.1g 21 Apr 2020 (Library: OpenSSL 1.1.1d 10 Sep 2019)
but same end result. I'm suspicious of Library: OpenSSL 1.1.1d
, but I git cloned the openssl repo and checked out the OpenSSL_1.1.1g
tag. Also I would like to avoid compiling the openssl myself, since I prefer to update it via apt later on.
Any ideas how I should fix this issue?
The problem here is that you're using an old version of QEMU, which has known bugs in its linux-user mode support (it has in particular problems with multithreaded guest programs). Trying a more recent version such as QEMU 5.0 should cause the errors to go away.