Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375203 - sys-devel/prelink segfaults and produces strange message
Summary: sys-devel/prelink segfaults and produces strange message
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 18:06 UTC by Diego Augusto Molina
Modified: 2011-07-15 13:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge--info.txt,11.78 KB, text/plain)
2011-07-14 23:22 UTC, Diego Augusto Molina
Details
Relevant part of /var/log/emerge.log (emerge.log,66.80 KB, text/plain)
2011-07-14 23:30 UTC, Diego Augusto Molina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Augusto Molina 2011-07-14 18:06:13 UTC
Originally discussed in Gentoo Forum http://forums.gentoo.org/viewtopic.php?p=6753640
Fresh install. stage3-amd64-20110609.tar.bz2, July 11th portage, Xen dom0. After installing sys-devel/prelink-20100106 (the latest stable version available in the tree) when I run emerge a message is printed directly into the terminal: "unexpected reloc type in static binary" (no newline). It is the first line always and when actually emerging something it may be printed more than once. No matter what arguments prelink may recieve it segfaults persistently after printing that message. Couldn't find further consequences. Rest of the packages compile and run ok as far as I can notice.
This system is in fact reproducing what I've first noticed in another Xen dom0 which was being updated after several months.
Comment 1 Diego Augusto Molina 2011-07-14 23:22:41 UTC
Created attachment 280089 [details]
emerge --info output

I don't like emerge --info polluting the report
Comment 2 Diego Augusto Molina 2011-07-14 23:30:19 UTC
Created attachment 280091 [details]
Relevant part of /var/log/emerge.log

This shows the packages that were emerged. Before this emerge, everything was fine. I made some polling with `emerge' in another term while I was running the `emerge -quDN world'. The last successful one was executed after this line:
1310651225:  ::: completed emerge (64 of 94) net-mail/mailbase-1 to /
Comment 3 Diego Augusto Molina 2011-07-14 23:39:25 UTC
Hi, I have to say that I'm puzzled in here. I thought that this was a problem related to prelink but I will have to expand the options. I uninstalled prelink and emerge started to do ok but something else happened: I run cryptsetup and it fails the same way prelink used to ("unexpected reloc type in static binarySegmentation Fault").
So I try to imagine that prelink could have installed or modified *something* that `emerge -C' could not remove, or could that be dev-libs/elfutils-0.149, which is pulled in by prelink. Those packages are supicious because they are the only ones that are related to development and elf binaries that were emerged after things had been ok, and then things went wrong. So having this two unmerged cryptsetup fails, I see cryptsetup was compiled statically, then I reemerge it and it works ok! For now I don't need it to be statically linked.
Now I want to see what else did I compile statically (which I have control on) so I run:

# eix --installed-with-use --compact static
[I] dev-libs/glib (2.28.8(2)@07/14/11): The GLib library of C routines
[I] dev-libs/libgcrypt (1.4.6@07/14/11): General purpose crypto library based on the code used in GnuPG
[I] dev-libs/libgpg-error (1.10@07/14/11): Contains error handling functions used by GnuPG software
[I] dev-libs/popt (1.16-r1@07/14/11): Parse Options - Command line parser
[I] sys-fs/lvm2 (2.02.73-r1@07/14/11): User-land utilities for LVM2 (device-mapper) software.
Found 5 matches.

But I have been working with lvm2 and is working ok.
Now that I have cryptsetup dynamically linked and working I run:

# ldd $(which cryptsetup)
        linux-vdso.so.1 =>  (0x00007fff575ff000)
        libcryptsetup.so.1 => /usr/lib64/libcryptsetup.so.1 (0x00007ff300832000)
        libpopt.so.0 => /usr/lib64/libpopt.so.0 (0x00007ff300626000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff3002a1000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007ff30009c000)
        libdevmapper.so.1.02 => /lib64/libdevmapper.so.1.02 (0x00007ff2ffe76000)
        libgcrypt.so.11 => /usr/lib64/libgcrypt.so.11 (0x00007ff2ffbfd000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff300a48000)
        libudev.so.0 => /lib64/libudev.so.0 (0x00007ff2ff9ef000)
        libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007ff2ff7eb000)
Comment 4 Pacho Ramos gentoo-dev 2011-07-15 09:47:35 UTC
Maybe you should rebuild your system with safer LDFLAGS
Comment 5 Diego Augusto Molina 2011-07-15 13:28:56 UTC
(In reply to comment #4)
> Maybe you should rebuild your system with safer LDFLAGS

You know, that's exactly the kind of solution I didn't want (I didn't want to recompile the whole thing) but you were right hehe. I deleted the LDFLAGS in /etc/make.conf so that I use the default ones now. To check the problem, I also deleted the 'dynamic' USE flag so that cryptsetup links statically and now it works.
Thanks, and I don't think this is a bug really then, it's more a consequence of playing around with LDFLAGS worldwide so I close this as RESOLVED INVALID.