Bug 470011

Summary: yast2 Segmentation fault
Product: [openSUSE] openSUSE 11.1 Reporter: andrea florio <andrea>
Component: YaST2Assignee: Michael Andres <ma>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P2 - High CC: ma, tgoettlicher
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 11.1   
Whiteboard: maint:released:11.1:24006
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs

Description andrea florio 2009-01-27 23:39:30 UTC
hi,

i added obs bashee repository toi my list, but if i go to

"filter --> repository --> bashee" (where banshee is the name i gave to banshee repo yast2 crash with that report 

YaST got signal 11 at YCP file PackagesUI.ycp:239
/sbin/yast2: line 437: 10538 Segmentation fault      $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS


it crash only if i try to filter banshee repo... here my repos list:

# | Alias       | Nome                                                     | abilitato | Attualizza | URI                                                                            
--+-------------+----------------------------------------------------------+-----------+------------+--------------------------------------------------------------------------------
1 | anubisg1    | anubisg1                                                 | Sì        | Sì         | http://download.opensuse.org/repositories/home:/anubisg1/openSUSE_11.1         
2 | banshee-1.4 | banshee-1.4                                              | Sì        | Sì         | http://download.opensuse.org/repositories/Banshee/openSUSE_11.1                
3 | repo        | NVIDIA Repository                                        | Sì        | Sì         | http://download.nvidia.com/opensuse/11.1                                       
4 | repo_1      | Sorgente di installazione principale (NON-OSS)           | Sì        | Sì         | http://download.opensuse.org/distribution/11.1/repo/non-oss/                   
5 | repo_2      | Sorgente di installazione (OSS)                          | Sì        | Sì         | http://download.opensuse.org/distribution/11.1/repo/oss/                       
6 | repo_5      | openSUSE BuildService - OpenOffice.org                   | Sì        | Sì         | http://download.opensuse.org/repositories/OpenOffice.org:/STABLE/openSUSE_11.1/
7 | repo_6      | Sorgente di installazione principale degli aggiornamenti | Sì        | Sì         | http://download.opensuse.org/update/11.1/                                      
8 | repo_7      | Packman Repository                                       | Sì        | Sì         | http://ftp.skynet.be/pub/packman/suse/11.1/   



yast2 log attached
Comment 1 andrea florio 2009-01-27 23:41:19 UTC
Created attachment 268110 [details]
yast2 logs
Comment 2 andrea florio 2009-02-04 23:45:00 UTC
any news?
Comment 3 Cyril Hrubis 2009-02-13 18:06:09 UTC
Moving to yast2 maintainers.
Comment 4 Katarina Machalkova 2009-02-16 09:56:27 UTC
Can you reproduce the same issue with ncurses UI?
Comment 5 andrea florio 2009-02-16 11:47:35 UTC
yes it crasch also in ncurses UI, but there i receie NO exception

te strange thing is that it crasch only if i try to select the banshee repo, not if i choose the others
Comment 6 Katarina Machalkova 2009-02-16 14:50:47 UTC
Ok, I too reproduced both with Qt and ncurses UI (Gtk does not use PoolQuery to filter the packages), unfortunately the backtrace and valgrind output are not being too verbose here. The code leading to the crash is something along these lines:

zypp::PoolQuery query;
query.addRepo( currentRepo.info().alias() );
query.addKind(zypp::ResKind::package);

for( zypp::PoolQuery::Selectable_iterator it = query.selectableBegin();
     it != query.selectableEnd(); it++)       
{
     // do something with (*it)
}
(now it loops through all the selectables, but never gets past the loop):
Comment 7 Katarina Machalkova 2009-02-16 14:52:23 UTC
This is what valgrind says: 
y2base: /usr/include/boost/intrusive_ptr.hpp:149: T* boost::intrusive_ptr<T>::operator->() const [with T = zypp::ui::Selectable]: Assertion `p_ != 0' failed.

and the backtrace (from curses, Qt one is in the log above):

Frame  0: /usr/lib/liby2.so.2  log_backtrace()
   Frame  1: /usr/lib/liby2.so.2  signal_handler(int)
   Frame  2: [0xffffe400]
   Frame  3: [0xffffe430]
   Frame  4: /lib/libc.so.6(gsignal+0x50) [0xb79ad990]
   Frame  5: /lib/libc.so.6(abort+0x188) [0xb79af2c8]
   Frame  6: /lib/libc.so.6(__assert_fail+0xee) [0xb79a678e]
   Frame  7: /usr/lib/YaST2/plugin/libpy2ncurses_pkg.so.2 NCPkgRepoTable::showRepoPackages()


Not sure whether to keep major severity or raise to critical (because of the crash), as it only seems to happen with Banshee repo above: http://download.opensuse.org/repositories/Banshee/openSUSE_11.1
Comment 8 Michael Andres 2009-02-18 09:55:52 UTC
This looks like the PoolQuery iterator returns a NULL Selectable. This must not happen.
Comment 9 Michael Andres 2009-02-18 11:33:20 UTC
Nice bug(s):

1) In the banshee metadata the  patterns.xml.gz contains an empty pattern definition: <pattern />

2) The satsolvers parser translates this entry into a package(!) with no name and version.

3) In libzypp finally, a package with no name and version is basically no problem, unless you ask for the corresponding Selectable. None was generated, and that's why the iterator unexpectedly returns NULL.
Comment 10 Michael Andres 2009-02-18 16:05:55 UTC
1) is up to the OBS projects maintainer.
2) and 3) are fixed in satsolver-0.13.4 and libzypp-5.28.1.
Comment 11 Swamp Workflow Management 2009-05-04 14:18:36 UTC
Update released for: PackageKit, PackageKit-debuginfo, PackageKit-debugsource, PackageKit-devel, PackageKit-lang, gnome-packagekit, gnome-packagekit-debuginfo, gnome-packagekit-debugsource, gnome-packagekit-lang, libpackagekit-glib10, libpackagekit-glib10-devel, libpackagekit-qt10, libpackagekit-qt10-devel, libqdialogsolver1, libqdialogsolver1-debuginfo, libqdialogsolver1-debugsource, libqdialogsolver1-devel, libsatsolver, libsatsolver-debuginfo, libsatsolver-debugsource, libsatsolver-devel, libzypp, libzypp-debuginfo, libzypp-debugsource, libzypp-devel, perl-satsolver, python-satsolver, ruby-satsolver, satsolver-tools, yast2-pkg-bindings, yast2-pkg-bindings-debuginfo, yast2-pkg-bindings-debugsource, yast2-pkg-bindings-devel-doc, yast2-qt-pkg, yast2-qt-pkg-debuginfo, yast2-qt-pkg-debugsource, zypper, zypper-debuginfo, zypper-debugsource
Products:
openSUSE 11.1 (debug, i586, ppc, x86_64)