Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 533168

Summary: sys-power/pm-utils-1.4.1-r6 - install-xattr: getxattr() failed: No data available // doexe failed
Product: Gentoo Linux Reporter: Alexander Puchmayr <alexander.puchmayr>
Component: [OLD] Core systemAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: normal CC: dev-portage
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
output of emerge --info '=sys-power/pm-utils-1.4.1-r6::gentoo'

Description Alexander Puchmayr 2014-12-21 09:21:35 UTC
emerge fails with 

install-xattr: getxattr() failed: No data available

see attached full build log for details.

Reproducible: Always

Steps to Reproduce:
emerge =sys-power/pm-utils-1.4.1-r6
Comment 1 Alexander Puchmayr 2014-12-21 09:22:17 UTC
Created attachment 392136 [details]
build.log
Comment 2 Alexander Puchmayr 2014-12-21 09:24:55 UTC
Created attachment 392138 [details]
output of emerge --info '=sys-power/pm-utils-1.4.1-r6::gentoo'
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-21 10:31:46 UTC

*** This bug has been marked as a duplicate of bug 527636 ***
Comment 4 Zac Medico gentoo-dev 2014-12-21 17:19:47 UTC
(In reply to Jeroen Roovers from comment #3)
> 
> *** This bug has been marked as a duplicate of bug 527636 ***

It's not the same bug, because getxattr is failing (not setxattr).
Comment 5 Zac Medico gentoo-dev 2014-12-21 17:28:32 UTC
I suspect that whatever filesystem you are using for /var/tmp/portage does not have xattr support enabled.

Since you're not using a hardened profile, you probably don't need xattr support. Therefore, you may want to simply set FEATURES="-xattr" in /etc/portage/make.conf.
Comment 6 SpanKY gentoo-dev 2015-06-02 15:18:54 UTC
(In reply to Zac Medico from comment #5)

hardened is trending the exact opposite actually :).  plan is to pull pax settings out of the ELFs and into the xattrs.

at some point we'll want to make that fatal on at least hardened ...
Comment 7 Zac Medico gentoo-dev 2015-06-02 15:37:09 UTC
(In reply to SpanKY from comment #6)
> hardened is trending the exact opposite actually :).  plan is to pull pax
> settings out of the ELFs and into the xattrs.

I know, but the user isn't using a hardened profile, so that's why I suggested to disable xattrs. Alternatively, he could use a filesystem with xattrs, which is useful even without hardened for xattrs like security.capability used by util-linux for /bin/ping.

> at some point we'll want to make that fatal on at least hardened ...

It seems to be fatal already, as shown in the attached build log. I'm really not sure that anything needs to be fixed for this bug report. Maybe it's a documentation issue?
Comment 8 SpanKY gentoo-dev 2015-06-02 16:04:57 UTC
(In reply to Zac Medico from comment #7)

sorry, i missed the operative "not" ;)

if you set FEATURES=xattr and you don't configure the system to support it, then it should die imo.  there's already a knob to avoid the failure -- don't try and enable xattrs.

i'm not sure extra lines in a man page would help.  this bug report is probably fairly indicative of the type of reports -- the build fails with an obscure error that isn't easily associated with FEATURES=xattrs and users would just file a bug and attach the log.

i would guess the reason we're getting ENODATA instead of ENOTSUP is that the fs supports *some* xattrs, but not the namespace we expect ?  should ENODATA be ignored since, by definition, there's no data to be preserved ?
Comment 9 Christian Parpart 2015-11-11 13:27:26 UTC
Hi,

it looks like I am having the same problem.

emerge $PACKAGE does a "dosbin ..." that in turn wants to run /usr/bin/install-xattr, which then returns with the error message as shown above.

Doing a small test of `install-xattr dead.letter /var/tmp/dead.letter` to reproduce, I get the same error, too.

Running the same command again, with strace, I'll get the following two interesting lines out of it:

listxattr("dead.letter", NULL, 0)       = 49
listxattr("dead.letter", "system.posix_acl_access\0system.posix_acl_default\0", 49) = 49
getxattr("dead.letter", "system.posix_acl_access", 0x0, 0) = -1 ENODATA (No data available)


The first command is just to see how many bytes to allocate (49),
the second actually receives the list of extended attributes (two),
the third syscall seems to be an iteration over the retrieved list, and interestingly, even though that xattr was listed, it tells us that it's having no data for it.

Now, I do not know whether this is intended, maybe xattrs can exist with no payload attached to it (never tried),

but maybe it's sufficient for install-xattr to just mirror the behaviour by either creating an empty xattr on the target inode or by skipping it all together (or at least the system.* xattrs).

Regards,
Christian.
Comment 10 Zac Medico gentoo-dev 2015-11-11 17:49:16 UTC
(In reply to Christian Parpart from comment #9)
> Now, I do not know whether this is intended, maybe xattrs can exist with no
> payload attached to it (never tried),

What filesystem are you using? I wonder if this affects portage's internal implementation too. You can export PORTAGE_INSTALL_XATTR_IMPLEMENTATION=python in your environment, and that will allow you to test portage's python implementation.
Comment 11 Larry the Git Cow gentoo-dev 2021-02-21 10:57:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f146bb7e14ac3405429772d4adfef555f7810c20

commit f146bb7e14ac3405429772d4adfef555f7810c20
Author:     Jakov Smolic <jakov.smolic@sartura.hr>
AuthorDate: 2021-02-21 10:56:16 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-02-21 10:56:16 +0000

    sys-power/pm-utils: Remove last-rited pkg
    
    Closes: https://bugs.gentoo.org/659616
    Closes: https://bugs.gentoo.org/703026
    Closes: https://bugs.gentoo.org/666380
    Closes: https://bugs.gentoo.org/579912
    Closes: https://bugs.gentoo.org/549848
    Closes: https://bugs.gentoo.org/533168
    Closes: https://bugs.gentoo.org/489650
    Closes: https://bugs.gentoo.org/443530
    Closes: https://bugs.gentoo.org/442052
    Closes: https://bugs.gentoo.org/437930
    Closes: https://bugs.gentoo.org/426952
    Closes: https://bugs.gentoo.org/426510
    Closes: https://bugs.gentoo.org/403523
    Closes: https://bugs.gentoo.org/401257
    Closes: https://bugs.gentoo.org/362387
    Closes: https://bugs.gentoo.org/257156
    
    Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
    Signed-off-by: David Seifert <soap@gentoo.org>

 profiles/arch/amd64/package.use.mask               |  4 -
 profiles/arch/base/package.use.mask                |  4 -
 profiles/arch/hppa/use.mask                        |  4 -
 profiles/arch/x86/package.use.mask                 |  4 -
 sys-power/pm-utils/Manifest                        |  1 -
 .../pm-utils/files/1.4.1-bluetooth-sync.patch      | 43 ----------
 .../pm-utils/files/1.4.1-disable-sata-alpm.patch   | 24 ------
 sys-power/pm-utils/files/1.4.1-echo-n.patch        | 51 ------------
 sys-power/pm-utils/files/1.4.1-fix-alpm-typo.patch | 29 -------
 .../1.4.1-fix-intel-audio-powersave-hook.patch     | 40 ---------
 .../pm-utils/files/1.4.1-ignore-led-failure.patch  | 14 ----
 .../files/1.4.1-inhibit-on-right-status.patch      | 20 -----
 .../pm-utils/files/1.4.1-logging-append.patch      | 17 ----
 .../pm-utils/files/1.4.1-run-hook-logging.patch    | 17 ----
 .../pm-utils/files/1.4.1-suspend-hybrid.patch      | 36 ---------
 .../files/1.4.1-uswsusp-hibernate-mode.patch       | 19 -----
 .../files/1.4.1-xfs_buffer_arguments.patch         | 31 -------
 sys-power/pm-utils/files/pm-utils.logrotate        |  8 --
 sys-power/pm-utils/files/power.d/pci_devices       | 61 --------------
 sys-power/pm-utils/files/power.d/usb_bluetooth     | 45 -----------
 sys-power/pm-utils/files/sleep.d/50unload_alx      | 18 -----
 sys-power/pm-utils/metadata.xml                    | 10 ---
 sys-power/pm-utils/pm-utils-1.4.1-r7.ebuild        | 94 ----------------------
 23 files changed, 594 deletions(-)