Error "free(): double free detected in tcache 2" when querying info from libqmi via Python API

Martin Maurer martin.maurer at mmeacs.de
Sat Sep 23 20:26:53 UTC 2023


Hello,

I was able to build and install latest version of libqmi by the 
following commands:

sudo apt install git meson cmake libgudev-1.0-dev libmbim-glib-dev 
help2man flex bison libghc-doctemplates-doc
git clone https://gitlab.gnome.org/GNOME/gobject-introspection.git 
<https://gitlab.gnome.org/GNOME/gobject-introspection.git>
git clone --depth 1 
https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git
<https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git>git 
clone https://gitlab.freedesktop.org/mobile-broadband/libqmi.git 
<https://gitlab.freedesktop.org/mobile-broadband/libqmi.git>
cd gobject-introspection
mkdir build
cd build
meson --prefix=/usr --buildtype=release ..
sudo ninja -C . install
cd ..
cd ..
cd libqrtr-glib
meson setup build --prefix=/usr
sudo ninja -C build install
cd ..
cd libqmi
meson setup build --prefix=/usr
sudo ninja -C build install
cd ..


$ qmicli --version
qmicli 1.33.8
Copyright (C) 2012-2023 Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later 
<http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$


Then the error "free(): double free detected in tcache 2" seems to go 
away. Looks like my version (the current default version of Raspberry Pi 
OS from May 2023) was too old.


One small followup question: How can I generate (or find) the Python API 
documentation for this latest up-to-date version?

I have seen (or found out) that now

revision = output.get_revision()

only return the revision itself, not more

available, revision = output.get_revision()

like in the old version.

( old version was from here: 
https://lazka.github.io/pgi-docs/Qmi-1.0/classes/MessageDmsGetRevisionOutput.html#Qmi.MessageDmsGetRevisionOutput 
)

Best regards,

Martin


Am 23.09.2023 um 13:09 schrieb Martin Maurer:
> I also opened a topic in Raspberry forum and asked there for help. You 
> can find the post here:
>
> https://forums.raspberrypi.com/viewtopic.php?t=356710
>
>
> Am 23.09.2023 um 13:04 schrieb Martin Maurer:
>> Hello Aleksander,
>>
>> I already tried to update (via sudo apt update/upgrade/dist-upgrade) 
>> my version on Raspberry Pi 4,
>>
>> but version is and stays at 1.26.10-0.1
>>
>>
>> trio at radio2:~ $ qmicli --version
>> qmicli 1.26.10
>> Copyright (C) 2012-2020 Aleksander Morgado
>> License GPLv2+: GNU GPL version 2 or later 
>> <http://gnu.org/licenses/gpl-2.0.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>>
>> trio at radio2:~ $ sudo apt list | grep libqmi
>>
>> WARNING: apt does not have a stable CLI interface. Use with caution 
>> in scripts.
>>
>> libqmi-glib-dev/oldstable,now 1.26.10-0.1 arm64 [installed]
>> libqmi-glib-dev/oldstable 1.26.10-0.1 armhf
>> libqmi-glib-doc/oldstable,oldstable 1.26.10-0.1 all
>> libqmi-glib5/oldstable,now 1.26.10-0.1 arm64 [installed,automatic]
>> libqmi-glib5/oldstable 1.26.10-0.1 armhf
>> libqmi-proxy/oldstable,now 1.26.10-0.1 arm64 [installed,automatic]
>> libqmi-proxy/oldstable 1.26.10-0.1 armhf
>> libqmi-utils/oldstable,now 1.26.10-0.1 arm64 [installed]
>> libqmi-utils/oldstable 1.26.10-0.1 armhf
>> trio at radio2:~ $
>>
>> How can I update, what is already delivered by my system?
>>
>> Or is the way to go to download libqmi sources and build/install.
>>
>> Will it update the part which could make me problems?
>>
>> Take the sources from here? Is this the most up-to-date-version?
>>
>> https://gitlab.freedesktop.org/mobile-broadband/libqmi
>>
>> 1.26.10 seems to be around 2 years old.
>>
>> https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/tags/1.26.10
>>
>> How to officially get a newer version into Raspberry Pi OS 
>> Environment? Do you/does someone know?
>>
>> Many thanks!
>>
>> Best regards,
>>
>> Martin
>>
>>
>> Am 22.09.2023 um 15:04 schrieb Aleksander Morgado:
>>> Hey,
>>>
>>>> I am trying to learn how to use the Python API of libqmi.
>>>> I extended the simple-tester-python.py to press a key and query 
>>>> some information.
>>>> When trying to get the revision, I get the correct revision, but 
>>>> afterwards I get the error message “free(): double free detected in 
>>>> tcache 2”.
>>>> I tried the same with getting the model, and same behaviour: Model 
>>>> can be printed and is correct, but then same error message.
>>> What libqmi version are you using?
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20230923/3fe46eba/attachment.htm>


More information about the libqmi-devel mailing list