[Bug 607482] New: zypper segfault: intrusive_ptr.hpp:166: T* boost::intrusive_ptr<T>::operator->()
http://bugzilla.novell.com/show_bug.cgi?id=607482 http://bugzilla.novell.com/show_bug.cgi?id=607482#c0 Summary: zypper segfault: intrusive_ptr.hpp:166: T* boost::intrusive_ptr<T>::operator->() Classification: openSUSE Product: openSUSE 11.3 Version: Factory Platform: x86-64 OS/Version: openSUSE 11.3 Status: NEW Severity: Critical Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: burnus@gmx.de QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=363481) --> (http://bugzilla.novell.com/attachment.cgi?id=363481) zypper.log.bz2 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100513 SUSE/3.6.4-1.11 Firefox/3.6.4 This segfault reminds me of several other but now fixed boost segfaults. This is with zypper-1.4.4-1.1.x86_64, i.e. * Mon May 17 2010 jkupec@suse.cz - --clean-deps added to 'remove' command. The otion tells the solver to remove any packages that become unneeded after removing a packages that depended on them. [...] Reproducible: Always Steps to Reproduce: $ valgrind zypper in xcrysden.i386 Actual Results: Loading repository data... Reading installed packages... zypper: /usr/include/boost/smart_ptr/intrusive_ptr.hpp:166: T* boost::intrusive_ptr<T>::operator->() const [with T = const zypp::ResObject]: Assertion `px != 0' failed. ==572== Invalid free() / delete / delete[] ==572== at 0x4C25F7B: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==572== by 0x61E163A: ??? (in /lib64/libc-2.11.1.so) ==572== by 0x61E11E1: ??? (in /lib64/libc-2.11.1.so) ==572== by 0x4A215C8: _vgnU_freeres (in /usr/lib64/valgrind/vgpreload_core-amd64-linux.so) ==572== by 0x610AEA5: abort (in /lib64/libc-2.11.1.so) ==572== by 0x61021E4: __assert_fail (in /lib64/libc-2.11.1.so) ==572== by 0x4E5104: SolverRequester::updateTo(zypp::Capability const&, std::string const&, zypp::PoolItem const&) (in /usr/bin/zypper) ==572== by 0x4E7653: SolverRequester::install(PackageSpec const&) (in /usr/bin/zypper) ==572== by 0x4E7FAB: SolverRequester::installRemove(PackageArgs const&) (in /usr/bin/zypper) ==572== by 0x45D087: Zypper::doCommand() (in /usr/bin/zypper) ==572== by 0x464557: Zypper::safeDoCommand() (in /usr/bin/zypper) ==572== by 0x468F40: Zypper::main(int, char**) (in /usr/bin/zypper) ==572== Address 0x4079dd0 is not stack'd, malloc'd or (recently) free'd -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c1
--- Comment #1 from Tobias Burnus
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c2
Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c
Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c3
Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c4
--- Comment #4 from Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c5
Michael Andres
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c6
--- Comment #6 from Michael Andres
Oh, i recall now what's the problem with the architecture. Currently PoolQuery with architecture ORs the arch with the rest of the conditions, so the result are all packages with that arch plus something more.
That's the nature of PoolQuery. All conditions, you add are OR'ed. I thought you use guessPackageSpec?
Michael, can you please take care of that? (i'll take care of the segfault)
Anyway it would be consequent to add some additional addDependency overloads, so you can also restrict the arch, not just edition: q.addDependency( sat::SolvAttr::name, "ker*", Rel::GT, Edition("2.6.31"), Arch_x86_64 ); q.addDependency( sat::SolvAttr::name, "ker*", Arch_x86_64 ); Would this fit your needs? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c7
--- Comment #7 from Ján Kupec
That's the nature of PoolQuery. All conditions, you add are OR'ed.
I'm not sure why it did before, but now it does not make sense to me. IMO, only several values of the same property should be ORed, different properties should be ANDed: (kind1 OR kind2) AND (arch1 OR arch2) AND (name1 AND/OR name2) AND (repo1 OR repo2) AND (dep1 AND/OR dep2) ... (in the case of name, description, summary, deps, etc, both AND and OR make sense of course)
I thought you use guessPackageSpec?
I do, but from it i make a PoolQuery (also adding repos), and pick the best with PoolItemBest. This deals nicely with most of the cases, including globs. (BTW, i'm aware of the suggestion you made about the globs in the other bug, i still need to think about it a bit).
Anyway it would be consequent to add some additional addDependency overloads, so you can also restrict the arch, not just edition:
q.addDependency( sat::SolvAttr::name, "ker*", Rel::GT, Edition("2.6.31"), Arch_x86_64 );
q.addDependency( sat::SolvAttr::name, "ker*", Arch_x86_64 );
Would this fit your needs?
Hmm, yes, but not in this particular case - we're not dealing with deps here. We just want to select package named X with arch Y here. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c8
--- Comment #8 from Ján Kupec
I thought you use guessPackageSpec?
I do, but from it i make a PoolQuery (also adding repos), and pick the best with PoolItemBest.
That is, if selecting packages by name. If by capability, then i simply addRequire/addConflict the cap returned by guessPackageSpec, of course. (Here we lack the possiblity to restrict repo, BTW). -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c9
--- Comment #9 from Michael Andres
Would this fit your needs?
Hmm, yes, but not in this particular case - we're not dealing with deps here. We just want to select package named X with arch Y here.
It was originally added to deal with deps, but in fact it's of common use. For non-dependency attributes it behaves like addAttr PLUS an additional constraint on the edition range. vvvv
q.addDependency( sat::SolvAttr::name, "ker*", Rel::GT, Edition("2.6.31"), Arch_x86_64 );
So this is (would be) name matches "ker*" AND edition > "2.6.31" AND arch == "x86_64" -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c10
--- Comment #10 from Michael Schröder
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c11
--- Comment #11 from Michael Andres
(That's name/edition of a provides, right?
No.
We don't support "package name only" dependencies yet.)
Yes, but this is a pool query, not a dependency. It would look for all sat::SolvAttr::name (packagenames) matching "ker*". And from the result the ones with edition > "2.6.31" and arch == "x86_64" are taken. Ideally we'd pass the result to the solver to install (the best) one out of the result list. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=607482
http://bugzilla.novell.com/show_bug.cgi?id=607482#c12
Michael Andres
participants (1)
-
bugzilla_noreply@novell.com