Merge lp:~ted/apport/enable-debug into lp:~apport-hackers/apport/trunk

Proposed by Ted Gould
Status: Rejected
Rejected by: Martin Pitt
Proposed branch: lp:~ted/apport/enable-debug
Merge into: lp:~apport-hackers/apport/trunk
Diff against target: 28 lines (+13/-0)
2 files modified
data/apport-debug-enabled.conf (+12/-0)
setup.py (+1/-0)
To merge this branch: bzr merge lp:~ted/apport/enable-debug
Reviewer Review Type Date Requested Status
Dimitri John Ledkov (community) Disapprove
Martin Pitt (community) Needs Information
Sebastien Bacher Pending
Review via email: mp+182530@code.launchpad.net

Commit message

Add Upstart user session job to include debug information.

Description of the change

This comes from a discussion that seb and I were having where we thought it would be cool if when apport is collecting reports, we could also get all the debug messages in the upstart logs. Thinking about it more, I think that just having an apport job is probably the easiest way to do this.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

I'm not quite sure how these session upstart jobs work, what will that do exactly? We certainly shouldn't set G_MESSAGES_DEBUG=all for all session processes. I'm not even sure it's wise to set this for all session upstart activated services; debug messages can be *very* chatty, we would suddenly end up writing ten times the amount of data to log files which fills up the disk and causes a lot more I/O and wakeups.

I think we should make it as easy as possible to enable this, so that we can ask bug reporters to enable it for a while if necessary?

review: Needs Information
Revision history for this message
Ted Gould (ted) wrote :

On Wed, 2013-08-28 at 04:39 +0000, Martin Pitt wrote:

> I'm not quite sure how these session upstart jobs work, what will that do exactly? We certainly shouldn't set G_MESSAGES_DEBUG=all for all session processes. I'm not even sure it's wise to set this for all session upstart activated services; debug messages can be *very* chatty, we would suddenly end up writing ten times the amount of data to log files which fills up the disk and causes a lot more I/O and wakeups.
>
> I think we should make it as easy as possible to enable this, so that we can ask bug reporters to enable it for a while if necessary?

Yes, it would. I guess I don't feel that we have "bug reporters" we
have "bugs". I don't think that we can go back and forth on many of the
bugs, and I'd rather start getting the data when things *start*
happening not afterwards (which is basically a stacktrace). That way we
can know the story leading up to it.

If we're worried about the number of writes I imagine that Upstart can
optimize it's log writing to batch them some. But I'd rather start
getting to more fixable bugs on development releases.

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

Still, I don't feel we should penalize millions of users with constant disk writes and filling up log files just becaus we want to look at a tiny tiny subset of these errors. We can do that in a more targetted way with the "collect extra information" hooks that can be requested by a developer for a particular crash report (that's somewhere in Evans mid-term plans). Also, for e. g. gnome-settings-daemon you'd need to specify an additional --debug before it actually works; but then it becomes *really* chatty and can easily accumulate several MB of logs.

As I said I'm fine with shipping the upstart job which doesn't start automatically, and provide a simple command to turn it on and off (using a per-user upstart override, for example).

This should be done in the ubuntu saucy branch only, not in trunk (but it's easy to merge it there instead of trunk).

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

one can trivially do
echo export G_MESSAGES_DEBUG=all > ~/.config/upstart/a-job.override

To enable debug messages for a particular job. Or even it set that environmental variable for particular jobs etc. None of which requires editing a global conffile. I wouldn't want to ship such global job, especially when only a limited subset supports G_MESSAGES_DEBUG=all in the first place.

review: Disapprove

Unmerged revisions

2693. By Ted Gould

Too many equals

2692. By Ted Gould

Install the job in the right place

2691. By Ted Gould

Adding an apport job to set debug info if we're collecting apport bugs

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'data/apport-debug-enabled.conf'
2--- data/apport-debug-enabled.conf 1970-01-01 00:00:00 +0000
3+++ data/apport-debug-enabled.conf 2013-08-28 02:09:45 +0000
4@@ -0,0 +1,12 @@
5+description "Apport Enable Debug"
6+
7+start on starting dbus
8+task
9+
10+script
11+ ENABLED=`grep enabled /etc/default/apport | cut -d = -f 2`
12+
13+ if [ "x$ENABLED" = "x1" ]; then
14+ initctl set-env --global G_MESSAGES_DEBUG=all
15+ fi
16+end script
17
18=== modified file 'setup.py'
19--- setup.py 2012-10-01 09:56:16 +0000
20+++ setup.py 2013-08-28 02:09:45 +0000
21@@ -124,6 +124,7 @@
22 ('share/apport/testsuite/', glob('test/*')),
23 ('share/doc/apport/', glob('doc/*.txt')),
24 ('lib/pm-utils/sleep.d/', glob('pm-utils/sleep.d/*')),
25+ ('share/upstart/sessions/', glob('data/*.conf')),
26 ] + optional_data_files,
27 cmdclass=cmdclass
28 )

Subscribers

People subscribed via source and target branches