Cannot control squid "Unknown instance"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
squid (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Fix Released
|
Medium
|
Unassigned | ||
Maverick |
Won't Fix
|
Medium
|
Unassigned | ||
squid-deb-proxy (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Won't Fix
|
Medium
|
Unassigned | ||
Maverick |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Binary package hint: upstart
I cannot control squid via upstart.
Squid is running, I want to stop it:
$ sudo stop squid
stop: Unknown instance:
$ ps -ef|grep squid
proxy 1986 1 0 19:44 ? 00:00:00 (squid)
liptak 3328 1689 0 19:54 pts/1 00:00:00 grep squid
$ initctl list|grep squid
squid stop/waiting
$ sudo start squid
start: Job failed to start
$ sudo reload squid
reload: Unknown instance:
The squid is running and fully functioning, I am submitting this bug report via it.
$ lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04
Using upstart 0.6.5-6 on Ubuntu 10.04 x86_64.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: upstart 0.6.5-6
ProcVersionSign
Uname: Linux 2.6.32-22-generic x86_64
Architecture: amd64
Date: Sun May 2 19:50:18 2010
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: upstart
== STABLE RELEASE UPDATE ==
=== IMPACT ===
This bug affects the normal operation of squid via the reload command.
=== DEV FIX ===
Fixed in natty in the upstart job file by no longer following forks, and disabling the 'daemonizing' code in squid by passing -N. The code path that this takes has been reviewed and doesn't change the behavior of the daemon significantly.
=== TEST CASE: ===
# install squid
# verify it is running with 'sudo status squid'
# reload its configuration with 'sudo reload squid'
# verify that it is still tracked in upstart with 'sudo status squid'
The bug exists if squid is no longer visible to upstart after the 'reload' command. It is fixed if upstart still sees it running, with the same pid.
=== REGRESSION POTENTIAL ===
This does lengthen the race condition between the squid job's started event and when squid is actually listening for incoming connections. However, there are no blocking calls involved between starting squid and its daemon code forking, so the extra length is negligible. Also while the code has been reviwed and squid has been tested minimally for residual effects of the -N flag, there may be some that we did not foresee.
Related branches
- Ubuntu Sponsors: Pending requested
-
Diff: 34 lines (+8/-3)2 files modifieddebian/changelog (+7/-0)
debian/squid.upstart (+1/-3)
- Martin Pitt: Approve
-
Diff: 34 lines (+8/-3)2 files modifieddebian/changelog (+7/-0)
debian/squid.upstart (+1/-3)
- Micah Gersten (community): Approve
-
Diff: 25 lines (+8/-2)2 files modifieddebian/changelog (+7/-0)
debian/squid-deb-proxy.upstart (+1/-2)
- Micah Gersten (community): Needs Fixing
-
Diff: 26 lines (+8/-2)2 files modifieddebian/changelog (+7/-0)
debian/squid-deb-proxy.upstart (+1/-2)
tags: | added: regression-potential |
tags: | removed: regression-potential |
description: | updated |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
tags: | added: testcase |
This will be an issue with the squid config