using watershed in apport-noui.service causes multiple instances of watershed to run

Bug #1476849 reported by Brian Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I've modified /lib/systemd/system/apport-noui.service to contain the following:

ExecStart=/lib/udev/watershed /usr/share/apport/whoopsie-upload-all

With the hope that bug 1473562 will be resolved under systemd. (Note that using watershed works with upstart and /etc/init/apport-noui.conf.)

I've tested this by setting the PathExistsGlob to '/var/crash/*.nothing', then creating a bunch of crash files as in bug 1473562, switching the PathExistsGlob back to '/var/crash/*.crash' and running 'sudo systemcl daemon-reload'. After this I see the following in my journal.

journalctl --since "4 min ago" /lib/udev/watershed
-- Logs begin at Sat 2015-06-27 08:38:54 PDT, end at Tue 2015-07-21 15:10:21 PDT. --
Jul 21 15:10:07 impulse watershed[22068]: Collecting info for /var/crash/_bin_dash_10.32011.crash...
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_10.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_09.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_09.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_04.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_04.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_03.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_03.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_01.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_01.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash.1000.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash.1000.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_08.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_08.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_07.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_07.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_05.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_05.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_02.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_02.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_bin_dash_06.32011.crash already has info collected
Jul 21 15:10:07 impulse watershed[22068]: Marking /var/crash/_bin_dash_06.32011.crash for whoopsie upload
Jul 21 15:10:07 impulse watershed[22068]: /var/crash/_usr_share_apport_whoopsie-upload-all.1000.crash already marked for upload, skipping
Jul 21 15:10:07 impulse watershed[22068]: All reports processed
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_10.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_09.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_04.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_03.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_01.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash.1000.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_08.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_07.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_05.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_02.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_bin_dash_06.32011.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: /var/crash/_usr_share_apport_whoopsie-upload-all.1000.crash already marked for upload, skipping
Jul 21 15:10:08 impulse watershed[22308]: All reports processed
....

So watershed is called a number of times equal to the number of .crash files that exist in /var/crash/.

Revision history for this message
Brian Murray (brian-murray) wrote :

I'm looking for a way to limit the number of instances of whoopsie-upload-all run on boot up in systemd and I'm not certain if this behavior is a bug or if I haven't found the right way to set this limit.

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

Why do you need watershed in the first place? With the current package, the unit gets activated once if the PathExistsGlob triggers, and not re-triggered while it's running. Once it's done uploading (and thus systemctl status apport-noui.service gets back to "inactive (dead)", it will be re-triggered on new events. Isn't that what we want?

What's missing here?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for systemd (Ubuntu) because there has been no activity for 60 days.]

Changed in systemd (Ubuntu):
status: Incomplete → Expired
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.