hp-setup creates spurious cupsd process
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
Fix Released
|
Undecided
|
Unassigned | ||
hplip (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This is on a fully up-to-date Ubuntu 14.04 machine. Running hp-setup to connect a networked printer creates a spurious cupsd process, so that the system ends up with two cupsd processes running:
Before running hp-setup:
gpothier@zb-ale:~$ ps aux |grep cupsd
root 1982 0.0 0.1 77144 4256 ? Ss 19:37 0:00 /usr/sbin/cupsd -f
gpothier 1996 0.0 0.0 22016 940 pts/1 S+ 19:49 0:00 grep --color=auto cupsd
After running hp-setup:
gpothier@zb-ale:~$ ps aux |grep cupsd
root 2037 0.3 0.0 90252 3848 ? Ss 19:50 0:00 /usr/sbin/cupsd -C /etc/cups/
root 2038 5.3 0.1 78264 5380 ? Ss 19:50 0:00 /usr/sbin/cupsd -f
gpothier 2052 0.0 0.0 22016 936 pts/1 S+ 19:50 0:00 grep --color=auto cupsd
This causes a race condition between the two processes to save the cups configuration when they are killed. In particular, this causes the printer added by hp-setup to disappear after reboot, if no additional steps are taken.
Here is a full transcript (with a few CR/LF added for clarity):
gpothier@zb-ale:~$ ps aux |grep cupsd
root 1982 0.0 0.1 77144 4256 ? Ss 19:37 0:00 /usr/sbin/cupsd -f
gpothier 1996 0.0 0.0 22016 940 pts/1 S+ 19:49 0:00 grep --color=auto cupsd
gpothier@zb-ale:~$ lpstat -v
dispositivo para Brother-HL-2270DW: ipp://cali00.
dispositivo para EpsonT1110: ipp://192.
dispositivo para HP-CM1415fmw: ipps://
dispositivo para HP-LaserJet-
dispositivo para Zebra-GK420t: ipp://192.
gpothier@zb-ale:~$ sudo hp-setup -i
HP Linux Imaging and Printing System (ver. 3.14.3)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-13 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)
-------
| SELECT CONNECTION (I/O) TYPE |
-------
Num Connection Description
Type
-------- ---------- -------
0* usb Universal Serial Bus (USB)
1 net Network/
2 par Parallel Port (LPT:)
Enter number 0...2 for connection type (q=quit, enter=usb*) ? 1
Using connection type: net
Using device: hp:/net/
Setting up device: hp:/net/
-------
| PRINT QUEUE SETUP |
-------
Please enter a name for this print queue (m=use model name:'HP_
Using queue name: HP_Officejet_
Locating PPD file... Please wait.
Found PPD file: postscript-
Description:
Note: The model number may vary slightly from the actual model number on the device.
Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?
Enter additonal information or notes for this printer (q=quit) ?
Adding print queue to CUPS:
Device URI: hp:/net/
Queue name: HP_Officejet_
PPD file: postscript-
Location:
Information:
-------------------
| FAX QUEUE SETUP |
-------------------
Please enter a name for this fax queue (m=use model name:'HP_
OK, done.
gpothier@zb-ale:~$ lpstat -v
dispositivo para Brother-HL-2270DW: ipp://cali00.
dispositivo para EpsonT1110: ipp://192.
dispositivo para HP-CM1415fmw: ipps://
dispositivo para HP-LaserJet-
dispositivo para HP_Officejet_
dispositivo para Zebra-GK420t: ipp://192.
gpothier@zb-ale:~$ ps aux |grep cupsd
root 2037 0.3 0.0 90252 3848 ? Ss 19:50 0:00 /usr/sbin/cupsd -C /etc/cups/
root 2038 5.3 0.1 78264 5380 ? Ss 19:50 0:00 /usr/sbin/cupsd -f
gpothier 2052 0.0 0.0 22016 936 pts/1 S+ 19:50 0:00 grep --color=auto cupsd
gpothier@zb-ale:~$ sudo service cups stop
cups stop/waiting
gpothier@zb-ale:~$ ps aux |grep cupsd
root 2037 0.1 0.0 90252 3848 ? Ss 19:50 0:00 /usr/sbin/cupsd -C /etc/cups/
gpothier 2065 0.0 0.0 22016 940 pts/1 S+ 19:50 0:00 grep --color=auto cupsd
gpothier@zb-ale:~$ sudo killall cupsd
gpothier@zb-ale:~$ ps aux |grep cupsd
gpothier 2069 0.0 0.0 22016 936 pts/1 S+ 19:50 0:00 grep --color=auto cupsd
gpothier@zb-ale:~$ sudo service cups start
cups start/running, process 2084
gpothier@zb-ale:~$ lpstat -v
dispositivo para Brother-HL-2270DW: ipp://cali00.
dispositivo para EpsonT1110: ipp://192.
dispositivo para HP-CM1415fmw: ipps://
dispositivo para HP-LaserJet-
dispositivo para Zebra-GK420t: ipp://192.
gpothier@zb-ale:~$ sudo hp-setup -i
HP Linux Imaging and Printing System (ver. 3.14.3)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-13 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)
-------
| SELECT CONNECTION (I/O) TYPE |
-------
Num Connection Description
Type
-------- ---------- -------
0* usb Universal Serial Bus (USB)
1 net Network/
2 par Parallel Port (LPT:)
Enter number 0...2 for connection type (q=quit, enter=usb*) ? 1
Using connection type: net
Using device: hp:/net/
Setting up device: hp:/net/
-------
| PRINT QUEUE SETUP |
-------
Please enter a name for this print queue (m=use model name:'HP_
Using queue name: HP_Officejet_
Locating PPD file... Please wait.
Found PPD file: postscript-
Description:
Note: The model number may vary slightly from the actual model number on the device.
Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?
Enter additonal information or notes for this printer (q=quit) ?
Adding print queue to CUPS:
Device URI: hp:/net/
Queue name: HP_Officejet_
PPD file: postscript-
Location:
Information:
-------------------
| FAX QUEUE SETUP |
-------------------
Please enter a name for this fax queue (m=use model name:'HP_
OK, done.
gpothier@zb-ale:~$ ps aux |grep cupsd
root 2127 0.3 0.0 90252 3844 ? Ss 19:51 0:00 /usr/sbin/cupsd -C /etc/cups/
root 2128 5.3 0.1 78264 5384 ? Ss 19:51 0:00 /usr/sbin/cupsd -f
gpothier 2141 0.0 0.0 22016 940 pts/1 S+ 19:52 0:00 grep --color=auto cupsd
gpothier@zb-ale:~$ sudo kill 2127
gpothier@zb-ale:~$ lpstat -v
lpstat: Descriptor de archivo erróneo
gpothier@zb-ale:~$ ps aux |grep cupsd
root 2128 0.7 0.1 78264 5384 ? Ss 19:51 0:00 /usr/sbin/cupsd -f
gpothier 2147 0.0 0.0 22016 936 pts/1 S+ 19:53 0:00 grep --color=auto cupsd
gpothier@zb-ale:~$ sudo service cups restart
cups stop/waiting
cups start/running, process 2183
gpothier@zb-ale:~$ lpstat -v
dispositivo para Brother-HL-2270DW: ipp://cali00.
dispositivo para EpsonT1110: ipp://192.
dispositivo para HP-CM1415fmw: ipps://
dispositivo para HP-LaserJet-
dispositivo para HP_Officejet_
dispositivo para Zebra-GK420t: ipp://192.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: hplip 3.14.3-0ubuntu3.2
ProcVersionSign
Uname: Linux 3.13.0-48-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.8
Architecture: amd64
Date: Mon Mar 30 19:56:57 2015
InstallationDate: Installed on 2013-11-28 (487 days ago)
InstallationMedia: Ubuntu-GNOME 13.04 "Raring Ringtail" - Release amd64 (20130424)
MachineType: ZOTAC ZBOXSD-ID12/ID13
Papersize: letter
PpdFiles:
HP_LaserJet_
qw: HP Fax2 hpcups
HP_Officejet_
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: hplip
UpgradeStatus: Upgraded to trusty on 2014-05-15 (319 days ago)
dmi.bios.date: 12/23/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 080016
dmi.board.
dmi.board.name: ZBOXSD-ID12/ID13
dmi.board.vendor: ZOTAC
dmi.board.version: XX
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: ZBOXSD-ID12/ID13
dmi.product.
dmi.sys.vendor: ZOTAC
Related branches
Changed in hplip: | |
status: | New → Confirmed |
status: | Confirmed → Fix Committed |
To the HPLIP developers at HP: Please have a look into this. Please let hp-setup not start CUPS, especially not unconditionally or directly. The distributions usually start CUPS on boot. If you want to make sure whether CUPS is running when hp-setup is started, check through the startup manager of the distro (the process #1, either System V Init in older distros, Upstart in all recently released Ubuntu, or systemd in all newer distributions including Ubuntu 15.04 and newer) whether CUPS is running and only if it is not running, start it through the startup manager.