Bug 110896 - [CI][RESUME] igt@kms_chamelium@hdmi-audio - warn - Home directory not accessible: Permission denied
Summary: [CI][RESUME] igt@kms_chamelium@hdmi-audio - warn - Home directory not accessi...
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Tomi Sarvela
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-11 13:14 UTC by Martin Peres
Modified: 2019-09-11 08:18 UTC (History)
1 user (show)

See Also:
i915 platform: ALL
i915 features: CI Infra


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Peres 2019-06-11 13:14:15 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6222/re-icl-u/igt@kms_chamelium@hdmi-audio.html

Starting subtest: hdmi-audio
Home directory not accessible: Permission denied
Subtest hdmi-audio: SUCCESS (8.492s)
Comment 1 Martin Peres 2019-06-11 13:15:27 UTC
Assigning Simon since he wrote the test, and it should not need to warn about permission issues UNLESS it needed to dump results and couldn't.
Comment 2 CI Bug Log 2019-06-11 13:16:20 UTC
The CI Bug Log issue associated to this bug has been updated.

### New filters associated

* CHAMELIUM: igt@kms_chamelium@hdmi-audio - warn - Home directory not accessible: Permission denied
  - https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6222/re-icl-u/igt@kms_chamelium@hdmi-audio.html
Comment 3 emersion 2019-06-11 13:20:30 UTC
This is a libasound (ALSA) issue: it also happens when executing `aplay` on the DUT:

    $ sudo aplay -L
    Home directory not accessible: Permission denied
    Home directory not accessible: Permission denied
    […]

Assigning Tomi as Martin suggested.
Comment 4 Tomi Sarvela 2019-06-11 13:32:03 UTC
Does this make any difference?

# sudo -i aplay -L
Comment 5 Caz.Yokoyama 2019-06-11 15:55:41 UTC
The error message comes from alsa library. The fist function aplay calls is snd_device_name_hint(). It may produce the error message. I suspect
1. aplay is invoked by user, XXX
2. there is no /home/XXX
3. snd_device_name_hint() complains there is no /home/XXX.

I still skeptical why it accesses home directory for listing PCM devices.
Comment 6 Jani Saarinen 2019-06-12 06:42:00 UTC
Simon, what are next steps here?
Comment 7 Caz.Yokoyama 2019-06-13 15:57:09 UTC
Tomi, do you want me to find which function in alsa library complains and why?
Comment 8 emersion 2019-06-14 07:23:20 UTC
(In reply to Tomi Sarvela from comment #4)
> Does this make any difference?
> 
> # sudo -i aplay -L

Yes, this works. HOME is set to /root in this case I guess.
Comment 9 Jani Saarinen 2019-06-18 05:38:59 UTC
This is an unimportant ALSA warning. This is an infra issue, not a Chamelium/driver issue.
Comment 10 CI Bug Log 2019-06-25 10:02:56 UTC
A CI Bug Log filter associated to this bug has been updated:

{- CHAMELIUM: igt@kms_chamelium@hdmi-audio - warn - Home directory not accessible: Permission denied -}
{+ CHAMELIUM: igt@kms_chamelium@(hdmi|dp)-audio - warn - Home directory not accessible: Permission denied +}

New failures caught by the filter:

  * https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_314/fi-icl-u2/igt@kms_chamelium@dp-audio.html
Comment 11 Tomi Sarvela 2019-06-26 10:24:36 UTC
All CI testhosts have user 'testrunner' with valid $HOME /home/testrunner with permissions rwxr-xr-x. Shell is /bin/bash, as default Ubuntu user shell.

Plain sudo (root) can access the testrunner home directory. Does aplay -L do special tricks, like changing UID again?

I can't really see where this error comes from:

Home directory not accessible: Permission denied
Comment 12 emersion 2019-07-02 14:04:12 UTC
(In reply to Tomi Sarvela from comment #11)
> All CI testhosts have user 'testrunner' with valid $HOME /home/testrunner
> with permissions rwxr-xr-x. Shell is /bin/bash, as default Ubuntu user shell.
> 
> Plain sudo (root) can access the testrunner home directory.

See below.

> Does aplay -L do special tricks, like changing UID again?

No.

> I can't really see where this error comes from:
> 
> Home directory not accessible: Permission denied

Hmm. It turns out this comes from pulseaudio. It has calls a check_ours function in src/pulsecore/core-util.c:1450.

Tomi, could you make sure pulseaudio isn't auto-started on the DUTs? This can be done by editing /etc/pulse/client.conf and adding:

    autospawn = no

We have a check that skips the test if pulseaudio is loaded anyway. Maybe this can turn some skips into fail/pass.

testrunner@icl-u2:~$ ps -aux | grep pulse
testrun+  4748  0.0  0.0 278880  6932 ?        Sl   18:06   0:00 /usr/bin/pulseaudio --start --log-target=syslog
Comment 13 Tomi Sarvela 2019-07-03 07:39:23 UTC
Added autospawn = no on fi-icl-u2.

If this fixes any issues, I'll make it farmwide configuration.
Comment 14 CI Bug Log 2019-07-09 07:57:52 UTC
A CI Bug Log filter associated to this bug has been updated:

{- CHAMELIUM: igt@kms_chamelium@(hdmi|dp)-audio - warn - Home directory not accessible: Permission denied -}
{+ CHAMELIUM: igt@kms_chamelium@(hdmi|dp)-audio - warn/fail - Home directory not accessible: Permission denied +}

New failures caught by the filter:

  * https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_321/fi-skl-6700k2/igt@kms_chamelium@hdmi-audio.html
Comment 15 emersion 2019-07-10 07:38:53 UTC
Seems like autospawn=no doesn't completely disable PulseAudio: Pulse devices still show up in ALSA. This happens because the Pulse ALSA plugin is sitll enabled. It can be disabled like so:
https://wiki.debian.org/PulseAudio#Dynamically_enable.2Fdisable

I've ran these commands on fi-icl-u2:

mkdir /usr/share/alsa/alsa.conf.pulse/
dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/pulse.conf --rename  /usr/share/alsa/alsa.conf.d/pulse.conf
dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/99-pulseaudio-default.conf.example  --rename  /usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example
dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/50-pulseaudio.conf --rename  /usr/share/alsa/alsa.conf.d/50-pulseaudio.conf

The error message doesn't show up anymore when running `sudo aplay -L`.
Comment 16 Tomi Sarvela 2019-07-10 08:26:07 UTC
This method looks unnecessarily complicated.

Is there an simpler method of disabling PulseAudio? Dynamic choice is not really needed, preferred way is to fix settings for good in all DUTs.
Comment 17 emersion 2019-07-17 15:19:52 UTC
It seems like the commands above fixed the warning issues on fi-icl-u2.

(In reply to Tomi Sarvela from comment #16)
> This method looks unnecessarily complicated.
> 
> Is there an simpler method of disabling PulseAudio? Dynamic choice is not
> really needed, preferred way is to fix settings for good in all DUTs.

It doesn't seem like it. PulseAudio is enabled by default by Debian via these configuration files. Simply removing them would not prevent updates from re-installing the files.

`autospawn = no` prevents PulseAudio form starting, but the PulseAudio ALSA modules are still loaded and still print the error message.

I guess you could still `apt-get remove --purge pulseaudio`, if no package depends on it. Need to make sure it doesn't come back with an upgrade or by installing a new dependency. So this solution looks a little fragile to me.
Comment 18 emersion 2019-08-14 11:39:00 UTC
Tomi, any updates on this?

An alternative would be not to bother with this and mark this bug as NOTABUG.
Comment 19 emersion 2019-08-16 12:11:54 UTC
Removed the dpkg-divert from icl-u2 and removed pulseaudio from there. Let's see if it fixes the warning.
Comment 20 emersion 2019-08-19 13:17:28 UTC
`sudo aplay -L` now works without the warning on fi-icl-u2. Can we remove pulseaudio from all machines, Tomi?
Comment 21 emersion 2019-09-11 08:18:04 UTC
PulseAudio has been uninstalled from DUTs connected to CHamelium boards. This fixes the issue. Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.