|
Bugzilla – Full Text Bug Listing |
| Summary: | destructors: zypp::ZYpp::finishTarget after zypp::sat::detail::~PoolImpl | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.0 | Reporter: | Martin Vidner <mvidner> |
| Component: | libzypp | Assignee: | Martin Vidner <mvidner> |
| Status: | RESOLVED WONTFIX | QA Contact: | Duncan Mac-Vicar <dmacvicar> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | lslezak, ma |
| Version: | Beta 1 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| See Also: | https://fate.suse.com/302119 | ||
| Whiteboard: | |||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
lazy-zypp-fate302119.patch
lazy-zypp-backtrace pkgsize.ycp - test script |
||
|
Description
Martin Vidner
2008-04-21 13:24:41 UTC
Created attachment 209299 [details]
lazy-zypp-fate302119.patch
Created attachment 209300 [details]
lazy-zypp-backtrace
Created attachment 209301 [details]
pkgsize.ycp - test script
Well, you can not access zypp after the lib was unloaded. But as we do not have Script reslovables any more, pkg-bindings could omit the target finish call without raising bug #228176 again. Those temp files are no longer created. Hopefully the stored zypp_pointer does not cause similar problems, as it also refers to data within zypp. I'll remove the targetFinish() call, but I'm not sure if I can release the zypp pointer (zypp_pointer = NULL). Michael? If libzypp was unloaded it is likely that this zypp_pointer in pkg-bindings is the last reference to the global ZYpp object. Thus ~PkgFunctions will invoke ~ZYpp. This will invoke a bunch of other destructors, and it is hard to tell whether this will work, as all the static zypp objects seem to be already deleted at that time. The save flow would be to make shure ~PkgFunctions is performed before libzypp is unloaded. Or at least to set the zypp_pointer to NULL before libzypp is unloaded. Everything else is fragile. Note that there is no need to explicitly set (zypp_pointer = NULL) in PkgFunctions. This will happen automatically in as zypp_pointer will go out of scope. So you can't prevent ~ZYpp from being called. I removed the code from the destructor (in SVN trunk). Martin, what about the patches? Can they be committed? Are they ready? The problem is still there, for the reasons in comment 6. Even if we do not call targetFinish, we still call the zypp destructor, and it crashes all the same. A clean fix is to explicitly destroy PkgFunctions (and thus zypp) before any of the static objects are destroyed. There are scores of static objects in YaST, so I find it difficult to do a clean fix. But I hope to untangle it soon. It is harder than I thought, so it will not be in this release. FATE 302119 has been postponed accordingly. This bug has been open for long but I haven't found the to fix it, so now I close it. Sorry. If you still care about it, please reopen it. |