cups-browsed keeps respawning

Bug #1098756 reported by Timo Aaltonen
60
This bug affects 12 people
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Confirmed
Medium
Unassigned
Raring
Invalid
Undecided
Unassigned
cups-filters (Ubuntu)
Fix Released
Medium
Unassigned
Raring
Fix Released
Medium
Unassigned

Bug Description

for some reason cups-browsed seems to be crashing or such, since dmesg is filled with this:

[ 415.118360] init: cups-browsed main process (4603) terminated with status 1
[ 415.118431] init: cups-browsed main process ended, respawning
[ 415.143189] init: cups-browsed main process (4608) terminated with status 1
[ 415.143293] init: cups-browsed main process ended, respawning
[ 440.099075] init: cups-browsed main process (4610) terminated with status 1
[ 440.099151] init: cups-browsed main process ended, respawning
[ 440.122735] init: cups-browsed main process (4613) terminated with status 1
[ 440.122843] init: cups-browsed main process ended, respawning
[ 465.080779] init: cups-browsed main process (4615) terminated with status 1
[ 465.080880] init: cups-browsed main process ended, respawning
[ 465.104684] init: cups-browsed main process (4631) terminated with status 1
[ 465.104762] init: cups-browsed main process ended, respawning

on current raring

[IMPACT]

The bog does not actually lead to a loss of functionality, as if cups-browsed does not keep running (and gets restarted by Upstart) it has actually nothing to do, either because avahi-daemon is not running and so Bonjour broadcasts of other machines cannot get browsed or by bogus configuration of cups-browsed, turning off all its functionality. The only problem are annoying repeated log file entries caused by the respawning.

[TESTCASE]

Stop avahi-daemon and cups-browsed:

sudo stop cups-browsed
sudo stop avahi-daemon

Now start only cups-browsed

sudo start cups-browsed

Observe the process number of cups-browsed repeatedly running:

ps auxwww | grep cups-browsed

Every 30 sec (every minute?) the process number changes, meaning that cups-browsed got restarted.

With the proposed package cups-browsed gets only restarted three times. If there are three failures in 4 minutesm, upstart gives up on cups-browsed, avoiding the clutter in the log files.

[Regression Potential]

Practically none. In nearly every user configuration avahi-daemon is correctly running and so cups-browsed starts up correctly. For the few users not having avahi-daemon running there are also no functional changes. No code changes in the proposed package.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: cups-browsed 1.0.28-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-0.2-generic 3.8.0-rc3
Uname: Linux 3.8.0-0-generic x86_64
ApportVersion: 2.8-0ubuntu1
Architecture: amd64
Date: Sat Jan 12 01:22:40 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-09-12 (487 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110901)
Lpstat: device for mankeli: socket://192.168.1.15:9100
MachineType: LENOVO 4170CTO
MarkForUpload: True
Papersize: a4
PpdFiles: mankeli: Samsung ML-2851ND Foomatic/Postscript (recommended)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-0-generic root=UUID=d855f499-6e26-4f5c-89df-81bcf94082bd ro quiet splash vt.handoff=7
SourcePackage: cups-filters
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/13/2012
dmi.bios.vendor: LENOVO
dmi.bios.version: 8CET55WW (1.35 )
dmi.board.asset.tag: Not Available
dmi.board.name: 4170CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8CET55WW(1.35):bd09/13/2012:svnLENOVO:pn4170CTO:pvrThinkPadT420s:rvnLENOVO:rn4170CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4170CTO
dmi.product.version: ThinkPad T420s
dmi.sys.vendor: LENOVO

Revision history for this message
Timo Aaltonen (tjaalton) wrote :
Revision history for this message
Didier Raboud (odyx) wrote :

This is apparently fixed in cups-filters 1.0.28-0ubuntu2

Can you confirm ?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Nope, still happening. Can't see anything wrong with the new upstart job either. Avahi-daemon is not running but cups-browsed is getting respawned regardless.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Perhaps the avahi-daemon crashes after startup and so when cups-browsed gets started it is not running any more. Please check your boot.log.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Right, so I did a fix a couple of days ago to make sure cups-browsed won't start if avahi-daemon isn't running, that was specifically to avoid the issue you're describing here and it did on my laptop.

Did you reboot your machine since you updated the package?
Otherwise, you'll need to "stop cups-browsed" as the package upgrade won't automatically do that for you.

Revision history for this message
Stéphane Graber (stgraber) wrote :

The reason behind this is that upstart won't prevent a running job from restarting when its start condition no longer applies, so the package upgrade just restarted cups-browsed which obviously didn't fix the problem. The start condition should however fix the problem for any subsequent boot of the machine.

I could have added something along the lines of "initctl status avahi-daemon 2>&1 | grep -q 'start/running' || stop cups-browsed" to the postinst, but that's fairly ugly and I didn't think was justified considering the limited number of affected people and the fact that it's a development release.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

yes, I've rebooted. Avahi exits because of ".local" domain:

Jan 17 12:20:47 batty avahi-daemon[878]: Got SIGTERM, quitting.
Jan 17 12:20:47 batty avahi-daemon[878]: Leaving mDNS multicast group on interface lxcbr0.IPv6 with address fe80::741e:b6ff:fe1a:539c.
Jan 17 12:20:47 batty avahi-daemon[878]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.105.
Jan 17 12:20:47 batty avahi-daemon[878]: avahi-daemon 0.6.31 exiting.
Jan 17 12:20:47 batty avahi: Avahi detected that your currently configured local DNS server serves
Jan 17 12:20:47 batty avahi: a domain .local. This is inherently incompatible with Avahi and thus
Jan 17 12:20:47 batty avahi: Avahi disabled itself. If you want to use Avahi in this network, please
Jan 17 12:20:47 batty avahi: contact your administrator and convince him to use a different DNS domain,
Jan 17 12:20:47 batty avahi: since .local should be used exclusively for Zeroconf technology.
Jan 17 12:20:47 batty avahi: For more information, see http://avahi.org/wiki/AvahiAndUnicastDotLocal

an issue with my ISP, nothing much I can do?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Avahi maintainers: Should we modify avahi-daemon so that it works also if a router or ISP dicates is own functionality on .local, perhaps using .local2 or so? A running avahi-daemon needed for modern automated configuration of all kinds of server/client applications, not only printing.

Changed in avahi (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in avahi (Ubuntu):
status: New → Confirmed
Changed in cups-filters (Ubuntu):
status: New → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

current cups-browsed does not error out any more on startup when avahi-daemon is not running, so the respawning should not happen any more.

Changed in cups-filters (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

not true, still respawning here

Changed in cups-filters (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Timo, I have found what the problem is: If avahi-daemon is not running and cups-browsed has nothing to do (no legacy CUPS broadcasting/browsing configured) it simply stops, making Upstart restarting it.

As you are opting for living without running avahi-daemon (as your router or ISP uses .local) cups-browsed keeps respawning.

As a quick fix respawning van get limited in Upstart, for example to give up after the fifth attempt.

As a real fix I will improve cups-browsed In a future version, staying in a loop and regularly checking whether avahi-daemon appears and starting its work then.

As a workaround for the time being, you can make avahi-daemon running, for example by changing the domain via "domain-name=..." in /etc/avahi/avahi-daemon.conf (or modify your router's configuration). Making avahi-daemon running has also the side effect that computers can communicate about available services.

Changed in cups-filters (Ubuntu):
status: Triaged → Fix Committed
Changed in avahi (Ubuntu Raring):
status: New → Invalid
Changed in cups-filters (Ubuntu Raring):
status: New → In Progress
milestone: none → raring-updates
Changed in cups-filters (Ubuntu):
importance: Undecided → Medium
Changed in cups-filters (Ubuntu Raring):
importance: Undecided → Medium
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded a new fixed package to raring-proposed. As soon as the package gets approved it will be available for testing and a comment with instructions will be posted here. Please test it and give us feedback as your feedback is required to make the package an official update.

SRU Team: debdiff is attached.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.34-0ubuntu2

---------------
cups-filters (1.0.34-0ubuntu2) saucy; urgency=low

  * debian/local/cups-browsed.upstart: Give up starting cups-browsed after
    3 failed attempts in 4 minutes. This avoids infinite respawning when
    avahi-daemon is not running (LP: #1098756).
 -- Till Kamppeter <email address hidden> Thu, 30 Apr 2013 16:05:06 +0200

Changed in cups-filters (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Timo, or anyone else affected,

Accepted cups-filters into raring-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cups-filters/1.0.34-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cups-filters (Ubuntu Raring):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Łukasz Semler (lukasz-semler) wrote :

I've got cups-filters 1.0.34-0ubuntu1.1

dmesg shows:
[ 9.340391] init: cups-browsed main process ended, respawning
[ 9.348067] init: cups-browsed main process ended, respawning
[ 34.309165] init: cups-browsed main process ended, respawning
[ 34.316758] init: cups-browsed respawning too fast, stopped

So it respawned few times after system start.
There were no respawns through 6 hours.

So it is working. For Me at least.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.34-0ubuntu1.1

---------------
cups-filters (1.0.34-0ubuntu1.1) raring-proposed; urgency=low

  * debian/local/cups-browsed.upstart: Give up starting cups-browsed after
    3 failed attempts in 4 minutes. This avoids infinite respawning when
    avahi-daemon is not running (LP: #1098756).
 -- Till Kamppeter <email address hidden> Thu, 30 Apr 2013 16:05:06 +0200

Changed in cups-filters (Ubuntu Raring):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

tags: added: patch
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.