Bug 1295421 - eu-strip: while creating '/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib/debug/usr/lib64/squid/negotiate_kerberos_auth.debug': Invalid cross-device link [NEEDINFO]
eu-strip: while creating '/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7....
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: elfutils (Show other bugs)
7.2
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Mark Wielaard
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-04 07:44 EST by Brian J. Murrell
Modified: 2016-02-10 11:45 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-10 11:45:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mjw: needinfo? (brian)


Attachments (Terms of Use)

  None (edit)
Description Brian J. Murrell 2016-01-04 07:44:17 EST
Description of problem:
When trying to rebuild squid from SRPM I get an error:

eu-strip: while creating '/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib/debug/usr/lib64/squid/negotiate_kerberos_auth.debug': Invalid cross-device link

Version-Release number of selected component (if applicable):
elfutils-0.163-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. download SRPM
2. install SRPM
3. rpmbuild -bb squid.spec

Actual results:
eu-strip: while creating '/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib/debug/usr/lib64/squid/negotiate_kerberos_auth.debug': Invalid cross-device link

Expected results:
Should just build

Additional info:
Last lines of build output:

+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /net/linux/src/RPM/BUILD/squid-3.3.8
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/bin/squidclient
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/bin/purge
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_radius_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/digest_file_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/unlinkd
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/ext_file_userip_acl
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/digest_edirectory_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_sasl_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/ssl_crtd
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/log_file_daemon
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_ldap_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_msnt_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/ext_ldap_group_acl
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/ext_time_quota_acl
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_pam_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/ext_session_acl
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_ncsa_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_nis_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/ntlm_smb_lm_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/url_fake_rewrite
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/ext_unix_group_acl
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/basic_getpwnam_auth
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/negotiate_kerberos_auth_test
extracting debug info from /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/negotiate_kerberos_auth
eu-strip: while creating '/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib/debug/usr/lib64/squid/negotiate_kerberos_auth.debug': Invalid cross-device link
error: Bad exit status from /var/tmp/rpm-tmp.ckfqqE (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.ckfqqE (%install)

In case it's not obvious, /net/linux/src is an automounted NFS dir.  But that should really not be the cause of an "Invalid cross-device link".  That would happen in any kind of filesystem so long as the source filesystem was not the same as the destination of whatever is being linked.
Comment 2 Mark Wielaard 2016-01-04 09:35:03 EST
(In reply to Brian J. Murrell from comment #0)
> extracting debug info from
> /net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/
> negotiate_kerberos_auth
> eu-strip: while creating
> '/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib/debug/usr/
> lib64/squid/negotiate_kerberos_auth.debug': Invalid cross-device link
> error: Bad exit status from /var/tmp/rpm-tmp.ckfqqE (%install)
> 
> 
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.ckfqqE (%install)
> 
> In case it's not obvious, /net/linux/src is an automounted NFS dir.  But
> that should really not be the cause of an "Invalid cross-device link".  That
> would happen in any kind of filesystem so long as the source filesystem was
> not the same as the destination of whatever is being linked.

I believe eu-strip simply renames/moves the file from
/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib64/squid/
to
/net/linux/src/RPM/BUILDROOT/squid-3.3.8-26.01.el7.x86_64/usr/lib/debug/usr/lib64/squid/

expecting those subdirectories of the BUILDROOT to be under the same mount point. Is that expectation violated by your setup?
Comment 3 Brian J. Murrell 2016-01-04 10:33:10 EST
(In reply to Mark Wielaard from comment #2)
> 
> expecting those subdirectories of the BUILDROOT to be under the same mount
> point. Is that expectation violated by your setup?

Not at all.  /net/linux/src is a single filesystem.
Comment 4 Mark Wielaard 2016-01-05 15:13:56 EST
(In reply to Brian J. Murrell from comment #3)
> (In reply to Mark Wielaard from comment #2)
> > 
> > expecting those subdirectories of the BUILDROOT to be under the same mount
> > point. Is that expectation violated by your setup?
> 
> Not at all.  /net/linux/src is a single filesystem.

Then I don't immediate know what is going on.
How is eu-unstrip invoked exactly?
Comment 5 Brian J. Murrell 2016-01-05 15:35:30 EST
(In reply to Mark Wielaard from comment #4)
> 
> Then I don't immediate know what is going on.

Indeed.  Puzzling.

> How is eu-unstrip invoked exactly?

It's being called from the macros that rpmbuild invokes when creating the debug sub-package.
Comment 6 Mark Wielaard 2016-01-06 09:53:47 EST
(In reply to Brian J. Murrell from comment #5)
> (In reply to Mark Wielaard from comment #4)
> > 
> > Then I don't immediate know what is going on.
> 
> Indeed.  Puzzling.

It is strange that it seems to work for other files in the same directory.
Does it always break in the same way on the same file in the same dir?

Does it work if you do the build in a different non-automounted NFS dir?

> > How is eu-unstrip invoked exactly?
> 
> It's being called from the macros that rpmbuild invokes when creating the
> debug sub-package.

If you are adventures then you could add the following to see what is really going on:

--- /usr/lib/rpm/find-debuginfo.sh.orig	2016-01-06 15:49:09.135155917 +0100
+++ /usr/lib/rpm/find-debuginfo.sh	2016-01-06 15:49:38.608460303 +0100
@@ -131,6 +131,7 @@
   $strip_g && case "$(file -bi "$2")" in
   application/x-sharedlib*) g=-g ;;
   esac
+  echo Calling: eu-strip --remove-comment $r $g -f "$1" "$2"
   eu-strip --remove-comment $r $g -f "$1" "$2" || exit
   chmod 444 "$1" || exit
 }
Comment 7 Mark Wielaard 2016-01-25 06:15:25 EST
Could you try the suggestions and provide the answers asked in comment #6?
Comment 8 Mark Wielaard 2016-02-10 11:45:40 EST
For now given that I am unable to reproduce the issue I am going to assume that the issue is related to the special way /net/linux/src is mounted. And suggest you rebuild on a different file system instead.

Please feel free to reopen this bug if the issue persists and you can provide some of the information requested in comment #6.

Note You need to log in before you can comment on or make changes to this bug.