Bug 395074

Summary: Switching from selected versions of RPMs to install kills YaST
Product: [openSUSE] openSUSE 11.0 Reporter: Lukas Ocilka <locilka>
Component: YaST2Assignee: Duncan Mac-Vicar <dmacvicar>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P3 - Medium CC: coolo, mc
Version: RC 1Flags: coolo: SHIP_STOPPER-
Target Milestone: openSUSE 11.1   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST logs

Description Lukas Ocilka 2008-05-28 13:41:20 UTC
Created attachment 218625 [details]
YaST logs

I was just testing the build 130 (RC1) with new libzypp because of bug #394728. This needs some HTTP-based inst-repositories (Add-Ons). That's why I switched several packages not to install from DVD but from remote repository, when the last switching killed YaST :(
Comment 1 Lukas Ocilka 2008-05-28 13:42:32 UTC
Frame  3: /usr/lib/libzypp.so.424  zypp::ui::Selectable::candidateObj() const
Frame  4: /usr/lib/YaST2/plugin/libpy2qt_pkg.so.2  YQPkgVersionsView::checkForChangedCandidate()
Frame  5: /usr/lib/YaST2/plugin/libpy2qt_pkg.so.2  YQPkgVersionsView::qt_metacall(QMetaObject::Call, int, void**)

Comment 2 Stefan Hundhammer 2008-05-28 16:06:57 UTC
According to the y2logs, the click that caused the crash did not get to that yuiMilestone() << "Candidate changed" line: y2base crashed at 17:34:30, and the last "Candidate changed" log line was at 17:34:18.

2008-05-28 17:34:07 <1> 10.0.2.15(3034) [qt-pkg] YQPkgVersionsView.cc(checkForChangedCandidate):220 Candidate changed
2008-05-28 17:34:18 <1> 10.0.2.15(3034) [qt-pkg] YQPkgVersionsView.cc(checkForChangedCandidate):220 Candidate changed
2008-05-28 17:34:30 <3> 10.0.2.15(3034) [liby2] genericfrontend.cc(signal_handler):149 got signal 11 at YCP file /mounts/mp_0001/usr/share/YaST2/clients/inst_packages.ycp:49


Since the backtrace clearly says it crashed from YQPkgVersionsView::checkForChangedCandidate(), the problem must be in the first few lines of that function:

void
YQPkgVersionsView::checkForChangedCandidate()
{
    QListIterator<QAbstractButton*> it(_buttons->buttons());
    while (it.hasNext())
    {
        YQPkgVersion * versionItem = dynamic_cast<YQPkgVersion *> (it.next());

        if ( versionItem && versionItem->isChecked() )
        {
            ZyppObj newCandidate = versionItem->zyppObj();

            if ( newCandidate != _selectable->candidateObj() )
            {
                yuiMilestone() << "Candidate changed" << endl;



(there is no "else" branch to any of those "ifs")


To me this looks very much like _selectable was NULL or corrupted.
Comment 3 Lukas Ocilka 2008-05-28 16:21:52 UTC
I don't need to rant but I have a *VERY* fast computer now :) As Qt work in threads I just might have been too fast when selecting one package by another and switching the repository to install from.

What I did was:

  Select package A
  Switch from repo X to repo Y
  Select package B
  Switch from repo X to repo Y
  ...

As fast as possible as i wanted to ... hmm, have it soon :) Did it help?
Comment 4 Stephan Kulow 2008-05-28 18:42:19 UTC
there are no 2 threads in Qt afaik. Can you reproduce the issue in the running system?
Comment 5 Lukas Ocilka 2008-05-29 09:44:39 UTC
No, I was unable to reproduce it on a running system.
Comment 6 Stefan Hundhammer 2008-05-29 09:46:05 UTC
(In reply to comment #3 from Lukas Ocilka)
> As Qt work in threads I just might have been too fast when selecting one 
> package by another and switching the repository to install from.

Thread usage in the UI does something completely different from what you obviously think it does. While the package selector is open, the other thread (the YCP thread) is waiting for that Qt thread to finish. Nothing is done in parallel. Otherwise, we'd be in memory corruption hell all the time -- everywhere, not just in the package selector.
Comment 7 Lukas Ocilka 2008-05-29 09:47:43 UTC
OK, thanks for making it clear :)
Comment 8 Stefan Hundhammer 2008-05-29 10:52:29 UTC
For some time, I had feared we'd have a problem with pointers in the "selectable mapper" (YQPkgSelMapper) that might have become invalid while adding or removing repositories. But that can't be the case for several reasons: For one thing, the crash happened in the first instance of the YQPackageSelector (that's where the YQPkgSelMapper might be used), for another, it is only used in YQPkgPatchFilterView.cc and in YQPkgUpdateProblemFilterView.cc, none of which are relevant or even just used here.

So we can exclude this problem sceanario.
Comment 9 Michael Calmer 2010-03-11 14:50:47 UTC
I think we can close this as fixed