|
Bugzilla – Full Text Bug Listing |
| Summary: | Libzypp caches all downloaded RPMs from remote repos. to /suse and finally kernel kills YaST for OOM | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.0 | Reporter: | Lukas Ocilka <locilka> |
| Component: | libzypp | Assignee: | Ladislav Slezák <lslezak> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | CC: | harbaugh, lslezak |
| Version: | Factory | Flags: | coolo:
SHIP_STOPPER-
|
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
Screenshot
YaST logs YaST log proposed patch for #9 pkg bindings patch |
||
Created attachment 218355 [details]
YaST logs
There are some possible causes: 1.) Packages are copied to ./suse/ grep "\copy .* ./suse" y2log | tail -n 1 2008-05-27 19:20:26 <1> 10.0.2.15(3075) [zypp] PathInfo.cc(_Log_Result):295 copy /mnt/var/tmp/AP_0x00000002/suse/i586/dbus-1-1.2.1-12.i586.rpm -> ./suse/i586/dbus-1-1.2.1-12.i586.rpm grep "\copy .* ./suse" y2log | wc -l 555 2.) Some cache directory is set to '' grep "Not adding cache" y2log | tail -n 1 2008-05-27 19:20:26 <3> 10.0.2.15(3075) [zypp] Fetcher.cc(addCachePath):135 Not adding cache ''. Path does not exists. grep "Not adding cache" y2log | wc -l 556 A simple fix for 11.0 would be to force "keep_packages=false" for all used repositories for installation just before Pkg::PkgCommit() ... well, if it works :) *** Bug 394944 has been marked as a duplicate of this bug. *** I've tried also an add_on_products file with http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/ inside The result is the same, RPMs are cached in /suse in inst-sys. I'll try with zypp-fullog... Package bindings always set repo.setKeepPackages(false); (Checked for add_on_products and Community Repositories) It seems the problem is somewhere else... --- here --- [zypp] PathInfo.cc(_Log_Result):295 copy /mnt/var/tmp/AP_0x00000002/suse/i586/dbus-1-1.2.1-12.i586.rpm -> ./suse/i586/dbus-1-1.2.1-12.i586.rpm --- here --- At first, package is downloaded under some "strange name" ;), then it is renamed to the original name. After that is is *copied* (why?) to './suse' before calling the `rpm` command to install it. Probably mistake the path should have been /mnt/...something..cache..././suse/ but `pwd` is "/" in inst-sys. Hint: It might have been caused by another bugfix. I remember reporting a bug where apostrophes were not escaped correctly and that's why `rpm` command sometimes failed. That would explain why are RPMs copied somewhere else before calling `rpm`. Anyway, it's better to call rpm -Uvh '/path/to/john\'s repo/some.rpm' (escaping just "'" apostrophes, surrouding by them too) than rpm -Uvh /path/to/john\'s\ repo/some.rpm (or similar) Created attachment 218525 [details]
YaST log
for example, grep for
zgrep "ispell-american" y2log.gz
to see what happens with downloaded RPMs...
Two possible problems:
1.) Packages is downloaded, renamed and them *copied* to inst-sys (/suse)
Which wastes memory too much (e.g., 48 MB for OpenOffice package)
2.) Package is installed but not unlinked after that
(remains in memory until the memory is full and installation killed)
The problem is RepoInfo::packagesPath() returns empty path. It should be $root/$cachedir/packages/$alias. It should default to /var/cache/zypp/packages/$alias. If $root is set (which should be "/mnt" in the installation) we should get /mnt/var/cache/zypp/packages/$alias, which is what we want. All these can be configured via zypp.conf or RepoManagerOptions(Pathname root = ""), so the bug should be somewhere around there. In the zypp conf, or when creating RepoManager and its options. And additionally, the cached packages from remote repos are not removed despite the keeppackages=false. Created attachment 218592 [details] proposed patch for #9 Got comment #9 (the most critical part). RepoInfo::addBaseUrl() sets the keeppackages flag by medium type. I.e. it _overwrites_ any value which has been set before addBaseUrl() :O( (this is a palce where the original tribools would be usefull). The patch in comment #9 works (tested). So the bug should no longer block installation/testing. Comment #8 still needs figuring out. Created attachment 218708 [details]
pkg bindings patch
I was hoping this patch will do it (needs newest libzypp), but either it won't or i do not test it right. Lado, can you check the patch?
I just have done RC1 installation - the packages are still downloaded to /suse/... but there is only one package at a time (the current package), after installation it's removed. So the installation should not be killed. I have also tested the current libzypp from SVN. The packages are downloaded (and copied) to /var/adm... in _running_ system: 2008-05-29 09:12:10 <1> muffin(13261) [YCP] PackageCallbacks.ycp:1859 Downloading http://cml.suse.cz/netboot/find/openSUSE-11.0-Beta3-DVD-x86_64/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm to /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm 2008-05-29 09:12:11 <1> muffin(13261) [zypp] PathInfo.cc(_Log_Result):295 rename /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm.new.zypp.S6NIYI -> /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm 2008-05-29 09:12:11 <1> muffin(13261) [zypp] PathInfo.cc(_Log_Result):295 copy /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm -> /var/cache/zypp/packages/openSUSE-DVD 11.0/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm 2008-05-29 09:12:11 <1> muffin(13261) [zypp] PathInfo.cc(_Log_Result):295 unlink /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm I'll chek the patch... (In reply to comment #13 from Ladislav Slezak) > I just have done RC1 installation - the packages are still downloaded to > /suse/... but there is only one package at a time (the current package), after > installation it's removed. So the installation should not be killed. Yes, that's what comment #11 says :O) > I have also tested the current libzypp from SVN. The packages are downloaded > (and copied) to /var/adm... in _running_ system: No, they are (correctly) copied to /var/cache/zypp/packages > /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm -> > /var/cache/zypp/packages/openSUSE-DVD 11.0/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm > 2008-05-29 09:12:11 <1> muffin(13261) [zypp] PathInfo.cc(_Log_Result):295 > unlink /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm This is what we should see also during installation (with /mnt prefix of course). 2008-05-29 09:12:11 <1> muffin(13261) [zypp] PathInfo.cc(_Log_Result):295 copy /var/adm/mount/AP_0x00000001/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm -> /var/cache/zypp/packages/openSUSE-DVD11.0/suse/x86_64/awesfx-0.5.1a-55.x86_64.rpm I have reproduced it installed system: 2008-05-29 12:05:00 <1> muffin(9621) [zypp] PathInfo.cc(_Log_Result):295 copy /var/adm/mount/AP_0x00000002/suse/x86_64/ziptool-1. 4.0-219.x86_64.rpm -> ./suse/x86_64/ziptool-1.4.0-219.x86_64.rpm I'll check the patch if it helps... With the patch it works correctly: 2008-05-29 12:28:03 <1> muffin(10622) [zypp] PathInfo.cc(_Log_Result):295 copy /var/adm/mount/AP_0x00000002/suse/x86_64/ziptool-1.4.0-219.x86_64.rpm -> /var/cache/zypp/packages/http:__download.opensuse.org_distribution_SL-OSS-factory_inst-source__1/suse/x86_64/ziptool-1.4.0-219.x86_64.rpm The same fix it needed in one more place in pkg-bindings, I'll fix that... Submitted in yast2-pkg-bindings-2.16.39 (requires libzypp >= 4.25.1) |
Created attachment 218354 [details] Screenshot I've found that if Community Repositories are used during installation (maybe another ones too, tested with NFS-based inst-repository), downloaded RPMs are stored in /suse/ directory. See the screenshot attached. cd 'suse'; du -sh * 193M i586 1.5M i686 198M noarch Package bindings actually set keep_packages to 'false' by default.