kerneloops notifications crippled, fails to file

Bug #340773 reported by Kees Cook
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kerneloops (Ubuntu)
Fix Released
High
Unassigned
Jaunty
Fix Released
High
Unassigned
notify-osd (Ubuntu)
Fix Released
Low
Mirco Müller
Jaunty
Fix Released
Low
Mirco Müller

Bug Description

The notification window from kerneloops is crippled by notify-osd, which means kernel crashes are neither being reported upstream nor being passed to apport for LP filing.

The functions that should be available: http://launchpadlibrarian.net/23735662/kerneloops-notify-good.jpg
What actually happens: http://launchpadlibrarian.net/23735670/kerneloops-notify-bad.jpg

This is a high-importance bug in Notify OSD: as described in <https://wiki.ubuntu.com/NotifyOSD#org.freedesktop.Notifications.Notify>, "Any other actions should be supplied as buttons for the alert", and "If body is supplied, the system should sanitize it, concatenate it with the summary with a blank line between them, and use the combination as the text of the alert".

It is also something that should be fixed in kerneloops: As mentioned in <https://wiki.ubuntu.com/NotifyOSD#kerneloops>, kerneloops should be using a custom alert box anyway rather than a notification. (This would improve on the fallback alert in that it would no longer have an "OK" button that did nothing exactly like the "Cancel" button.)

Related branches

Revision history for this message
Kees Cook (kees) wrote :

Functional notification window.

Revision history for this message
Kees Cook (kees) wrote :

Crippled notification window.

Revision history for this message
Kees Cook (kees) wrote :

For simulating Oops, please see http://people.ubuntu.com/~lieb/kernel-crasher.tgz. When switching between notification-daemon and notify-osd, notification-daemon must be explicitly started. Also, the kerneloops-applet can be restarted to re-attempt crash notifications.

Revision history for this message
Kees Cook (kees) wrote :

This is blocking bug 327819 (the kerneloops MIR) since it makes kerneloops difficult to test.

Changed in notify-osd:
importance: Undecided → High
milestone: none → ubuntu-9.04-beta
status: New → Confirmed
Revision history for this message
Matt Zimmerman (mdz) wrote :

I can see why this would cripple the upstream reporting, but why does it affect apport? It should create a .crash report unconditionally, without prompting the user, because this is a local operation. apport itself prompts the user later about whether to report it to Launchpad.

Revision history for this message
Martin Pitt (pitti) wrote :

Please note that notify-osd by design doesn't support actions in notifications. This should be fixed in kerneloops itself, it needs to check whether the notification daemon implementation actually supports actions with notify_get_server_caps(). The notification spec does not guarantee that actions are available.

Since what kerneloops really intends to present is a dialog, not a notification, it should just use a proper dialog. This will also enable proper i18n.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

http://wiki.ubuntu.com/NotificationDevelopmentGuidelines has good suggestions for how to handle cases like this.

Revision history for this message
Mirco Müller (macslow) wrote :

kerneloops is not using libnotify according to the spec (jaunty one and galago one). Thus I mark this bug-report as invalid. To get examples (in C, C# and Python) and guidelines for how to design the patch to kerneloops to use notifications correctly be sure to check https://wiki.ubuntu.com/NotificationDevelopmentGuidelines https://wiki.ubuntu.com/NotificationDesignGuidelines.

Changed in notify-osd:
assignee: nobody → macslow
status: New → Invalid
description: updated
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Mirco, this is a bug in Notify OSD regardless of whether kerneloops is checking the capabilities correctly. As long as Notify OSD makes kerneloops useless, it'll also be making useless a chunk of the other unknown applications for which Notify OSD has fallback alert boxes in the first place.

Changed in notify-osd:
status: Invalid → New
Revision history for this message
Mirco Müller (macslow) wrote :

There's a design-shortcoming in the way notify-osd handles the fallback-dialog. It does not pass additional widgets from a notification to the fallback dialog. That's the first thing I'll fix. After that I'll write a patch to kerneloops upstream to use a nice gtk+-dialog, if notify-osd is found to be running.

description: updated
Revision history for this message
Mirco Müller (macslow) wrote :

The fix in notify-osd is pushed. It was actually only a typo that prevented the actions to be passed to the fallback dialog.

Changed in notify-osd:
status: New → Fix Committed
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

While the actions are now available, I understand that the body text is still missing from the fallback alert, which means the kerneloops alert box still isn't particularly understandable. This is a variation of bug 339020, which should be fixed sometime in the next two weeks.

Meanwhile, I've designed the custom alert box for kerneloops, which anyone is welcome to implement (though unlike bug 339020, you'd need a UI freeze exception for it). <https://wiki.ubuntu.com/NotifyOSD#kerneloops>

Changed in notify-osd:
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package notify-osd - 0.9.3-0ubuntu1

---------------
notify-osd (0.9.3-0ubuntu1) jaunty; urgency=low

  * New upstream version:
    - don't crash on download notifications (lp: #332042)
    - correctly pass actions to the fallback (lp: #340773)
    - correctly namespace the capability names (lp: #340817)

 -- Sebastien Bacher <email address hidden> Fri, 13 Mar 2009 15:13:30 +0100

Changed in notify-osd:
status: Fix Committed → Fix Released
Revision history for this message
Cody Russell (bratsche) wrote :

I've implemented mpt's new dialog in bug 344377 if anyone would like to review it. Thanks.

Revision history for this message
David Barth (dbarth) wrote :

Cody provided a better dialog box for kerneloops. The patch is attached to bug 344377.

Changed in kerneloops:
status: Confirmed → Fix Committed
Revision history for this message
Matt Zimmerman (mdz) wrote :

Although all of the actions appear in the dialog now, kerneloops still doesn't seem to work with notify-osd. The apport report is never generated. It also presents two different dialog boxes, with the same set of actions, which doesn't look right at all.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

With the patches to present a dialog instead of notification, kerneloops still fails to send the report. There is an apport traceback in the /var/log/apport.log:

apport (pid 17813) Thu Mar 19 09:57:11 2009: Unhandled exception:
Traceback (most recent call last):
  File "/usr/share/apport/apport", line 220, in <module>
    drop_privileges(pid, True)
  File "/usr/share/apport/apport", line 54, in drop_privileges
    raise ValueError, 'Invalid process ID: ' + str(e)
ValueError: Invalid process ID: [Errno 2] No such file or directory: '/proc/3714'
pid: 17813, uid: 0, gid: 0, euid: 0, egid: 0
environment: {}
apport (pid 17855) Thu Mar 19 09:57:11 2009: another apport instance is already running, aborting
apport (pid 17853) Thu Mar 19 09:57:12 2009: another apport instance is already running, aborting

Revision history for this message
Matt Zimmerman (mdz) wrote :

After applying your patch from bug 344377, the dialog seems to work sensibly.

However, the apport integration still doesn't work. I don't get anything in /var/log/apport.log at all. I've un-duped bug 344813 accordingly, please continue discussion there.

Revision history for this message
Steve Langasek (vorlon) wrote :

I believe this bug is fixed in the following upload, which has been accepted into jaunty:

kerneloops (0.12-0ubuntu4) jaunty; urgency=low

  [ Ken VanDine ]
  * debian/applied-patches/kerneloops-applet.c.patch: Convert notification to
    a dialog. Applied inline, since package has no patch system. (LP: #344377)
  * debian/rules: Remove test/*dbg, these should be cleaned by the Makefile
  * debian/applied-patches/submit.c.patch: Fix the config parser so that it
    will actually work with apport. Thanks to Matt Zimmerman for the patch!
    (LP: #344813)

  [ Martin Pitt ]
  * Moved *.patch to debian/applied-patches/, to be a little less confusing.

Steve Langasek (vorlon)
Changed in kerneloops:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.