Overpass API developpement

Text archives Help


Re: [overpass] Segmentation fault


Chronological Thread 
  • From: Igor Brejc < >
  • To: Roland Olbricht < >
  • Cc:
  • Subject: Re: [overpass] Segmentation fault
  • Date: Mon, 31 Jul 2017 06:26:21 +0200

Good morning Roland,

Not sure if I understood the instructions correctly, but here you go:

(gdb) run </tmp/crash_input.osc
Starting program: /home/igor/overpass/osm-3s_v0.7.54/bin/update_database </tmp/crash_input.osc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Reading XML file ... finished reading nodes. Flushing to database ...... done.
Reading XML file ... finished reading ways. Flushing to database ...... done.
Reading XML file ... finished reading relations. Flushing to database ....... done.

Breakpoint 1, File_Blocks_Index<Uint32_Index>::~File_Blocks_Index (this=0x780af0, __in_chrg=<optimized out>)
    at overpass_api/core/../../template_db/file_blocks_index.h:296
296       if (empty_index_file_name == "")
(gdb) print *this
$1 = {<File_Blocks_Index_Base> = {_vptr.File_Blocks_Index_Base = 0x763928 <vtable for File_Blocks_Index<Uint32_Index>+16>},
  static FILE_FORMAT_VERSION = 7512, static NO_COMPRESSION = <optimized out>, static ZLIB_COMPRESSION = <optimized out>,
  static LZ4_COMPRESSION = <optimized out>, index_file_name = "/home/igor/overpass/db/nodes.bin.idx.shadow",
  empty_index_file_name = "/home/igor/overpass/db/nodes.bin.shadow", data_file_name = "/home/igor/overpass/db/nodes.bin",
  file_name_extension_ = "", index_buf = {ptr = 0x0}, file_size = 30516117504, index_size = 2225560,
  blocks = {<std::__cxx11::_List_base<File_Block_Index_Entry<Uint32_Index>, std::allocator<File_Block_Index_Entry<Uint32_Index> > >> = {
      _M_impl = {<std::allocator<std::_List_node<File_Block_Index_Entry<Uint32_Index> > >> = {<__gnu_cxx::new_allocator<std::_List_node<File_Block_Index_Entry<Uint32_Index> > >> = {<No data fields>}, <No data fields>},
        _M_node = {<std::__detail::_List_node_base> = {_M_next = 0x780c30, _M_prev = 0xdf39f0},
          _M_data = 139097}}}, <No data fields>}, void_blocks = std::vector of length 0, capacity 0,
  void_blocks_initialized = true, block_size_ = 65536, compression_factor = 8, compression_method = 1, block_count = 465664}
(gdb) print *(File_Blocks_Index<Uint32_Index>*)0x780af0
$2 = {<File_Blocks_Index_Base> = {_vptr.File_Blocks_Index_Base = 0x763928 <vtable for File_Blocks_Index<Uint32_Index>+16>},
  static FILE_FORMAT_VERSION = 7512, static NO_COMPRESSION = <optimized out>, static ZLIB_COMPRESSION = <optimized out>,
  static LZ4_COMPRESSION = <optimized out>, index_file_name = "/home/igor/overpass/db/nodes.bin.idx.shadow",
  empty_index_file_name = "/home/igor/overpass/db/nodes.bin.shadow", data_file_name = "/home/igor/overpass/db/nodes.bin",
  file_name_extension_ = "", index_buf = {ptr = 0x0}, file_size = 30516117504, index_size = 2225560,
  blocks = {<std::__cxx11::_List_base<File_Block_Index_Entry<Uint32_Index>, std::allocator<File_Block_Index_Entry<Uint32_Index> > >> = {
      _M_impl = {<std::allocator<std::_List_node<File_Block_Index_Entry<Uint32_Index> > >> = {<__gnu_cxx::new_allocator<std::_List_node<File_Block_Index_Entry<Uint32_Index> > >> = {<No data fields>}, <No data fields>},
        _M_node = {<std::__detail::_List_node_base> = {_M_next = 0x780c30, _M_prev = 0xdf39f0},
          _M_data = 139097}}}, <No data fields>}, void_blocks = std::vector of length 0, capacity 0,
  void_blocks_initialized = true, block_size_ = 65536, compression_factor = 8, compression_method = 1, block_count = 465664}


On Sun, Jul 30, 2017 at 10:46 PM, Roland Olbricht < > wrote:
Hi,

thank you for the debug data. The object in which later the crash happens is at least properly constructed. I would like to check now whether the object is still valid before deconstruction. This is again a gdb session.

Delete the .lock file, then start gdb.

break file_blocks_index.h:296

Then

run </tmp/crash_input.osc

Once the break point is reached the first time: there is an address after th (this=) parameter. Please use that address as follows:

print *this
print *(File_Blocks_Index<Uint32_Index>*)0x77d750

Both commands are supposed to do the same. But I have seen the first one to fail from time to time.

I will go to bed after this mail. Hence, I'm sorry that the next round cannot continue before tomorrow morning.

Best regards,

Roland




Archive powered by MHonArc 2.6.19+.

Top of page