hp-setup creates spurious cupsd process

Bug #1438456 reported by gpothier on 2015-03-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Undecided
Unassigned
hplip (Ubuntu)
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/cupsd.conf
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.local:631/printers/Brother_HL-2270DW
dispositivo para EpsonT1110: ipp://192.168.0.12:631/printers/EpsonT1110
dispositivo para HP-CM1415fmw: ipps://cali-sys.local:631/printers/HP_CM1415fmw
dispositivo para HP-LaserJet-Professional-P1102w: ipp://192.168.0.12:631/printers/HP-LaserJet-Professional-P1102w
dispositivo para Zebra-GK420t: ipp://192.168.0.12:631/printers/Zebra-GK420t

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/Ethernet/Wireless (direct connection or JetDirect)
  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/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108

Setting up device: hp:/net/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108

---------------------
| PRINT QUEUE SETUP |
---------------------

Please enter a name for this print queue (m=use model name:'HP_Officejet_Pro_X476dw_MFP'*, q=quit) ?
Using queue name: HP_Officejet_Pro_X476dw_MFP
Locating PPD file... Please wait.

Found PPD file: postscript-hp:1/ppd/hplip/HP/hp-officejet_pro_476_576_series-ps.ppd
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/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108
Queue name: HP_Officejet_Pro_X476dw_MFP
PPD file: postscript-hp:1/ppd/hplip/HP/hp-officejet_pro_476_576_series-ps.ppd
Location:
Information:

-------------------
| FAX QUEUE SETUP |
-------------------

Please enter a name for this fax queue (m=use model name:'HP_Officejet_Pro_X476dw_MFP_fax'*, q=quit) ?q
OK, done.

gpothier@zb-ale:~$ lpstat -v
dispositivo para Brother-HL-2270DW: ipp://cali00.local:631/printers/Brother_HL-2270DW
dispositivo para EpsonT1110: ipp://192.168.0.12:631/printers/EpsonT1110
dispositivo para HP-CM1415fmw: ipps://cali-sys.local:631/printers/HP_CM1415fmw
dispositivo para HP-LaserJet-Professional-P1102w: ipp://192.168.0.12:631/printers/HP-LaserJet-Professional-P1102w
dispositivo para HP_Officejet_Pro_X476dw_MFP: hp:/net/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108
dispositivo para Zebra-GK420t: ipp://192.168.0.12:631/printers/Zebra-GK420t

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/cupsd.conf
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/cupsd.conf
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.local:631/printers/Brother_HL-2270DW
dispositivo para EpsonT1110: ipp://192.168.0.12:631/printers/EpsonT1110
dispositivo para HP-CM1415fmw: ipps://cali-sys.local:631/printers/HP_CM1415fmw
dispositivo para HP-LaserJet-Professional-P1102w: ipp://192.168.0.12:631/printers/HP-LaserJet-Professional-P1102w
dispositivo para Zebra-GK420t: ipp://192.168.0.12:631/printers/Zebra-GK420t

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/Ethernet/Wireless (direct connection or JetDirect)
  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/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108

Setting up device: hp:/net/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108

---------------------
| PRINT QUEUE SETUP |
---------------------

Please enter a name for this print queue (m=use model name:'HP_Officejet_Pro_X476dw_MFP'*, q=quit) ?
Using queue name: HP_Officejet_Pro_X476dw_MFP
Locating PPD file... Please wait.

Found PPD file: postscript-hp:1/ppd/hplip/HP/hp-officejet_pro_476_576_series-ps.ppd
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/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108
Queue name: HP_Officejet_Pro_X476dw_MFP
PPD file: postscript-hp:1/ppd/hplip/HP/hp-officejet_pro_476_576_series-ps.ppd
Location:
Information:

-------------------
| FAX QUEUE SETUP |
-------------------

Please enter a name for this fax queue (m=use model name:'HP_Officejet_Pro_X476dw_MFP_fax'*, q=quit) ?q
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/cupsd.conf
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.local:631/printers/Brother_HL-2270DW
dispositivo para EpsonT1110: ipp://192.168.0.12:631/printers/EpsonT1110
dispositivo para HP-CM1415fmw: ipps://cali-sys.local:631/printers/HP_CM1415fmw
dispositivo para HP-LaserJet-Professional-P1102w: ipp://192.168.0.12:631/printers/HP-LaserJet-Professional-P1102w
dispositivo para HP_Officejet_Pro_X476dw_MFP: hp:/net/HP_Officejet_Pro_X476dw_MFP?ip=192.168.0.108
dispositivo para Zebra-GK420t: ipp://192.168.0.12:631/printers/Zebra-GK420t

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: hplip 3.14.3-0ubuntu3.2
ProcVersionSignature: Ubuntu 3.13.0-48.80-generic 3.13.11-ckt16
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_CM1415fnw_2: HP LaserJet CM1410 Series Postscript (recommended)
 qw: HP Fax2 hpcups
 HP_Officejet_Pro_X476dw_MFP: HP Officejet Pro X476-X576 MFP Postscript (recommended)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-48-generic root=UUID=dba2a232-45d8-4552-88a9-13abdad061ce ro quiet splash vt.handoff=7
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.asset.tag: NA
dmi.board.name: ZBOXSD-ID12/ID13
dmi.board.vendor: ZOTAC
dmi.board.version: XX
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr080016:bd12/23/2010:svnZOTAC:pnZBOXSD-ID12/ID13:pvrXX:rvnZOTAC:rnZBOXSD-ID12/ID13:rvrXX:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: ZBOXSD-ID12/ID13
dmi.product.version: XX
dmi.sys.vendor: ZOTAC

Related branches

gpothier (gpothier) wrote :
Till Kamppeter (till-kamppeter) wrote :

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.

Changed in hplip:
status: New → Confirmed
status: Confirmed → Fix Committed
Sanjay Kumar (sanjay-kumar14) wrote :

Fixed in hplip-3.15.6

Changed in hplip:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 3.15.6-0ubuntu1

---------------
hplip (3.15.6-0ubuntu1) wily; urgency=low

  * New upstream release
     - Added support for HP DeskJet 2130/2132/2546B/2546P/2546R/3630/3632
       All-in-One printer, HP OfficeJet 57444 e-All-in-One
     - Fixed: Error message is displayed while running "hp-diagnose_queues"
       in a terminal.
     - Fixed: UDEV rules wrongly match on monitor hub, wrong invocation of
       systemd unti, changes confi files in UDEV rules (LP: #1433557).
     - Fixed: hp-setup creates spurious cupsd process (LP: #1438456).
  * debian/patches/musb-c-do-not-crash-on-usb-failure.patch,
    debian/patches/pcardext-python3-workaround-upstream.patch,
    debian/patches/hp-plugin-download-fix.patch: Updated for new upstream
    code.

 -- Till Kamppeter <email address hidden> Thu, 11 Jun 2015 19:08:00 -0300

Changed in hplip (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers