Skip to Content.
Sympa Menu

overpass - Re: [overpass] Segmentation fault

Subject: Overpass API developpement

List archive

Re: [overpass] Segmentation fault


Chronological Thread 
  • From: mmd <>
  • To:
  • Subject: Re: [overpass] Segmentation fault
  • Date: Sun, 30 Jul 2017 14:56:25 +0200

Hi,


Am 30.07.2017 um 12:39 schrieb Roland Olbricht:

>
> By the way: I did never manage to get useful information out of a core
> dump. I we get forward that way, I would like to know how because that
> might simplify future post-mortem analysis.
>


working with core files is pretty straight forward after all. Let's walk
through it step by step:

Enable writing of core files with unlimited size:

mmd@host:~/osm-3s-patch-version/build$ ulimit -c unlimited

Start application that triggers a fault:

mmd@host:~/osm-3s-patch-version/build$ bin/osm3s_query
Aborted (core dumped)


Start gdb with original binary and core file as parameters:

mmd@host:~/osm-3s-patch-version/build$ gdb bin/osm3s_query core

GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
[...]
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/osm3s_query...done.
[New LWP 12290]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `bin/osm3s_query'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007ff8db794428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht
gefunden.
Traceback (most recent call last):
File
"/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21-gdb.py",
line 60, in <module>
from libstdcxx.v6 import register_libstdcxx_printers
ImportError: cannot import name 'register_libstdcxx_printers'

Show backtrace:

(gdb) bt
#0 0x00007ff8db794428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ff8db79602a in __GI_abort () at abort.c:89
#2 0x000000000064b67d in main (argc=<optimised out>, argv=0x7ffe996d3ce8)
at ../src/overpass_api/dispatch/osm3s_query.cc:163
(gdb)

Check local variables:

(gdb) frame 2
#2 0x000000000064b67d in main (argc=<optimised out>, argv=0x7ffe996d3ce8)
at ../src/overpass_api/dispatch/osm3s_query.cc:163

(gdb) p argpos
$1 = 1


In line osm3s_query.cc:163 I added the following to trigger a crash:

abort();


Cheers,
mmd




Archive powered by MHonArc 2.6.19+.

Top of Page