Created attachment 388684 [details] emerge --info =app-portage/eix-0.29 I am trying to use a custom format to print the revision number alone, but eix hangs with no output. Here's the deal: when I do: VERSION='<version>\n' eix -Ae --pure-packages --format '<availableversions:VERSION>' dev-lang/perl it prints as expected all the available versions (with revision numbers embredded) of perl; no problem when I use installedversions instead of availableversions either. If I instead do: VERSION='<revision>\n' eix -Ae --pure-packages --format '<availableversions:VERSION>' dev-lang/perl or VERSION='<revision>\n' eix -Ae --pure-packages --format '<installedversions:VERSION>' dev-lang/perl to get the revision numbers alone, eix just hangs with absolutely no output but consumes resources like crazy - CPU usage stays at 100% and for the first 5-10 seconds or so the process reads from rootfs at several MB/s. I experimented with various packages, both installed and not installed, both printing all available and only installed versions, bottom line is: 1) When I try to print information about a version that has defined a revision number (e.g. I am requesting revision numbers of all available versions of a package that has at least one version with a non-zero revision number OR I am simply requesting the installed versions of a package, one of which has a non-zero revision number) - it hangs as described above 2) When I am printing information about versions that don't specify a revision number (e.g. only requesting the installed versions and none of them defines a revision OR none of the available versions of the package have a revision number anyway) - it prints just fine (it prints an empty line, since eix's <revision> is empty rather than -r0, if it hasn't been specified) I used strace to try to see what's going on. Obviously the eix process doesn't terminate, I have to kill it by sending it SIGTERM, but after I've killed it, strace outputs: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 100.00 0.085363 14227 6 munmap 0.00 0.000000 0 8 3 mmap 0.00 0.000000 0 1 mprotect 0.00 0.000000 0 1 brk ------ ----------- ----------- --------- --------- ---------------- 100.00 0.085363 16 3 total This problem does not occur with version 0.30.4. For comparison, the output of strace for v0.30.4 is: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 91.21 0.000280 0 18461 lseek 8.79 0.000027 0 1936 read 0.00 0.000000 0 5 write 0.00 0.000000 0 69 17 open 0.00 0.000000 0 65 close 0.00 0.000000 0 89 stat 0.00 0.000000 0 35 fstat 0.00 0.000000 0 183 lstat 0.00 0.000000 0 54 mmap 0.00 0.000000 0 18 mprotect 0.00 0.000000 0 27 munmap 0.00 0.000000 0 44 brk 0.00 0.000000 0 1 rt_sigaction 0.00 0.000000 0 2 ioctl 0.00 0.000000 0 1 1 access 0.00 0.000000 0 1 execve 0.00 0.000000 0 2 fcntl 0.00 0.000000 0 26 getdents 0.00 0.000000 0 1 readlink 0.00 0.000000 0 1 setuid 0.00 0.000000 0 1 setgid 0.00 0.000000 0 2 setgroups 0.00 0.000000 0 1 setresuid 0.00 0.000000 0 1 setresgid 0.00 0.000000 0 1 arch_prctl 0.00 0.000000 0 49 36 openat ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000307 21076 54 total emerge --info eix for version 0.29 is attached I'm running gentoo-3.16.5 x86_64
*** This bug has been marked as a duplicate of bug 483392 ***
(In reply to Martin Väth from comment #1) > > *** This bug has been marked as a duplicate of bug 483392 *** I apologize if I'm wrong, but I believe it is not a duplicate of this bug and the root of the problem maybe different: as far as I understood, the above mentioned bug relates to a crash of eix that occurs when the variable specified is undefined. In my case I DO define the variable (e.g. VERSION) and the bug (eix freezing) does NOT occur always - only when the package being matched actually has a non-zero revision number, so it's unlikely the problem has to do with the variable used in the format specifier.
The above bug is caused by faulty compiler optimization hints in the code which may lead to all sorts of unpredictable behaviour, including crashes and hangs under various circumstances, see also the other duplicates which may appear unrelated. Reopen if you can reproduce it with current eix (0.30.4 or newer). I do not backport bugfixes anyway, and hunting for a bug in known broken code is particularly pointless. I think it is time to stabilize eix-0.30.4 to avoid further such duplicates. *** This bug has been marked as a duplicate of bug 483392 ***