Re: find-debuginfo failing with objcopy Permission denied error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 18, 2024 at 07:50:38AM -0800, Kevin Fenzi wrote:
> On Mon, Nov 18, 2024 at 03:35:38PM +0000, Richard W.M. Jones wrote:
> > On Mon, Nov 18, 2024 at 03:16:13PM +0000, Richard W.M. Jones wrote:
> > > This is a weird one:
> > > 
> > > https://koji.fedoraproject.org/koji/taskinfo?taskID=125988419
> > > 
> > > + /usr/bin/find-debuginfo -j48 --strict-build-id -m -i --build-id-seed 1.55.2-1.fc42 --unique-debug-suffix -1.55.2-1.fc42.x86_64 --unique-debug-src-base libguestfs-1.55.2-1.fc42.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/libguestfs-1.55.2-build/libguestfs-1.55.2
> > > find-debuginfo: starting
> > > Extracting debug info from 13 files
> > > objcopy: unable to copy file '/builddir/build/BUILD/libguestfs-1.55.2-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so'; reason: Permission denied
> > > *** ERROR:: GDB exited with exit status 1 during index generation
> > 
> > I managed to reproduce this locally.  The file permissions look
> > normal, albeit the file is write-protected:
> > 
> > -r-xr-xr-x. 1 rjones rjones 2885944 Nov 18 15:22 /home/rjones/d/fedora/libguestfs/rawhide/libguestfs-1.55.2-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so
> > 
> > I patched gdb-add-index to print the exact command which fails, and
> > that is:
> > 
> > + objcopy --add-section .gdb_index=/home/rjones/d/fedora/libguestfs/rawhide/libguestfs-1.55.2-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so.gdb-index --set-section-flags .gdb_index=readonly /home/rjones/d/fedora/libguestfs/rawhide/libguestfs-1.55.2-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so /home/rjones/d/fedora/libguestfs/rawhide/libguestfs-1.55.2-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so
> > objcopy: unable to copy file '/home/rjones/d/fedora/libguestfs/rawhide/libguestfs-1.55.2-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so'; reason: Permission denied
> > 
> > It seems like it is trying to update the file in place, which is
> > interesting.  Is that allowed?  Anyway as the permissions of the file
> > are 0555 it won't be able to do that.  Is this a recent change in
> > behaviour?
> 
> Perhaps the same thing as this thread:
> https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/thread/GG4LQYBEKGWAGFSJ5PKTKJAOHLAB3A27/#QYIK5E642MDB4NGBXLRLLTMU7HAJOVV5

The symptoms look the same.  This prompted me to go back to the last
successful libguestfs build to see if the same command failed but the
failure was ignored, and yes that's exactly what happened:

https://koji.fedoraproject.org/koji/buildinfo?buildID=2573135
https://kojipkgs.fedoraproject.org//packages/libguestfs/1.55.1/1.fc42/data/logs/x86_64/build.log

...
Extracting debug info from 13 files
objcopy: unable to copy file '/builddir/build/BUILD/libguestfs-1.55.1-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so'; reason: Permission denied
objcopy: unable to copy file '/builddir/build/BUILD/libguestfs-1.55.1-build/BUILDROOT/usr/lib64/perl5/vendor_perl/auto/Sys/Guestfs/Guestfs.so'; reason: Permission denied
DWARF-compressing 13 files
...

> ie, debugedit 5.1?

Yes it's this version.

I added this patch which fixed local builds, but it feels wrong somehow ...

diff --git a/libguestfs.spec b/libguestfs.spec
index 1ca2b3a..aa4d4f8 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -802,6 +802,10 @@ find $RPM_BUILD_ROOT -name .packlist -delete
 find $RPM_BUILD_ROOT -name '*.bs' -delete
 find $RPM_BUILD_ROOT -name 'bindtests.pl' -delete
 
+# debuginfo generation fails with debugedit >= 5.1 unless the files
+# are writable:
+find $RPM_BUILD_ROOT -name Guestfs.so -exec chmod u+w {} \;
+
 # golang: Ignore what libguestfs upstream installs, and just copy the
 # source files to %%{_datadir}/gocode/src.
 %ifarch %{golang_arches}

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit

-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux