[GRASS-dev] Crash in g.proj on Ubuntu

Hi

I'm running grass 8.3.1 on Ubuntu 22.04.3 in text mode ("grass --text ..."). g.proj is crashing on my system. Even a simple"g.proj --help" crashes after printing the command line options on console.

Core was generated by `g.proj -g'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f1eeb6a53fe in __GI___libc_free (mem=0x55c6c77e5bdd) at ./malloc/malloc.c:3368
3368 ./malloc/malloc.c: No such file or directory.
(gdb) bt
#0 0x00007f1eeb6a53fe in __GI___libc_free (mem=0x55c6c77e5bdd) at ./malloc/malloc.c:3368
#1 0x00007f1ee76a7cb3 in osgeo::proj::common::UnitOfMeasure::~UnitOfMeasure() () from /lib/x86_64-linux-gnu/libproj.so.22
#2 0x00007f1eeb645a56 in __cxa_finalize (d=0x7f1ee7964000) at ./stdlib/cxa_finalize.c:83
#3 0x00007f1ee76a7737 in ?? () from /lib/x86_64-linux-gnu/libproj.so.22
#4 0x00007ffd20ceda90 in ?? ()
#5 0x00007f1eed52524e in _dl_fini () at ./elf/dl-fini.c:142
Backtrace stopped: frame did not save the PC
(gdb)

It is likely that this is a local environment problem and not a bug in g.proj. I've installed grass using standard Ubuntu package manager. The steps to reproduce are:

$ sudo apt install grass
$ grass -c EPSG:32643 --text $PWD/grassdata/PERMANENT
$ g.proj -g # crashes after printing the output

Can someone help me get back on my feet please?

Asim

Hi,

this is quite typical of a program linking to 2 different version of libproj at the same time, often when mixing repositories, where some components of one haven't been rebuilt against updated components of the other one

Check the output of "ldd /path/to/g.proj"

Even

Le 24/04/2024 à 18:54, Asim via grass-dev a écrit :

Hi

I'm running grass 8.3.1 on Ubuntu 22.04.3 in text mode ("grass --text ..."). g.proj is crashing on my system. Even a simple"g.proj --help" crashes after printing the command line options on console.

Core was generated by `g.proj -g'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f1eeb6a53fe in __GI___libc_free (mem=0x55c6c77e5bdd) at ./malloc/malloc.c:3368
3368 ./malloc/malloc.c: No such file or directory.
(gdb) bt
#0 0x00007f1eeb6a53fe in __GI___libc_free (mem=0x55c6c77e5bdd) at ./malloc/malloc.c:3368
#1 0x00007f1ee76a7cb3 in osgeo::proj::common::UnitOfMeasure::~UnitOfMeasure() () from /lib/x86_64-linux-gnu/libproj.so.22
#2 0x00007f1eeb645a56 in __cxa_finalize (d=0x7f1ee7964000) at ./stdlib/cxa_finalize.c:83
#3 0x00007f1ee76a7737 in ?? () from /lib/x86_64-linux-gnu/libproj.so.22
#4 0x00007ffd20ceda90 in ?? ()
#5 0x00007f1eed52524e in _dl_fini () at ./elf/dl-fini.c:142
Backtrace stopped: frame did not save the PC
(gdb)

It is likely that this is a local environment problem and not a bug in g.proj. I've installed grass using standard Ubuntu package manager. The steps to reproduce are:

$ sudo apt install grass
$ grass -c EPSG:32643 --text $PWD/grassdata/PERMANENT
$ g.proj -g # crashes after printing the output

Can someone help me get back on my feet please?

Asim

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

--
http://www.spatialys.com
My software is free, but my time generally not.

That’s indeed the case.

···

On 24/04/24 10:32 pm, Even Rouault via grass-dev wrote:

this is quite typical of a program linking to 2 different version of libproj at the same time, often when mixing repositories, where some components of one haven’t been rebuilt against updated components of the other one

ldd shows two versions of libproj (22 and 25) being linked / loaded: ldd /usr/lib/grass83/bin/g.proj | grep proj libgrass_gproj.8.3.so => /usr/lib/grass83/lib/libgrass_gproj.8.3.so (0x00007fac2322e000) libproj.so.25 => /usr/lib/x86_64-linux-gnu/libproj.so.25 (0x00007fac21600000) libproj.so.22 => /usr/lib/x86_64-linux-gnu/libproj.so.22 (0x00007fac1d200000) How do I get out of this? Asim

On 4/25/24 12:06 PM, Asim via grass-dev wrote:

How do I get out of this?

jammy provided libproj22, so purge the other library package:

  apt purge libproj25

You likely have PPAs or other 3rd party repos enabled which pull in the newer proj.

Kind Regards,

Bas

--
  GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1

On 25/04/24 4:15 pm, Sebastiaan Couwenberg via grass-dev wrote:

On 4/25/24 12:06 PM, Asim via grass-dev wrote:

How do I get out of this?

jammy provided libproj22, so purge the other library package:

apt purge libproj25

Removing libproj22 with "apt purge libproj22" fixed the problem. Thank you for the help, Grass8 is working nicely now.

Asim