Bug 380283 - installation crashes in libzypp
Summary: installation crashes in libzypp
Status: RESOLVED FIXED
: 380645 (view as bug list)
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: libzypp (show other bugs)
Version: Beta 1
Hardware: Other Other
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Michael Andres
QA Contact: Duncan Mac-Vicar
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-16 07:48 UTC by Stephan Kulow
Modified: 2008-04-17 14:39 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
y2log (1.65 MB, text/plain)
2008-04-16 07:48 UTC, Stephan Kulow
Details
new log file (3.20 MB, text/plain)
2008-04-17 08:13 UTC, Stephan Kulow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Kulow 2008-04-16 07:48:06 UTC
Created attachment 208212 [details]
y2log

log file attached. This was after pressing "Install"  - possibly during image deployment
Comment 1 Lukas Ocilka 2008-04-16 08:04:43 UTC
Probably in
    Pkg::ResolvableProperties ("", `package, "")
Comment 2 Stefan Schubert 2008-04-16 10:44:42 UTC
Ladislav is there a possibility to make this call alone without YaST (command line call) ? I would like to reproduce that error in a small environment.
Comment 3 Ladislav Slezák 2008-04-16 12:23:38 UTC
Pkg::ResolvableProperties() is defined in Resolvable_Properties.cc file, line 101.

The binding iterates over the pool and returns properties of the resolvables which match the parameters. (in this case all packages).

Some like this:

zypp::Resolvable::Kind kind = zypp::ResTraits<zypp::Package>::kind;

for (zypp::ResPool::byKind_iterator it = zypp_ptr()->pool().byKindBegin(kind);
     it != zypp_ptr()->pool().byKindEnd(kind);
     ++it)
{
    zypp::Package::constPtr pkg = boost::dynamic_pointer_cast<const zypp::Package>(it->resolvable());

    std::string tmp = pkg->location().filename().asString();
}


According to the log it crashes in zypp::Package::location() function. I suppose when using ByKind itrerator pkg pointer shouldn't be null.
Comment 4 Stefan Schubert 2008-04-16 13:08:38 UTC
As Coolo told me, it happens on DVD installaton only. CD installation works correctly. So it makes no sense to reproduce the error on a running system.
Comment 5 Stefan Schubert 2008-04-16 13:13:43 UTC
It crased it zypp::sat::Solvable::get(). In that case the pkg pointer cannot be null. Otherwise it would has crashed before.
Comment 6 Stephan Kulow 2008-04-16 13:14:55 UTC
sorry, CD installation == live-installer installation. The CDs on machcd2 are only internal test builds.
Comment 7 Martin Vidner 2008-04-16 13:50:47 UTC
(In reply to comment #1 from Lukas Ocilka)
> Probably in
>     Pkg::ResolvableProperties ("", `package, "")

Not probably but certainly, as evidenced by the brand new feature which makes a dying yast more verbose:
y2log:11347:2008-04-16 09:43:19 <0> linux(3492) [liby2] SymbolEntry.cc(setValue):107 SymbolEntry::setValue (one_type@0xb3980d08 = '`package')
y2log:11370:2008-04-16 09:43:19 <0> linux(3492) [libycp] ExecutionEnvironment.cc(pushframe):105 Push frame ResolvableProperties ("", one_type, "")
Comment 8 Stephan Kulow 2008-04-16 16:04:13 UTC
ok, PkgFunctions::ResolvablePropertiesEx calls zypp::Package::location(this=0x0) - I would think the bug is in pkg-bindings
Comment 9 Stephan Kulow 2008-04-16 16:23:40 UTC
the actual crash is fixed, but we don't know yet the reason
Comment 10 Stephan Kulow 2008-04-17 05:31:52 UTC
*** Bug 380645 has been marked as a duplicate of this bug. ***
Comment 11 Stephan Kulow 2008-04-17 05:59:25 UTC
ok, new installation images work fine now.
Comment 12 Stephan Kulow 2008-04-17 08:13:10 UTC
Created attachment 208518 [details]
new log file

The debug output schubi and me added yesterday is hit very, very often
Comment 13 Michael Andres 2008-04-17 14:20:59 UTC
Found it. It's a broken index in the pool. It originates from the fact that unlike all other kinds of sat solvables, source packages do not have a prefix indicating the kind (e.g. pattern:default, patch:glibc, ..).

satlib uses the same name for packages and source packages and instead of a prefix (ab)uses the architecture of the source package, setting it to SCR or NOSRC.

byKind<Package> wrongly lists source packages, and for them the dynamic_pointer_cast returns NULL.
Comment 14 Michael Andres 2008-04-17 14:39:14 UTC
fixed in libzypp-4.13.2