vaeth / eix

eix can access Gentoo portage ebuild information and description very quickly (using a local cache). It can also be used to access information on installed packages, local settings, and local and external overlays, and informs about changes in the tree
GNU General Public License v2.0
165 stars 14 forks source link

SIGSEGV in eix-diff from eix-0.31.5 #19

Closed moschlar closed 8 years ago

moschlar commented 8 years ago

Hi there,

I get a SIGSEGV in eix-diff recently (with optimizations disabled, too).

Here's the log from the gdb session:

# gdb eix-diff
GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from eix-diff...done.
(gdb) run
Starting program: /usr/bin/eix-diff 
Diffing databases (20471 -> 20474 packages)
[<]   == app-admin/glance (2015.1.1-r3 -> 11.0.0): Services for discovering, registering, and retrieving VM images
[>]   == media-libs/libsfml (2.3.2 -> 2.3.2-r1): Simple and Fast Multimedia Library (SFML)
[>]   == pentoo/pentoo-system (2015.4-r12 -> 2015.4-r13) [12]: Pentoo meta ebuild to install system
[<]   == sys-auth/keystone (2015.1.1 -> 8.0.0): The Openstack authentication, authorization, and service catalog
[<]   == sys-cluster/cinder (2015.1.1 -> 7.0.0): Cinder is the OpenStack Block storage service, a spin out of nova-volumes
[<]   == sys-cluster/neutron (2015.1.1-r1 -> 7.0.0): A virtual network service for Openstack
[<]   == sys-cluster/nova (2015.1.1-r3 -> 12.0.0): Cloud computing fabric controller (main part of an IaaS system) in Python

Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaad9285b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6
(gdb) bt
#0  0x00002aaaaad9285b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6
#1  0x00000000004cd5c9 in std::pair<std::string const, OutputString>::pair<std::string const&, 0ul>(std::tuple<std::string const&>&, std::tuple<>&, std::_Index_tuple<0ul>, std::_Index_tuple<>) (this=0x86e24c0, __tuple1=std::tuple containing = {...}, __tuple2=empty std::tuple)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/tuple:1104
#2  0x00000000004cd3c2 in std::pair<std::string const, OutputString>::pair<std::string const&>(std::piecewise_construct_t, std::tuple<std::string const&>, std::tuple<>) (this=0x86e24c0, __first=std::tuple containing = {...}, __second=empty std::tuple)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/tuple:1093
#3  0x00000000004cd141 in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::string const, OutputString> > >::construct<std::pair<std::string const, OutputString><std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> > > (this=0x7e6330, __p=0x86e24c0)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/ext/new_allocator.h:120
#4  0x00000000004cca1a in std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::string const, OutputString> > > >::_S_construct<std::pair<std::string const, OutputString><std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> > >(std::allocator<std::_Rb_tree_node<std::pair<std::string const, OutputString> > >&, std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::string const, OutputString> > > >::__construct_helper*, (std::pair<std::string const, OutputString><std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> >&&)...) (__a=..., 
    __p=0x86e24c0) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/alloc_traits.h:253
#5  0x00000000004cc189 in std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::string const, OutputString> > > >::construct<std::pair<std::string const, OutputString><std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> > >(std::allocator<std::_Rb_tree_node<std::pair<std::string const, OutputString> > >&, std::pair<std::string const, OutputString><std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> >*, (std::pair<std::string const, OutputString><std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> >&&)...) (__a=..., 
    __p=0x86e24c0) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/alloc_traits.h:399
#6  0x00000000004cad8c in std::_Rb_tree<std::string, std::pair<std::string const, OutputString>, std::_Select1st<std::pair<std::string const, OutputString> >, std::less<std::string>, std::allocator<std::pair<std::string const, OutputString> > >::_M_create_node<std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<std::string const&>&&, std::tuple<>&&) (this=0x7e6330)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_tree.h:421
#7  0x00000000004c987d in std::_Rb_tree<std::string, std::pair<std::string const, OutputString>, std::_Select1st<std::pair<std::string const, OutputString> >, std::less<std::string>, std::allocator<std::pair<std::string const, OutputString> > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<std::string const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<std::string const, OutputString> >, std::piecewise_construct_t const&, std::tuple<std::string const&>&&, std::tuple<>&&) (this=0x7e6330, __pos=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_tree.h:1790
#8  0x00000000004c8cd7 in std::map<std::string, OutputString, std::less<std::string>, std::allocator<std::pair<std::string const, OutputString> > >::operator[] (this=0x7e6330, __k=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_map.h:500
#9  0x00000000004c5bf0 in PrintFormat::recPrint (this=0x7e6330, result=0x0, entity=0x32164c0, get_property=
    0x4d3f4b <get_package_property(OutputString*, PrintFormat const*, void*, std::string const&)>, root=0x869310) at output/formatstring.cc:406
#10 0x00000000004c7b5d in PrintFormat::print (this=0x7e6330, entity=0x32164c0, 
    get_property=0x4d3f4b <get_package_property(OutputString*, PrintFormat const*, void*, std::string const&)>, root=0x869310, dbheader=0x8a8100, 
    vardbpkg=0x8dc640, ps=0x86b4b0, s=0x94b150, check_only=false) at output/formatstring.cc:831
#11 0x000000000050ff1e in PrintFormat::print (this=0x7e6330, entity=0x32164c0, 
    get_property=0x4d3f4b <get_package_property(OutputString*, PrintFormat const*, void*, std::string const&)>, root=0x869310, dbheader=0x8a8100, 
    vardbpkg=0x8dc640, ps=0x86b4b0, s=0x94b150) at output/formatstring.h:460
#12 0x000000000050ff77 in PrintFormat::print (this=0x7e6330, entity=0x32164c0, root=0x869310, dbheader=0x8a8100, vardbpkg=0x8dc640, ps=0x86b4b0, s=0x94b150)
    at output/formatstring.h:470
#13 0x000000000050e221 in print_found_package (p=0x32164c0) at eix-diff.cc:262
#14 0x0000000000510d8d in std::for_each<std::_List_iterator<Package*>, void (*)(Package*)> (__first=, __last=, __f=0x50e1da <print_found_package(Package*)>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:3756
#15 0x00000000005101b0 in DiffTrees::diff (this=0x7fffffffdbf0, old_tree=0x7fffffffdbc0, new_tree=0x7fffffffdb90) at eix-diff.cc:203
#16 0x000000000050f7b7 in run_eix_diff (argc=1, argv=0x7fffffffdeb8) at eix-diff.cc:424
#17 0x00000000005364d6 in run_program (argc=1, argv=0x7fffffffdeb8) at ./main/main.cc:172
#18 0x00000000005367a7 in main (argc=1, argv=0x7fffffffdeb8) at ./main/main.cc:233
(gdb) 
# layman -l

 * betagarden                [Git       ] (git://anongit.gentoo.org/proj/betagarden.git                                                                      )
 * gamerlay                  [Git       ] (git://anongit.gentoo.org/proj/gamerlay.git                                                                        )
 * grub2-themes              [Git       ] (https://github.com/gentoo/grub2-themes-overlay.git                                                                )
 * java                      [Git       ] (git://anongit.gentoo.org/proj/java.git                                                                            )
 * mozilla                   [Git       ] (git://anongit.gentoo.org/proj/mozilla.git                                                                         )
 * mrpdaemon                 [Git       ] (git://github.com/mrpdaemon/gentoo-overlay.git                                                                     )
 * pentoo                    [Git       ] (git://github.com/pentoo/pentoo-overlay.git                                                                        )
 * sabayon                   [Git       ] (git://github.com/Sabayon/for-gentoo.git                                                                           )
 * sdaps                     [Git       ] (git://github.com/sdaps/gentoo-overlay.git                                                                         )
 * steam-overlay             [Git       ] (git://github.com/anyc/steam-overlay.git                                                                           )
 * sublime-text              [Git       ] (git://github.com/DamnWidget/sublime-text.git                                                                      )
 * sunrise                   [Git       ] (git://anongit.gentoo.org/proj/sunrise-reviewed.git                                                                )
 * tlp                       [Git       ] (git://github.com/dywisor/tlp-portage.git                                                                          )
 * tox-overlay               [Git       ] (git://github.com/Tox/gentoo-overlay-tox.git                                                                       )

I'd be happy to help test some things.

vaeth commented 8 years ago

https://bugs.gentoo.org/show_bug.cgi?id=571108

I just released eix-0.31.6 with a patch which hopefully fixes it.