Bug 96842 - option --log-level does not apply to 'capabilities' error message
Summary: option --log-level does not apply to 'capabilities' error message
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) FreeBSD
: medium minor
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-07 11:49 UTC by freedesktop-bugzilla
Modified: 2018-07-30 10:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description freedesktop-bugzilla 2016-07-07 11:49:58 UTC
pulseaudio --check
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.

pulseaudio --log-level=0 --check
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.

pulseaudio --log-level=error --check
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.

"^W:" suggests the message is a warning. This message should not be displayed if it was checking for the log-level accordingly.

This is for pulseaudio-8.0 (as this is what we are at at freebsd ports)
Comment 1 Arun Raghavan 2016-07-14 03:32:16 UTC
This message happens before we look at configuration etc. to set the log level.

FWIW, in recent PA, the message reads:

    pa_log_warn("FreeBSD cannot drop extra capabilities, implementation needed.");
Comment 2 freedesktop-bugzilla 2016-07-14 08:33:38 UTC
IMO The content of the message doesn't matter; the fact that it's a pa_log_warn and prints even when log-level says not to print warnings matters. This isn't a PR about missing capabilities support on FreeBSD either. It's solely about printing a message which the user specifically told the program not to print.
Comment 3 freedesktop-bugzilla 2016-07-14 08:54:45 UTC
guess I'm still sleeping and didn't read the first sentence you wrote, Arun.

Can't you look at the configuration earlier, then? I think.. but you do, AFAICT: 


My code reading had me thinking that daemon/caps.c:pa_drop_caps(), being called by daemon/main.c:change_user(), which itself is called by daemon/main.c:main some 550 lines down the road (https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/daemon/main.c#n902), i.e., long after the command line options have been inspected (in L544 you're switching over conf->cmd already, so at this point it MUST be set AFAIUI; log level is set 50 lines earlier (L495); config is loaded in L477/480/483 (pa_cmdline_parse in L483)).

So I disagree with your assessment: My code reading had me come to the conclusion that, although the command line argument has been read and propagated into the configuration, the message "still" would print.
Comment 4 Arun Raghavan 2016-07-14 10:18:07 UTC
The call stack you want to look at is:

  pa_drop_caps() <- pa_drop_root() <- main.c (line 466 in current master)
Comment 5 freedesktop-bugzilla 2016-07-14 10:40:59 UTC
Oh ok, thanks for the clarification, that one eluded me.

So we return to "can't you look at the config earlier?" or make that a #warning instead of pa_log_warn()?
Comment 6 GitLab Migration User 2018-07-30 10:39:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/554.


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.