Systemd timeout when cups-browsed.service is stopping

Hi everybody,

Since the beginning of September, I encounter an issue with cups-browsed.service on Manjaro 20.0.3 and Manjaro 20.1. I wish to enable this service to automatically configure a printer provides by a CUPS Printer Server on the local network. At this time, I disabled the cups-browsed.service to avoid a timeout of one or two minutes at Manjaro’s shutdown.

I simply use the official CUPS package build by Manjaro Team and I didn’t modify the conf files in “/etc/cups/”.

Here the SystemD log:

[LTC-10AU-E73 ~]# systemctl stop cups-browsed
[LTC-10AU-E73 ~]# systemctl status cups-browsed
● cups-browsed.service - Make remote CUPS printers available locally
     Loaded: loaded (/usr/lib/systemd/system/cups-browsed.service; disabled; vendor preset: disabled)
     Active: failed (Result: timeout) since Sat 2020-09-12 18:44:22 CEST; 14s ago
    Process: 4522 ExecStart=/usr/bin/cups-browsed (code=killed, signal=KILL)
   Main PID: 4522 (code=killed, signal=KILL)

Sep 12 18:41:35 LTC-10AU-E73 systemd[1]: Started Make remote CUPS printers available locally.
Sep 12 18:42:52 LTC-10AU-E73 systemd[1]: Stopping Make remote CUPS printers available locally...
Sep 12 18:44:22 LTC-10AU-E73 systemd[1]: cups-browsed.service: State 'stop-sigterm' timed out. Killing.
Sep 12 18:44:22 LTC-10AU-E73 systemd[1]: cups-browsed.service: Killing process 4522 (cups-browsed) with signal SIGKILL.
Sep 12 18:44:22 LTC-10AU-E73 systemd[1]: cups-browsed.service: Killing process 4523 (gmain) with signal SIGKILL.
Sep 12 18:44:22 LTC-10AU-E73 systemd[1]: cups-browsed.service: Killing process 4524 (gdbus) with signal SIGKILL.
Sep 12 18:44:22 LTC-10AU-E73 systemd[1]: cups-browsed.service: Main process exited, code=killed, status=9/KILL
Sep 12 18:44:22 LTC-10AU-E73 systemd[1]: cups-browsed.service: Failed with result 'timeout'.
Sep 12 18:44:22 LTC-10AU-E73 systemd[1]: Stopped Make remote CUPS printers available locally.

Can you take a look at this issue please ?
Tell me what information you need to investigate on this issue.

Kind regards.

1 Like

In the future, when providing code/output, please copy-paste it in-between 3 backticks: ``` at the beginning and end of the code/text so that the output looks like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

instead of like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

(as that makes our life much easier so you get helped more quickly and efficiently)

:innocent:

Reviewed and edited as requested :sweat_smile:

Shot in the dark:

pamac remove --no-save cups
pamac install manjaro-printer

You might have to add all your printers again after the above, but before you do, please check whether everything is working this way, but first look if you have any errors after the above…

:innocent:

Done !

Here the log:

[LTC-10AU-E73 ~]# pamac remove --no-save cups
Preparing...
Checking dependencies...
Warning: foomatic-db-gutenprint-ppds optionally requires cups: to use cups printer spooler(recommended)
Warning: gimp optionally requires gutenprint: for sophisticated printing only as gimp has built-in cups print support
Warning: hplip optionally requires cups: for printing support
To remove (4):
  cups             2.3.3-3                         extra
  cups-pdf         3.0.1-5     (Depends On: cups)  extra
  gutenprint       5.3.3-2     (Depends On: cups)  extra
  manjaro-printer  20200215-2  (Depends On: cups)  extra

Total removed size: 45.0 MB
Apply transaction ? [y/N] y
Removing manjaro-printer (20200215-2)...                                                                 [1/4]
Error: manjaro-printer: command failed to execute correctly
Removing gutenprint (5.3.3-2)...                                                                         [2/4]
Removing cups-pdf (3.0.1-5)...                                                                           [3/4]
Removing cups (2.3.3-3)...                                                                               [4/4]
Running post-transaction hooks...
Reloading system manager configuration...                                                                [1/5]
Arming ConditionNeedsUpdate...                                                                           [2/5]
Reloading system bus configuration...                                                                    [3/5]
Updating icon theme caches...                                                                            [4/5]
Updating the desktop file MIME type cache...                                                             [5/5]
Transaction successfully finished.
[LTC-10AU-E73 ~]# tree /etc/cups/
/etc/cups/
├── cups-browsed.conf
├── ppd
│   └── Canon_MG3600_series_GA_Z97P_D3.ppd
├── printers.conf.O
└── subscriptions.conf.O

1 directory, 4 files
[LTC-10AU-E73 ~]# rm -rf /etc/cups/
[LTC-10AU-E73 ~]# pamac install manjaro-printer
Preparing...
Choose optional dependencies for manjaro-printer:
1:  system-config-printer: A gtk cups printer configuration tool and status applet
2:  print-manager: A kde tool for managing print jobs and printers
3:  xsane: gtk2 frontend for scanner
4:  simple-scan: gtk3 frontend for scanner
5:  skanlite: Image Scanning Application for KDE

Enter a selection (default=none): 

Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...
To install (4):
  manjaro-printer  20200215-2                                  extra  
  gutenprint       5.3.3-2     (Required By: manjaro-printer)  extra  
  cups-pdf         3.0.1-5     (Required By: manjaro-printer)  extra  
  cups             2.3.3-3     (Required By: manjaro-printer)  extra  

Total installed size: 45.0 MB
Apply transaction ? [y/N] y
Checking keyring...                                                                                      [4/4]
Checking integrity...                                                                                    [4/4]
Loading packages files...                                                                                [4/4]
Checking file conflicts...                                                                               [4/4]
Checking available disk space...                                                                         [4/4]
Installing cups (2.3.3-3)...                                                                             [1/4]
Configuring cups...
>> If you use an HTTPS connection to CUPS, the first time you access
>> the interface it may take a very long time before the site comes up.
>> This is because the first request triggers the generation of the CUPS
>> SSL certificates which can be a very time-consuming job.
Installing cups-pdf (3.0.1-5)...                                                                         [2/4]
Configuring cups-pdf...
-------------------------------------------------
To use cups-pdf, restart cups and visit the cups
web interface at http://localhost:631/

You can now add a "Virtual Printer (PDF Printer)"
and use the Postscript/Generic postscript color
printer driver.

Note that cups-pdf has a configuration
file in /etc/cups. The default location for
pdf output is /var/spool/cups-pdf/$username.
-------------------------------------------------
Installing gutenprint (5.3.3-2)...                                                                       [3/4]
Configuring gutenprint...
>>please run /usr/bin/cups-genppdupdate
>>and restart cups daemon
Installing manjaro-printer (20200215-2)...                                                               [4/4]
Running post-transaction hooks...
Creating system user accounts...                                                                         [1/7]
Reloading system manager configuration...                                                                [2/7]
Arming ConditionNeedsUpdate...                                                                           [3/7]
Reloading system bus configuration...                                                                    [4/7]
Updating icon theme caches...                                                                            [5/7]
Hiding redundant menu entries                                                                            [6/7]
Updating the desktop file MIME type cache...                                                             [7/7]
Transaction successfully finished.
[LTC-10AU-E73 ~]# /usr/bin/cups-genppdupdate
No Gutenprint PPD files to update.
[LTC-10AU-E73 ~]# systemctl stop org.cups.cupsd.service
[LTC-10AU-E73 ~]# systemctl start org.cups.cupsd.service
[LTC-10AU-E73 ~]# systemctl status org.cups.cupsd.service
● org.cups.cupsd.service - CUPS Scheduler
     Loaded: loaded (/usr/lib/systemd/system/org.cups.cupsd.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2020-09-16 13:09:13 CEST; 6s ago
TriggeredBy: ● org.cups.cupsd.path
             ● org.cups.cupsd.socket
       Docs: man:cupsd(8)
   Main PID: 2228 (cupsd)
     Status: "Scheduler is running..."
      Tasks: 3 (limit: 9426)
     Memory: 4.4M
     CGroup: /system.slice/org.cups.cupsd.service
             ├─2228 /usr/bin/cupsd -l
             ├─2229 /usr/lib/cups/notifier/dbus dbus://
             └─2230 /usr/lib/cups/notifier/dbus dbus://

Sep 16 13:09:13 LTC-10AU-E73 systemd[1]: Starting CUPS Scheduler...
Sep 16 13:09:13 LTC-10AU-E73 systemd[1]: Started CUPS Scheduler.
[LTC-10AU-E73 ~]# tree /etc/cups/
/etc/cups/
├── classes.conf
├── cupsd.conf
├── cupsd.conf.default
├── cups-files.conf
├── cups-files.conf.default
├── cups-pdf.conf
├── ppd
├── printers.conf
├── snmp.conf
├── snmp.conf.default
├── ssl
├── subscriptions.conf
└── subscriptions.conf.O

2 directories, 11 files
[LTC-10AU-E73 ~]# systemctl start cups-browsed
[LTC-10AU-E73 ~]# tree /etc/cups/
/etc/cups/
├── classes.conf
├── cupsd.conf
├── cupsd.conf.default
├── cups-files.conf
├── cups-files.conf.default
├── cups-pdf.conf
├── ppd
│   └── Canon_MG3600_series_GA_Z97P_D3.ppd
├── printers.conf
├── snmp.conf
├── snmp.conf.default
├── ssl
├── subscriptions.conf
└── subscriptions.conf.O

2 directories, 12 files
[LTC-10AU-E73 ~]# systemctl stop cups-browsed
[LTC-10AU-E73 ~]# systemctl status cups-browsed
● cups-browsed.service - Make remote CUPS printers available locally
     Loaded: loaded (/usr/lib/systemd/system/cups-browsed.service; disabled; vendor preset: disabled)
     Active: failed (Result: timeout) since Wed 2020-09-16 13:11:40 CEST; 22s ago
    Process: 2243 ExecStart=/usr/bin/cups-browsed (code=killed, signal=KILL)
   Main PID: 2243 (code=killed, signal=KILL)

Sep 16 13:09:48 LTC-10AU-E73 systemd[1]: Started Make remote CUPS printers available locally.
Sep 16 13:10:10 LTC-10AU-E73 systemd[1]: Stopping Make remote CUPS printers available locally...
Sep 16 13:11:40 LTC-10AU-E73 systemd[1]: cups-browsed.service: State 'stop-sigterm' timed out. Killing.
Sep 16 13:11:40 LTC-10AU-E73 systemd[1]: cups-browsed.service: Killing process 2243 (cups-browsed) with signal SIGKILL.
Sep 16 13:11:40 LTC-10AU-E73 systemd[1]: cups-browsed.service: Killing process 2245 (gdbus) with signal SIGKILL.
Sep 16 13:11:40 LTC-10AU-E73 systemd[1]: cups-browsed.service: Main process exited, code=killed, status=9/KILL
Sep 16 13:11:40 LTC-10AU-E73 systemd[1]: cups-browsed.service: Failed with result 'timeout'.
Sep 16 13:11:40 LTC-10AU-E73 systemd[1]: Stopped Make remote CUPS printers available locally.

:thinking:

You missed this bit:

I regenerated the complete uninstall/install sequence with the missing command. I apologize.
I replaced the log in the previous post with the new report.

  1. I had hoped this one would be gone then:

  2. Why do you start cups-browsed? Do you have Apple hardware that doesn’t recognize printers after you verified CUPS is working with systemctl status org.cups.cupsd.service?

:thinking:

  1. Effectively, each time I execute the command to remove the cups package, the error of manjaro-printer displays. I didn’t see anything about this by monitoring the execution with journalctl -f beside. If you want to lead me to look for information about this error, I’m ready.

  2. I start cups-browsed because it allows to dynamically add my printer. No action required, no need to open the CUPS Web Interface to manage printers (https://wiki.archlinux.org/index.php/CUPS#cups-browsed). The tree command shows the adding of the ppd file one or two seconds after the cups-browsed.service starts confirming the printer is set up on the system.

I’m all out of bright ideas by now… My apologies…

:sob:

No problem Fabby. What we do is useful to understand the problem.

I think it’s a cups issue because I noticed it occured since the last cups update at the end of August when I was still using Manjaro 20.0.3.

Do you know how can I report this issue to the cups maintainer ?

1 Like

Nope, but a 10 second Google, Bing, DuckDuckGo later:

https://www.cups.org/doc/reporting-bugs.html

:stuck_out_tongue_winking_eye: :crazy_face:

Finally, I opened a case here : Systemd timeout when cups-browsed.service is stopping · Issue #17105 · systemd/systemd · GitHub

I keep you posted !
:wink:

I think that was the wrong place/software to open a bug report (for): it’s not systemds fault when cups-browsed doesn’t stop before the configured/default timeout limit is hit.

Hi freggel.doe,

SystemD Team confimed you’re right. They closed the case by telling me to open a case at cups-browsed maintainer.

Here the new open case: Systemd timeout when cups-browsed.service is stopping · Issue #310 · OpenPrinting/cups-filters · GitHub

I still keep you posted !
Have a nice day.

Hi everybody,

OpenPrinting Team answers they already fix this issue here: [1.28.1] cups-browsed gets SIGKILL during service restart · Issue #298 · OpenPrinting/cups-filters · GitHub

The fix is released in the new cups-filter version 1.28.2. So I just have to be patient to receive this update provides by Manjaro Team.

Thanks to all.
Take care of yourself.
:relaxed:

1 Like