Choosing not to report crashes and errors setting reverts

Bug #1437633 reported by Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„ on 2015-03-28
110
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Critical
Will Cooke
livecd-rootfs (Ubuntu)
Undecided
Unassigned
lxc-android-config (Ubuntu)
High
Iain Lane
lxc-android-config (Ubuntu RTM)
High
Oliver Grawert
whoopsie-preferences (Ubuntu)
High
Unassigned

Bug Description

Possibly related to bug 1389407
Reported on Askubuntu [1] and confirmed here on a retail bq handset with no modifications (no app installs, only OTA updates).

Steps to reproduce:-

System Settings -> Security & Privacy -> Diagnostics ->
Untick box next to "App crashes and errors"
Leave system settings.
Wait some time - the AU report suggests an hour, I waited less than that

Go back into System Settings -> Security & Privacy -> Diagnostics
Not the tick box is ticked again.

I would expect the tickbox to remain at whatever I set it to.

[1] http://askubuntu.com/questions/602365/permanently-disable-error-reports-on-aquaris-e4-5-ubuntu-edition

Related branches

Changed in ubuntu-system-settings (Ubuntu):
status: New → Confirmed
description: updated
tags: added: bq
Pat McGowan (pat-mcgowan) wrote :

Having trouble reproducing
what is the contents of /etc/default/whoopsie after turning off reports? it should show
report_crashes=false
is whoopsie-preferences running?
is whoopsie running?

Changed in ubuntu-system-settings (Ubuntu):
status: Confirmed → Incomplete

The contents of /etc/default/whoopsie does not change when I flip the button in system settings.

phablet@ubuntu-phablet:~$ cat /etc/default/whoopsie

[General]
report_crashes=true

whoopsie is running:-

whoopsie 1709 0.0 0.4 53080 4704 ? Ssl Mar27 0:00 whoopsie -f

whoopsie-prefernces is running when I'm in the screen in system settings.

Just reproduced it again. Doesn't look like /etc/default/whoopsie gets touched at all.

phablet@ubuntu-phablet:~$ ls -l /etc/default/whoopsie
-rw-r--r-- 1 root root 31 Oct 16 11:35 /etc/default/whoopsie

Sebastien Bacher (seb128) wrote :

the service status is not handled by settings over time, rather an issue with whoopsie itself. would be worth testing on vivid, https://launchpad.net/ubuntu/+source/whoopsie/0.2.47 change how the status is stored and might fix the issue you are seeing

affects: ubuntu-system-settings (Ubuntu) → whoopsie (Ubuntu)

Also reproduced this bug on vivid on my nexus 7.

Changed in whoopsie (Ubuntu):
status: Incomplete → New
Sebastien Bacher (seb128) wrote :

the writable paths are in lxc-android-config, marking it as affected, on rtm we should add /etc/default/whoopsie to the list, on vivid /etc/whoopsie but it's a bit more complex since /etc/init needs to be writable to add a .override

Pat McGowan (pat-mcgowan) wrote :

Reflash with a wipe and reproduced the issue

Sebastien Bacher (seb128) wrote :

include the empty .override which is needed to have the path writable

tags: added: patch
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxc-android-config (Ubuntu):
status: New → Confirmed
Changed in whoopsie (Ubuntu):
status: New → Confirmed
Iain Lane (laney) wrote :

Here's the one for RTM

How do we get a candidate image to test this fix?

Changed in whoopsie (Ubuntu):
status: Confirmed → Invalid
Oliver Grawert (ogra) on 2015-04-02
Changed in lxc-android-config (Ubuntu RTM):
status: New → Confirmed
assignee: nobody → Oliver Grawert (ogra)
importance: Undecided → High
Changed in lxc-android-config (Ubuntu):
assignee: nobody → Oliver Grawert (ogra)
importance: Undecided → High
Changed in canonical-devices-system-image:
assignee: nobody → Oliver Grawert (ogra)
importance: Undecided → High
milestone: none → ww13-ota
status: New → In Progress
Ricardo Salveti (rsalveti) wrote :

2 issues with the current RTM silo:

1)
+++ lxc-android-config-0.208rtm10/etc/system-image/writable-paths 2015-03-31 11:47:37.000000000 +0100
+# need to write to this file to toggle crash reporting
+/etc/default/whoopsie auto persistent none none

It should be 'persistent transition none' instead, otherwise the file will be empty (not respecting the previous content).

2) Even with the right writable path, it will still fail to save the configuration because whoopsie-preferences is using g_file_set_contents, which will first create a tmp file under the same path, and that will not work because /etc/default is not writable:
open("/etc/default/whoopsie.YJXSWX", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = -1 EROFS (Read-only file system)
write(1, "Could not write configuration: F"..., 107) = 107

So either we make /etc/default rw (or create a writable directory to save whoopsie config), or change whoopsie-preference to first create the new file under /tmp and then copy it over the previous one.

On Mon, Apr 06, 2015 at 08:27:56PM -0000, Ricardo Salveti wrote:
> 2 issues with the current RTM silo:

ogra and I figured this out but didn't update the bug, sorry.

whoopsie uses g_file_set_contents() which writes to a temporary file and
then renames into place - fairly standard practice. It'd be unfortunate
to have to abuse the software to avoid this.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Oliver Grawert (ogra) wrote :

right, we discussed it in teh landing team meeting today ... an actual fix would mean changes in livecd-rootfs to do the same we do for timezone and hostname settings ... this was considered to intrusive this short before the OTA ... i will prepare all the needed bits but not land them unless we do another 14.09 OTA ...

Iain Lane (laney) wrote :

On the whoopsie-preferences side, you should check errno for EROFS and do the fallback thing in that case.

Pat McGowan (pat-mcgowan) wrote :

Not fixing in rtm, is fixed in vivid

Changed in canonical-devices-system-image:
milestone: ww13-ota → ww15-2015
status: In Progress → Fix Released
Ricardo Salveti (rsalveti) wrote :

About patch in comment #8, a few things:
1 - Nothing provides /etc/whoopsie, who should be creating it?
2 - Disabling works fine, but enabling doesn't work:
2.1 - Whoopsie is not started when enabling 'app crashes and errors'
2.2 - Even after reboot, there is still a 'manual' entry at /etc/init/whoopsie.override

Oliver Grawert (ogra) wrote :

for 1 i confirmed with seb to simply make sure the dir as well as an empty .override file gets shipped in the package when i merge the patch

the enabling is indeed a problem, i will check if there is anything on the lxc-android-config side we can do ... if not, whoopsie-preferences needs to be looked at.

Oliver Grawert (ogra) wrote :

phablet@ubuntu-phablet:~$ sudo whoopsie-preferences
Could not write configuration: Failed to create file '/etc/whoopsie.LRHGXX': Read-only file system
Lost the name: com.ubuntu.WhoopsiePreferences
Acquired the name: com.ubuntu.WhoopsiePreferences

this will indeed not work, the file should be /etc/whoopsie/whoopsie or some such so atomic writes can happen in a writable dir ... we cant make all of /etc writable ...

Sebastien Bacher (seb128) wrote :

we need a change similar to that for whoopsie
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=ubuntu&id=10f312d34a39cb2c5738d48705498fdfec38e9f0

writing to /etc/writable in the ro case

Changed in whoopsie (Ubuntu):
status: Invalid → Triaged
importance: Undecided → High
affects: whoopsie (Ubuntu) → whoopsie-preferences (Ubuntu)
Sebastien Bacher (seb128) wrote :

suggested change proposed for review (inspired from the systemd hack indicated before, the writable_filename() code is mostly inspired from the readlink() manpage example

Iain Lane (laney) wrote :

Uploading to wily. There are some more changes required before this works properly

  1. Add /etc/init/whoopsie.override to writable-paths in lxc-android-config (comment #8)
  2. Make livecd-rootfs create the symlink for /etc/whoopsie

We should also fix the systemd case which is similar to 1.

I think for upstart the changes should be the same for vivid (or overlay) and wily so if it works in wily it should work there.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie-preferences - 0.17

---------------
whoopsie-preferences (0.17) wily; urgency=medium

  * Fall back to /etc/writable for /etc/whoopsie if we need to. Thanks seb128
    for the initial patch! (LP: #1437633)

 -- Iain Lane <email address hidden> Fri, 22 May 2015 12:58:03 +0100

Changed in whoopsie-preferences (Ubuntu):
status: Triaged → Fix Released
Matthias Apitz (gubu) wrote :

I can easy reproduce this bug in BQ E4.5 r23 with the following procedure:

1. configure in battery page 1 minute to suspend
2. goto the report enable page
3. un-mark sending reports and stay in page to await suspend after 1 minute
4. restart and unlock phone; sending is enabled already or will go green in
   that moment

Oliver Grawert (ogra) on 2015-06-22
Changed in lxc-android-config (Ubuntu RTM):
status: Confirmed → Won't Fix
Changed in canonical-devices-system-image:
status: Fix Released → Confirmed
milestone: ww15-2015 → ww34-2015
Pat McGowan (pat-mcgowan) wrote :

@ogra are you or seb going to land this?

John McAleely (john.mcaleely) wrote :

@ogra, did this land with the recent unblocking of device tarballs?

Changed in canonical-devices-system-image:
assignee: Oliver Grawert (ogra) → John McAleely (john.mcaleely)
Changed in canonical-devices-system-image:
milestone: ww34-2015 → ww40-2015
milestone: ww40-2015 → ww34-2015
milestone: ww34-2015 → ww40-2015
Nicolas (coinb) wrote :

See also Bug #1487220

Changed in canonical-devices-system-image:
assignee: John McAleely (john.mcaleely) → Will Cooke (willcooke)
Changed in lxc-android-config (Ubuntu):
assignee: Oliver Grawert (ogra) → Sebastien Bacher (seb128)
Changed in canonical-devices-system-image:
importance: High → Critical
Will Cooke (willcooke) on 2015-09-10
Changed in lxc-android-config (Ubuntu):
assignee: Sebastien Bacher (seb128) → Iain Lane (laney)
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Iain Lane (laney) wrote :

update-rc.d does renames, this doesn't work on r/o phone, needs further tweak there

Iain Lane (laney) on 2015-09-10
Changed in whoopsie-preferences (Ubuntu):
status: Fix Released → Triaged
Iain Lane (laney) wrote :

possible fixes in review for wily, will upload there and then can get in overlay if it's good

Pat McGowan (pat-mcgowan) wrote :

@laney thanks for picking this up

How could we turn this off by default in stable only?

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.343

---------------
livecd-rootfs (2.343) wily; urgency=medium

  [ Oliver Grawert ]
  * add empty "extrausers" equivalents for subuid and subgid files, else
    adduser falls over in interactive mode when trying to write to them.

  [ Iain Lane ]
  * live-build/ubuntu-touch/hooks/03-etc-writable.chroot: Set up /etc/whoopsie
    too. (LP: #1437633)

 -- Iain Lane <email address hidden> Thu, 10 Sep 2015 12:22:57 +0100

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
tags: added: hotfix6
Iain Lane (laney) wrote :

On Thu, Sep 10, 2015 at 03:17:30PM -0000, Pat McGowan wrote:
> @laney thanks for picking this up
>
> How could we turn this off by default in stable only?

Do you mean turn whoopsie off by default?

That would be a separate issue - here I'm only fixing the UI not
working. Can they be decoupled please?

(To fix that you should be able to put "manual" in the whoopsie.override
that lxc-android-config will start to ship after the fix for this issue
is uploaded.)

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Pat McGowan (pat-mcgowan) wrote :

reported bug #1494442 for the default setting

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc-android-config - 0.230+15.10.20150910-0ubuntu1

---------------
lxc-android-config (0.230+15.10.20150910-0ubuntu1) wily; urgency=medium

  * Add whoopsie.override to writable-paths and pre-create it so that we
    can disable whoopsie on r-o systems (LP: #1437633)

 -- Iain Lane <email address hidden> Thu, 10 Sep 2015 11:20:02 +0000

Changed in lxc-android-config (Ubuntu):
status: In Progress → Fix Released
Iain Lane (laney) wrote :

Well seems like the current wily images are pretty broken - no apps will start, not even the scopes, so I can't test this there.

I'm preparing a silo for the overlay that hopefully QA can help with testing somehow.

FTR "wily is broken" is bug 1490398. QA will help testing on vivid once a silo is ready.

Iain Lane (laney) wrote :

(Not a boot loop for me, I can get into Unity but after then it doesn't work very well at all. Anyway, not this bug.)

ลukasz Zemczak (sil2100) wrote :

This bug was fixed in the package lxc-android-config 0.230+15.04.20150910-0ubuntu1 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

lxc-android-config (0.230+15.04.20150910-0ubuntu1) vivid; urgency=medium

  * Add whoopsie.override to writable-paths and pre-create it so that we
    can disable whoopsie on r-o systems (LP: #1437633)

lxc-android-config (0.230+15.10.20150902.1-0ubuntu1) wily; urgency=medium

  [ Simon Fels ]
  * Rebuild for switching package building to citrain.

  [ CI Train Bot ]
  * New rebuild forced.

 -- Iain Lane <email address hidden> Thu, 10 Sep 2015 11:20:02 +0000

Changed in lxc-android-config (Ubuntu RTM):
status: Won't Fix → Fix Released
Will Cooke (willcooke) on 2015-09-14
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
tags: added: hotfix
removed: hotfix6
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers