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

qgis-providers: postinst failure: free(): invalid pointer #35195

Closed
sebastic opened this issue Mar 19, 2020 · 7 comments
Closed

qgis-providers: postinst failure: free(): invalid pointer #35195

sebastic opened this issue Mar 19, 2020 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@sebastic
Copy link
Contributor

As reported by Laurent Bonnaud in Debian Bug #954242:

here is the problem:

Setting up qgis-providers (3.10.3+dfsg-1+b1) ...
free(): invalid pointer
Aborted (core dumped)
dpkg: error processing package qgis-providers (--configure):
 installed qgis-providers package post-installation script subprocess returned error exit status 134

Note that my system has glibc 2.31 from experimental and the following environment variables are set:

MALLOC_PERTURB_=117
MALLOC_CHECK_=3

Running "valgrind /usr/lib/qgis/crssync" finds many memory errors, and the first one is:

==34194== Invalid free() / delete / delete[] / realloc()
==34194==    at 0x4838EAB: operator delete(void*) (vg_replace_malloc.c:586)
==34194==    by 0x76643D5: __cxa_finalize (cxa_finalize.c:83)
==34194==    by 0xEC8FF62: ??? (in /usr/lib/x86_64-linux-gnu/libproj.so.15.3.1)
==34194==    by 0x400FF92: _dl_fini (dl-fini.c:138)
==34194==    by 0x7663DD6: __run_exit_handlers (exit.c:108)
==34194==    by 0x7663F89: exit (exit.c:139)
==34194==    by 0x764CCF1: (below main) (libc-start.c:342)
==34194==  Address 0x1796f740 is 0 bytes inside a block of size 17 free'd
==34194==    at 0x4838EAB: operator delete(void*) (vg_replace_malloc.c:586)
==34194==    by 0x76643D5: __cxa_finalize (cxa_finalize.c:83)
==34194==    by 0x7B12702: ??? (in /usr/lib/x86_64-linux-gnu/libproj.so.19.0.0)
==34194==    by 0x400FF92: _dl_fini (dl-fini.c:138)
==34194==    by 0x7663DD6: __run_exit_handlers (exit.c:108)
==34194==    by 0x7663F89: exit (exit.c:139) 
==34194==    by 0x764CCF1: (below main) (libc-start.c:342)
==34194==  Block was alloc'd at
==34194==    at 0x4837DEF: operator new(unsigned long) (vg_replace_malloc.c:344)
==34194==    by 0x7B0E91F: ??? (in /usr/lib/x86_64-linux-gnu/libproj.so.19.0.0)
==34194==    by 0x7B11A2C: ??? (in /usr/lib/x86_64-linux-gnu/libproj.so.19.0.0)
==34194==    by 0x400FC09: call_init.part.0 (dl-init.c:72)
==34194==    by 0x400FD08: call_init (dl-init.c:30)
==34194==    by 0x400FD08: _dl_init (dl-init.c:119)
==34194==    by 0x40010C9: ??? (in /usr/lib/x86_64-linux-gnu/ld-2.31.so)
-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.4.0-4-rt-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages qgis-providers depends on:
ii  dpkg                              1.20.0
ii  libc6                             2.31-0experimental0
ii  libexpat1                         2.2.9-1
ii  libgcc-s1                         10-20200312-2
ii  libgdal26                         3.0.4+dfsg-1+b1
ii  libhdf5-103                       1.10.4+repack-11
ii  libnetcdf15                       1:4.7.3-1
ii  libpq5                            12.2-1+b1
ii  libqca-qt5-2                      2.2.1-2
ii  libqca-qt5-2-plugins              2.2.1-2
ii  libqgis-core3.10.3                3.10.3+dfsg-1+b1
ii  libqgis-gui3.10.3                 3.10.3+dfsg-1+b1
ii  libqscintilla2-qt5-15             2.11.2+dfsg-6
ii  libqt5core5a [qtbase-abi-5-12-5]  5.12.5+dfsg-9
ii  libqt5gui5                        5.12.5+dfsg-9
ii  libqt5network5                    5.12.5+dfsg-9
ii  libqt5sql5                        5.12.5+dfsg-9
ii  libqt5sql5-sqlite                 5.12.5+dfsg-9
ii  libqt5webkit5                     5.212.0~alpha4-1
ii  libqt5widgets5                    5.12.5+dfsg-9
ii  libqt5xml5                        5.12.5+dfsg-9
ii  libspatialite7                    5.0.0~beta0-1~exp4
ii  libsqlite3-0                      3.31.1-4
ii  libstdc++6                        10-20200312-2
ii  libxml2                           2.9.10+dfsg-4
ii  qgis-providers-common             3.10.3+dfsg-1

qgis-providers recommends no packages.

qgis-providers suggests no packages.

-- no debconf information
@sebastic sebastic added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Mar 19, 2020
@stev-0
Copy link
Contributor

stev-0 commented Mar 27, 2020

A similar issue (when building, not package related) was caused by linking with Proj 7 on my machine - 6.3 x worked fine. So this looks like a system issue on that individual system. Obviously this will need to be fixed at some point though. Plus the memory leak issues - validated those and got a similar output but don't understand enough to comment.

@sebastic
Copy link
Contributor Author

The memory leak issues are the most important thing to fix for the issue.

@adisrivasa
Copy link

The bug seems to be in qgis, rather than the system. I am also facing the same issue. It has now blocked all possible updates on my system also.

@nyalldawson
Copy link
Collaborator

I can't reproduce - on my build using a self-built proj 7 and gdal master direct from upstream I get no issues reported by valgrind/asan.

My gut feeling is that this isn't a qgis issue.

@nyalldawson nyalldawson added the Feedback Waiting on the submitter for answers label Mar 30, 2020
@rouault
Copy link
Contributor

rouault commented Mar 30, 2020

The Valgrind stack trace shows that QGIS and/or one of its dependent libraries is linking against 2 different versions of PROJ:

/usr/lib/x86_64-linux-gnu/libproj.so.15.3.1
/usr/lib/x86_64-linux-gnu/libproj.so.19.0.0

This is the cause of the crash

@nyalldawson
Copy link
Collaborator

Closing as a downstream bug

@nyalldawson nyalldawson removed the Feedback Waiting on the submitter for answers label Mar 30, 2020
@oe2lsp
Copy link

oe2lsp commented Apr 7, 2020

can't install qgis on ubuntu 20.04 due to this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

6 participants