Bug 12977 - audit initscript causes ordering cycles at boot leading to dbus+NetworkManager failure incl. KDE plasma applet crashes
Summary: audit initscript causes ordering cycles at boot leading to dbus+NetworkManage...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: advisory mga4-32-ok MGA4-64-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2014-03-10 07:53 CET by Albert Rayanov
Modified: 2014-05-24 00:38 CEST (History)
8 users (show)

See Also:
Source RPM: auditd
CVE:
Status comment:


Attachments
Urpmi plasma-applet-nm - kded crashes (7.51 KB, text/plain)
2014-03-10 13:21 CET, David Walser
Details
Place "Network management" widget onto the bar - plasma crashes (8.27 KB, text/plain)
2014-03-10 13:22 CET, David Walser
Details
/var/log/dmesg (122.15 KB, text/plain)
2014-03-10 20:12 CET, Albert Rayanov
Details

Description Albert Rayanov 2014-03-10 07:53:22 CET
Description of problem:
Plasma-applet-nm crashes kded on install (urpmi plasma-applet-nm), plasma-desktop on placing a widget onto the bar, and D-Bus providing bad ptr (0x48).

Version-Release number of selected component (if applicable):
plasma-applet-nm-0.9.3.2-1.mga4

How reproducible:
Always

Steps to Reproduce:
1. Upgrade from mga3 to mga4 - plasma didn't start at my PC because of described crash, I should urpme plasma-applet-nm
2. Urpmi plasma-applet-nm - kded crashes (stack: http://paste.org.ru/?wmpxfc)
3. Place "Network management" widget onto the bar - plasma crashes (stack: http://paste.org.ru/?9oy8ha)


Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2014-03-10 13:21:42 CET
Created attachment 5042 [details]
Urpmi plasma-applet-nm - kded crashes
Comment 2 David Walser 2014-03-10 13:22:06 CET
Created attachment 5043 [details]
Place "Network management" widget onto the bar - plasma crashes
David Walser 2014-03-10 13:22:30 CET

CC: (none) => balcaen.john, lmenut, mageia

Dave Hodgins 2014-03-10 20:11:46 CET

CC: (none) => davidwhodgins
Assignee: bugsquad => mageia

Comment 3 Albert Rayanov 2014-03-10 20:12:29 CET
Created attachment 5044 [details]
/var/log/dmesg

Contents of /var/log/dmesg which show why dbus does not start automatically. On login i have dbus.service "inactive (dead)" on unknown reason.
Comment 4 Dave Hodgins 2014-03-10 20:14:04 CET
Assigning to Colin, who can hopefully figure out what is causing
Breaking ordering cycle by deleting job dbus.socket/start

Note this is a Mageia 1 system, upgraded to 2, then 3, then 4.
Comment 5 Albert Rayanov 2014-03-11 06:25:23 CET
(In reply to Dave Hodgins from comment #4)
> Note this is a Mageia 1 system, upgraded to 2, then 3, then 4.
Before it was Mandriva 2010.1 (with mib/mnb/plf repos) and so on.
Comment 6 Colin Guthrie 2014-03-11 12:53:39 CET
(In reply to Albert Rayanov from comment #3)
> Created attachment 5044 [details]
> /var/log/dmesg
> 
> Contents of /var/log/dmesg which show why dbus does not start automatically.
> On login i have dbus.service "inactive (dead)" on unknown reason.

It would appear to me that the ordering cycle is due to the audit package. It's the only one in there that looks non-obvious.

Could you try disabling it (systemctl disable auditd.service) and rebooting and see if that fixes the ordering cycle stuff?

Looking at the package the initscript appears to not have any LSB headers which means that we can only go on the chkconfig symlink numbers and these are typically not well thought out and can cause ordering cycle problems. We did a big push to fix all these during MGA2 cycle (I had a big spreadsheet) to add LSB headers, but sadly it seems this one was missed.

If the above test works, then we can issue an update to the audit package to add a native systemd unit and drop the sysvinit one.

HTHs
Comment 7 Albert Rayanov 2014-03-11 13:11:58 CET
(In reply to Colin Guthrie from comment #6)
> Could you try disabling it (systemctl disable auditd.service) and rebooting
> and see if that fixes the ordering cycle stuff?

Thanks, I confirm that disabling auditd.service lets dbus.service and NetworkManager.service work together.

Status: NEW => RESOLVED
Resolution: (none) => WORKSFORME

Albert Rayanov 2014-03-11 13:12:22 CET

Source RPM: plasma-applet-nm => auditd

Comment 8 Colin Guthrie 2014-03-11 14:03:18 CET
Cool, so it seems this is due to overzealous patch removal in the audit package that removed my initscript patch.

audit these days has native systemd support so I've switched cauldron to that tho' as I don't know the package, I cannot test it.

Thomas, can you take a look at this (seeing as you removed my patch!) and work out what's best for MGA4? Either my changes in cauldron are good and you can just merge them to MGA4 + fiddle with rel and subrel and submit it to updates_testing, or you can restore my previous patch and submit that as an update to MGA4 instead.

Will reopen the bug as it's still a bug that needs fixed.

Status: RESOLVED => REOPENED
Resolution: WORKSFORME => (none)
Assignee: mageia => thomas
Summary: Plasma-applet-nm crashes kded on install, plasma-desktop on post, and D-Bus providing bad ptr => audit initscript causes ordering cycles at boot leading to dbus+NetworkManager failure incl. KDE plasma applet crashes

Comment 9 Thomas Spuhler 2014-03-11 21:25:04 CET
(In reply to Colin Guthrie from comment #8)
> Cool, so it seems this is due to overzealous patch removal in the audit
> package that removed my initscript patch.
> 
> audit these days has native systemd support so I've switched cauldron to
> that tho' as I don't know the package, I cannot test it.
> 
> Thomas, can you take a look at this (seeing as you removed my patch!) and
> work out what's best for MGA4? Either my changes in cauldron are good and
> you can just merge them to MGA4 + fiddle with rel and subrel and submit it
> to updates_testing, or you can restore my previous patch and submit that as
> an update to MGA4 instead.
> 
> Will reopen the bug as it's still a bug that needs fixed.

Thank Colin. You invested a lot of work.(In reply to Albert Rayanov from comment #3)
> Created attachment 5044 [details]
> /var/log/dmesg
> 
> Contents of /var/log/dmesg which show why dbus does not start automatically.
> On login i have dbus.service "inactive (dead)" on unknown reason.

(In reply to Colin Guthrie from comment #8)
> Cool, so it seems this is due to overzealous patch removal in the audit
> package that removed my initscript patch.
> 
> audit these days has native systemd support so I've switched cauldron to
> that tho' as I don't know the package, I cannot test it.
> 
> Thomas, can you take a look at this (seeing as you removed my patch!) and
> work out what's best for MGA4? Either my changes in cauldron are good and
> you can just merge them to MGA4 + fiddle with rel and subrel and submit it
> to updates_testing, or you can restore my previous patch and submit that as
> an update to MGA4 instead.
> 
> Will reopen the bug as it's still a bug that needs fixed.

Colin, you did a lot of work. Thanks a lot.
I cannot duplicate the problem. It may just be different on each installation.

But I have seen cycling problems in the journal.

I have back-ported your changes to mga4. The updated package is in updates testing with rel. 2.1
Comment 10 Thomas Spuhler 2014-03-11 22:13:59 CET
I was trying to install it, but get the following error:
 1/1: audit                 #########################################################################################################
Failed to issue method call: Operation refused, unit auditd.service may be requested by dependency only.
warning: %post(audit-2.3.2-2.1.mga4.x86_64) scriptlet failed, exit status 4
ERROR: 'script' failed for audit-2.3.2-2.1.mga4.x86_64: 

When manual starting it, it succeeds
Comment 11 Albert Rayanov 2014-03-12 08:40:49 CET
(In reply to Thomas Spuhler from comment #10)
> I was trying to install it, but get the following error
Thomas, I had installed audit package using mandriva 2010.1 distribution (or newer) and after a long time upgraded it to Mageia from 1 to 4.
Comment 12 Thomas Spuhler 2014-04-03 03:30:02 CEST
The packages are now in updates_testing:
audit-2.3.2-2.4.mga4.src.rpm
audit-2.3.2-2.4.mga4.x86_64.rpm
lib64audit1-2.3.2-2.4.mga4.x86_64.rpm
lib64audit-devel-2.3.2-2.4.mga4.x86_64.rpm
lib64auparse0-2.3.2-2.4.mga4.x86_64.rpm
lib64auparse-devel-2.3.2-2.4.mga4.x86_64.rpm
python-audit-2.3.2-2.4.mga4.x86_64.rpm
audispd-plugins-2.3.2-2.4.mga4.x86_64.rpm
audit-debuginfo-2.3.2-2.4.mga4.x86_64.rpm
and same for i586 packages

I have tested the installation and removal of audit
The install reported a missing audit.conf file, but it's not provided (same by upstream, Fedora) I believe the user is supposed to provide it.

After installation of audit, the auditd.service was enabled and running. The opposite after deleting. I cannot test the race condition because I never experienced it.

Status: REOPENED => ASSIGNED
CC: (none) => thomas
Assignee: thomas => qa-bugs

Comment 13 Lewis Smith 2014-04-21 21:41:38 CEST
Testing MGA4 64-bit real hardware

I had installed already lib64audit1, lib64seaudit4, python-audit.
Added from Release media audit, lib64auparse0.
Rebooted. The auditd service was enabled and running.

Updated from Core Updates Testing:
 audit-2.3.2-2.4.mga4.x86_64.rpm
 lib64audit1-2.3.2-2.4.mga4.x86_64.rpm
 lib64auparse0-2.3.2-2.4.mga4.x86_64.rpm
 python-audit-2.3.2-2.4.mga4.x86_64.rpm
[note NO lib64seaudit4]

Rebooted. The auditd service was enabled and running. Under KDE, the network taskbar applet worked OK - it always had done. So no apparent change.
Is this enough for MGA4-64-OK ?

CC: (none) => lewyssmith

Lewis Smith 2014-05-02 18:09:53 CEST

Whiteboard: (none) => MGA4-64-OK

Comment 14 claire robinson 2014-05-23 14:26:58 CEST
Testing complete mga4 32

As discussed, just ensuring the updated packages install cleanly.

We don't have an advisory text for this update. I've uploaded one more or less in line with the summary..

---
This update corrects audit initscripts which caused ordering cycles at boot, leading to dbus and NetworkManager failure.
---

Please amend it if it needs more detail or is incorrect.


Advisory uploaded. Validating.

Could sysadmin please push to 4 updates

Thanks

Keywords: (none) => validated_update
Whiteboard: MGA4-64-OK => advisory mga4-32-ok MGA4-64-OK
CC: (none) => sysadmin-bugs

Comment 15 Thomas Backlund 2014-05-24 00:38:46 CEST
Update pushed:
http://advisories.mageia.org/MGAA-2014-0120.html

Status: ASSIGNED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


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