Getting free() invalid pointer issue when installing / using python3. Could be dpkg issue as well !
When I did sudo apt update && sudo apt upgrade, it happened and hence I tried to reinstall.
This issue occurs when trying to manage it with ansible as well. I think something might be wrong with the latest python.
Board: Helios64 (I know, I know CSC)
Chipset: RK3399
Apt install logs:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/472 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 44574 files and directories currently installed.)
Preparing to unpack .../python3-pkg-resources_59.6.0-1.2ubuntu0.22.04.1_all.deb ...
double free or corruption (out)
Aborted
dpkg: warning: old python3-pkg-resources package pre-removal script subprocess returned error exit status 134
dpkg: trying script from the new package instead ...
dpkg: ... it looks like that went OK
Unpacking python3-pkg-resources (59.6.0-1.2ubuntu0.22.04.1) over (59.6.0-1.2ubuntu0.22.04.1) ...
Preparing to unpack .../python3-setuptools_59.6.0-1.2ubuntu0.22.04.1_all.deb ...
Unpacking python3-setuptools (59.6.0-1.2ubuntu0.22.04.1) over (59.6.0-1.2ubuntu0.22.04.1) ...
Setting up python3-pkg-resources (59.6.0-1.2ubuntu0.22.04.1) ...
Setting up python3-setuptools (59.6.0-1.2ubuntu0.22.04.1) ...
free(): invalid pointer
Aborted
dpkg: error processing package python3-setuptools (--configure):
installed python3-setuptools package post-installation script subprocess returned error exit status 134
Errors were encountered while processing:
python3-setuptools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ansible logs:
ansible_facts: {}
failed_modules:
ansible.legacy.setup:
ansible_facts:
discovered_interpreter_python: /usr/bin/python3
failed: true
module_stderr: |-
free(): invalid pointer
Aborted
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 134
msg: |-
The following modules failed to execute: ansible.legacy.setup