FS#66616 - [tinyproxy] hangs on startup because PidFile does not match the systemd unit

Attached to Project: Community Packages
Opened by Asher256 (Asher256) - Monday, 11 May 2020, 18:17 GMT
Last edited by Toolybird (Toolybird) - Monday, 01 May 2023, 20:01 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description: "systemctl start tinyproxy" hangs because the default value of "PidFile" in "/etc/tinyproxy/tinyproxy.conf" is different from "PidFile" in "/usr/lib/systemd/system/tinyproxy.service".

Additional info:
================
* Package: tinyproxy-1.10.0-1

Steps to reproduce:
===================
1) pacman -S tinyproxy
2) systemctl start tinyproxy # it hangs indefinitely

How to fix it:
==============
Modify "/etc/tinyproxy/tinyproxy.conf" in the pacman package "community/tinyproxy".

The following line in "/etc/tinyproxy/tinyproxy.conf":
#PidFile "/var/run/tinyproxy/tinyproxy.pid"

Should be replaced by:
PidFile "/run/tinyproxy/tinyproxy.pid"

(to match "PIDFile=/run/tinyproxy/tinyproxy.pid" in "/usr/lib/systemd/system/tinyproxy.service")
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 01 May 2023, 20:01 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#65908 
Comment by Kerin Millar (kerframil) - Tuesday, 15 June 2021, 03:05 GMT
I just encountered this issue. In fact, systemctl(1) does not hang indefinitely. Rather, after TimeoutStartSec (90 seconds by default), systemd will eventually give up and kill all of the tinyproxy processes that have been spawned. In any case, it makes for a poor user experience and it should be addressed in the manner that Asher256 described.
Comment by loqs (loqs) - Tuesday, 15 June 2021, 03:33 GMT
@kerframil please try building with the attached diff which changes /etc/tinyproxy/tinyproxy.conf as documented by Asher256.
I did not update the PKGBUILD to 1.11.0 as that release is unsigned and by a different author.
Edit:
Should also fix  FS#65908  which I believe is the same issue as this one.
Comment by Kerin Millar (kerframil) - Tuesday, 15 June 2021, 04:50 GMT
The diff applies correctly and serves the intended purpose. This bug is, indeed, a duplicate of  FS#65908 .
Comment by Tristan (tbhi) - Thursday, 05 May 2022, 08:31 GMT
seems simplest to avoid the pid file - I have

# cat /etc/systemd/system/tinyproxy.service.d/override.conf
[Service]
PIDFile=
Type=simple
ExecStart=
ExecStart=-/usr/bin/tinyproxy -d

Loading...