FS#51774 - [cups] Service crash on PreserveJobFiles

Attached to Project: Arch Linux
Opened by Maniaxx (Maniaxx) - Wednesday, 09 November 2016, 23:14 GMT
Last edited by Andreas Radke (AndyRTR) - Wednesday, 21 March 2018, 14:03 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When executing 'cupsctl PreserveJobFiles=31d' (as root or regular user) the service (org.cups.cupsd.service) crashes.

Nov 09 23:47:28 blue systemd[1]: org.cups.cupsd.service: Main process exited, code=exited, status=1/FAILURE
Nov 09 23:47:28 blue systemd[1]: org.cups.cupsd.service: Unit entered failed state.
Nov 09 23:47:28 blue systemd[1]: org.cups.cupsd.service: Failed with result 'exit-code'.

When trying to change cupsd.conf via webinterface the service dies as well when config gets saved.
When trying to change server setting (PreserveJobFiles) with 'system-config-printer' (red hat config tool) the app freezes (services stays alive though).

The bug cannot be reproduced upstream. See here: https://github.com/apple/cups/issues/4915

Linux 4.8.6-1-ARCH x86_64
XFCE
Firefox
cups 2.2.1
Brother HL-2030 (HL-1250 PPD)
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Wednesday, 21 March 2018, 14:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  per upstream reports all these issues should be fixed meanwhile.
Comment by Andreas Radke (AndyRTR) - Thursday, 10 November 2016, 16:24 GMT
I don't see how this could be Arch specific.

Is this a regression? What update introduced this?
Comment by Maniaxx (Maniaxx) - Thursday, 10 November 2016, 19:28 GMT
I can't tell anything about previous versions. Its my first CUPS installment.
I'm not sure what you mean by you can't see any Arch dependency here. This bug doesn't occur upstream. Unless you say it doesn't happen on your system its Arch specific for sure (doesn't mean its packaging related).

The bug needs confirmation first indeed. There's still a chance that only my system is affected (for whatever reason. I'm on vanilla system though. No fancy things).

Did you test 'cupsctl PreserveJobFiles=31d' yet?
Comment by Andreas Radke (AndyRTR) - Thursday, 10 November 2016, 20:00 GMT
I can confirm the crash. It would be nice to know if other linux systems using cups 2.2.1 crash the same way or if older version don't crash (regression -> git bisect). Some further debugging with symbols enabled could also help.

It's always pretty common that "upstream" behavior is different. Upstream is Apple, so a totally different OS.
Comment by Maniaxx (Maniaxx) - Friday, 11 November 2016, 02:11 GMT
cups-2.1.4-2-x86_64.pkg.tar.xz is good
cups-2.2.0-1-x86_64.pkg.tar.xz is bad

The 2.2.1-1 patches do not work on 2.1.4-2 and i have no clue where to get the old PKGBUILD. vABS is down. Not sure though if it makes sense at all to do a git bisect on a major release change.
Will setup another Linux distro tomorrow.
Comment by Andreas Radke (AndyRTR) - Friday, 11 November 2016, 07:37 GMT
Please report back to the upstream report that this is a regression introduced in 2.2.0 release.
Comment by Maniaxx (Maniaxx) - Monday, 14 November 2016, 18:56 GMT
Upstream notified.
Beside that, there's one Arch user stating it doesn't crash when not using systemd. Not sure if that's helpful.
https://bbs.archlinux.org/viewtopic.php?pid=1668883#p1668883
Comment by Maniaxx (Maniaxx) - Thursday, 19 January 2017, 17:16 GMT
Correction. The service doesn't crash. CUPS rather shuts down gracefully whenever a restart is intended. That's very likely the way its meant to be done. CUPS shuts down to reload the new configuration and waits for the system to restart it. But the Arch release doesn't have any 'restart=' member in the systemd unit so once CUPS shuts down it remains down. Neither logs nor GDB show any abnormal runtime paths or errors. I manually added a 'restart=always' into the unit file and it does work properly now indeed. I think you might want to fix that as well. The bug can be triggered whenever you change anything on server config via webinterface and the server restarts.
Ticket can be closed i guess.
Comment by Andreas Radke (AndyRTR) - Saturday, 21 January 2017, 12:16 GMT
Is upstream willing to add "restart" to the systemd service file? Is this the proper fix?
Comment by Maniaxx (Maniaxx) - Saturday, 21 January 2017, 17:48 GMT
My bad, of course you're right. I wasn't aware upstream handles systemd as well (i assumed apple/launchd only). Looking at 'master/scheduler/org.cups.cupsd.service.in' there is no' restart=' indeed. I will report that upstream.

Loading...