"zypper search" never ends "Reading installed packages..."

Hi,

Doing some debugging in my packages/repos I performed a

zypper clean

and after that, every time I try to search for a package, the search never ends.
I think something is broken or something is locking the access to my installed software to zypper.
This is an example:

# zypper se nast
Loading repository data...
Reading installed packages...

This is my /var/log/zypper.log

this is part of an strace output from the same Process:


uname({sys="Linux", node="mainftp.site", ...}) = 0
write(3, "2013-08-05 15:57:26 <1> mainftp.site"..., 93) = 93
brk(0x3a41000)                          = 0x3a41000
brk(0x3c57000)                          = 0x3c57000
brk(0x4083000)                          = 0x4083000
mmap(NULL, 8617984, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd13b4d6000
mremap(0x7fd13b4d6000, 8617984, 8622080, MREMAP_MAYMOVE) = 0x7fd13ac9d000
mremap(0x7fd13ac9d000, 8622080, 8626176, MREMAP_MAYMOVE) = 0x7fd13ac9d000
mremap(0x7fd13ac9d000, 8626176, 8630272, MREMAP_MAYMOVE) = 0x7fd13ac9d000
mremap(0x7fd13ac9d000, 8630272, 8634368, MREMAP_MAYMOVE) = 0x7fd13ac9d000

I can’t find a clue about what is preventing to finalize the search. I don’t see error messages in the log file.
I tried rebooting the server but the behavior remains the same.
Ideas? suggestions?

PD: I can install software via yast, I am using openSuSE 12.2 x86_64

altmas5 wrote:
>
> Hi,
>
> Doing some debugging in my packages/repos I performed a
> Code:
> --------------------
> zypper clean
> --------------------
> and after that, every time I try to search for a package, the search
> never ends.
> I think something is broken or something is locking the access to my
> installed software to zypper.
> This is an example:
>
> Code:
> --------------------
> # zypper se nast
> Loading repository data…
> Reading installed packages…
>
> --------------------
>
>
> This is my ‘/var/log/zypper.log’ (http://slexy.org/raw/s2mPN4VDPN)
>
> this is part of an strace output from the same Process:
>
> Code:
> --------------------
>
> uname({sys=“Linux”, node=“mainftp.site”, …}) = 0
> write(3, “2013-08-05 15:57:26 <1> mainftp.site”…, 93) = 93
> brk(0x3a41000) = 0x3a41000
> brk(0x3c57000) = 0x3c57000
> brk(0x4083000) = 0x4083000
> mmap(NULL, 8617984, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd13b4d6000
> mremap(0x7fd13b4d6000, 8617984, 8622080, MREMAP_MAYMOVE) = 0x7fd13ac9d000
> mremap(0x7fd13ac9d000, 8622080, 8626176, MREMAP_MAYMOVE) = 0x7fd13ac9d000
> mremap(0x7fd13ac9d000, 8626176, 8630272, MREMAP_MAYMOVE) = 0x7fd13ac9d000
> mremap(0x7fd13ac9d000, 8630272, 8634368, MREMAP_MAYMOVE) = 0x7fd13ac9d000
> --------------------
>
>
> I can’t find a clue about what is preventing to finalize the search. I
> don’t see error messages in the log file.
> I tried rebooting the server but the behavior remains the same.
> Ideas? suggestions?
>
> PD: I can install software via yast, I am using openSuSE 12.2 x86_64
>
>
Since you did a clean, you may need to refresh the meta data using

sudo zypper ref -f


GNOME 3.6.2
openSUSE Release 12.3 (Dartmouth) 64-bit
Kernel Linux 3.7.10-1.16-desktop

Nope, refreshing the repo have no effect over the issue. I did tried that.
Thank you for your answer anyways
Any ideas?

I have no ideas (sorry!), but you problem reminds me another thread. Maybe the bug report will give you some hints.

On 08/06/2013 07:46 PM, altmas5 wrote:
> Nope, refreshing the repo have no effect over the issue. I did tried
> that.

try doing these, in order, one at a time, beginning in a USER
terminal, console…even if you tried some of them before:


su -
zypper rr PK_TMP_DIR
zypper clean --all
rpmdb --rebuilddb
zypper refresh -fdb
zypper up

do NOT forget the dash - after the su, give root pass when requested

do NOT interrupt any step once begun–some (especially the rpmdb
rebuild and zypper rebuild) of the steps will take some time (could
be several minutes in some cases, depending on the amount of work
to be done and the speed of the connection to the net…you can
shorten the time by [for example] stopping background downloading,
turn off the music or video, etc etc etc )

let us know of your success…or, not [read my sig caveat].


dd
http://tinyurl.com/DD-Caveat
http://tinyurl.com/DD-Complaints

Do not worry about performance, this a server and there is no unnecessary process running on it.

zypper rr PK_TMP_DIR

returned

Repository 'PK_TMP_DIR' not found by alias, number or URI.

The other commands were executed succesfully

Why do you think I do not know that some zypper arguments requires root capabilities if I am doing syscall debugging throught strace?
I think I look younger or novice, I should take it as a compliment :stuck_out_tongue:

PS: It still hangs on “Reading installed packages”

On 08/09/2013 07:06 PM, altmas5 wrote:
>
> The other commands were executed succesfully

including “zypper up”??

> Why do you think I do not know that some zypper arguments requires root
> capabilities if I am doing syscall debugging throught strace?

because some people with lots of experience in other distros, unix,
aix, bsd, etc etc etc are not born with the knowledge that the three
following command do not have the same results in openSUSE

su
su -
sudo

> I think I look younger or novice, I should take it as a compliment :stuck_out_tongue:

as you wish…but, you did not declare yourself as an openSUSE
expert so i went the extra mile to help you get it right on
openSUSE…please see that as a desire to help and not as an attempt
to say you are a novice…at anything…

> PS: It still hangs on “Reading installed packages”

i do not know how else i can help with the zypper problem.

but perhaps if you were to tell which version of which operating
system you are running as well as show the repos in use and tell what
DE and version is in use, if applicable…and maybe another can
help more…

by the way, most non-novice *nix-like admins won’t reboot a server
hoping for a fix.

ymmv


dd
http://tinyurl.com/DD-Complaints

I already included my openSUSE version and arch in my first post in this thread.
I am not using a DE, just text mode enviroment

Your reply sounds like you are angry.
I didn’t mean to bother you, I was joking trying to make fun of this strange state in package manager administration.

My answers:
Yes, I included “zypper update”

I do not consider myself an expert and even rebooting a server is mostly a MS windows solution, but this is a server which is not in production yet and I thought rebooting would erase any cache in zypper.

BTW, which value should PK_TMP_DIR have?

Thank you for your help.

On 08/09/2013 10:16 PM, altmas5 wrote:
>
> I already included my openSUSE version and arch in my first post in this
> thread.

ah yes, i see it now…

> I am not using a DE, just text mode enviroment

k

>
> Your reply sounds like you are angry.

not at all…disappointed that you thought i thought you were a
noob…AND i can’t solve your prob…

> I didn’t mean to bother you, I was joking trying to make fun of this
> strange state in package manager administration.
>
> My answers:
> Yes, I included “zypper update”

then i have no idea why you continue to have trouble with ‘zypper search’

well, how about show us (exactly) the incantation you give that
results in a never ending search…please just copy paste and give it
more than enough time to complete–during that time does is the hard
drive being hit…if LED can be seen is it blinking in a repetitive
way (is it in a loop)…or is the hdd not being touched…

start a instance of top and see if zypper consumes a huge quantity of
RAM or cycles…

> I do not consider myself an expert and even rebooting a server is
> mostly a MS windows solution, but this is a server which is not in
> production yet and I thought rebooting would erase any cache in zypper.

there is/are zypp.* cache in /var/tmp which will probably persist
though a boot…you might try renaming them…and, there might be
something in /tmp which is usually safe to empty during a boot…

by the way, i am not an expert of anything, except maybe my own history.

> BTW, which value should PK_TMP_DIR have?

it usually only exists if a zypper/yast process was interrupted in
some way (abort, system freeze, user action, etc etc)…if the
process runs to end and completes it will be (should be deleted)…if
not deleted it can ‘confuse’ subsequent processes…

that you didn’t have one, was a good thing…i should have told you
that…sorry.

>
> Thank you for your help.

i don’t have much…oh, you might use YaST Software Management to
uninstall and then install zypper…(it sometimes works if yast is
flaky to use zypper to uninstall/reinstall yast…so, why not try)

of course i know you know how to put in zypper commands, but just for
grins give us an example or three and lets see if anyone can
duplicate your experience…(i have not checked bugzilla to see if
this is a bug in some strange corner case!! you can look:
http://tinyurl.com/nzhq7j)

hmmmmm, what else could impact that? zypp libs from a different
version–have you done that (mixed versions)? show your repos with


zypper lr -d

how about mixing in factory code? or tumbleweed code? or, how did you
get to 12.2, that is did you fresh format to blow away the old
system/configs completely (saving home & data) and then install–or
did you ‘upgrade’ over a previous version (the latter often results
in unexplainable problems here and there)?

if you moved from a different distro to openSUSE did you retain your
/home or /etc as you moved?

like that . . .


dd
http://tinyurl.com/DD-Caveat
http://tinyurl.com/DD-Complaints

When you see that “Reading Installed Packages…” what’s really happening is that zypper is going online and refreshing package lists even if it was just refreshed only 10min ago…

If you actually want to see what’s happening, run “zypper ref” before running “zypper se foobar”

The big problem appears to be how big the Update repos have become, maybe a new technology, eg comparing a hash to see if anything has changed in the past 10min would save a ton of waiting.

But, the simple solution is to disable remote refreshing especially if you refreshed very recently, just use the “no remote” flag as follows

zypper --no-remote se foobar

And then you’ll get your results fast.

TSU

On 08/11/2013 07:36 AM, tsu2 wrote:
> When you see that “Reading Installed Packages…” what’s really
> happening is that zypper is going online and refreshing package lists

i think “Reading Installed Packages…” follows “Loading repository
data…” which is the step described as “going online and refreshing
package lists”

i think “Reading Installed Packages…” is something done on the
local machine whether the distant lists are read, or not…which is
why the output from the prescription


zypper --no-remote se foobar

also includes the step “Reading Installed Packages…” on the local
machine after remote repos are ignored during the “Loading
repository data…” step, because they are blocked by the --no-remote
switch.

for example:


linux-os114:~ # zypper --no-remote se libzypp
Ignoring repository '11.4-non-oss' because of 'no-remote' option.
<snipped away _many_ other repos being ignored>
Ignoring repository 'security' because of 'no-remote' option.
Loading repository data...
Reading installed packages...

S | Name    |Summary                                         |Type
--+---------+------------------------------------------------+-------
i | libzypp |Package, Patch, Pattern, and Product Management |package

of course, my zypper is older than any of the other posters in this
thread, so maybe zypper changed? could be…

additionally, because the default wait to refresh value is set to 10
minutes, another refresh will not occur if the last was only 9
minutes ago, or less…

that value is adjustable by editing /etc/zypp/zypp.conf from the
default in line one below, to line two (for example) which will set
the delay to be one hour…


# repo.refresh.delay = 10
repo.refresh.delay = 60


dd
http://tinyurl.com/DD-Caveat
http://tinyurl.com/DD-Complaints