Bug 1097409

Summary: Pound PID file issue
Product: [Fedora] Fedora EPEL Reporter: John Margaritsanakis <john>
Component: PoundAssignee: Adam Tkac <vonsch>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: battery.staple, bperkins, jensdepuydt, lkundrak, manuel.wolfshant, mosonkonrad, vlastimil.holer, vonsch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.7-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-18 18:59:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Inizialize fpid value as NULL none

Description John Margaritsanakis 2014-05-13 18:18:06 UTC
Description of problem:

Default Pound doesn't run on rhel7 rc1. It produces this error:

PID file /run/pound.pid not readable (yet?) after start

The default service file was this:

---
[Unit]
Description=Pound Reverse Proxy And Load-balancer
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/var/run/pound.pid
ExecStart=/usr/sbin/pound

[Install]
WantedBy=multi-user.target
---

I tried a few different things such as defining the PID file's location with -p <pid file path> but that didn't fix the issue. Defining User=pound (with or without Group=pound) in the service file removes the PID error but replaces it with 

HTTP socket bind 0.0.0.0:80: Address already in use - aborted

In the end commenting out the PIDFile line entirely resolves the problem and pound runs fine.

Version-Release number of selected component (if applicable):

Name        : Pound
Arch        : x86_64
Epoch       : 1
Version     : 2.7
Release     : 0.1.c.el7.1

How reproducible:

Steps to Reproduce:
1. Install RHEL 7 rc1
2. Install pound from EPEL7
3. 

Actual results:

Pound doesn't run after installation using defaults.

Expected results:

Pound runs after installation using defaults.

Additional info:

Comment 1 Jens D 2014-07-11 11:46:37 UTC
It appears to me that Pound isn't creating a pid-file. Even when using the -p option, no file is created. The servicefile of systemd expects a pid-file and is waiting for it to be created.

Workaround:
The simple workaround to still use Pound, is to remove the check for a pid-file by systemd:
edit file /usr/lib/systemd/system/pound.service and comment out the line with PIDFile so that your file looks like this:

[Unit]
Description=Pound Reverse Proxy And Load-balancer
After=syslog.target network.target

[Service]
Type=forking
#PIDFile=/var/run/pound.pid
ExecStart=/usr/sbin/pound

[Install]
WantedBy=multi-user.target

Then Pound should start and stop without problems with systemd.

Comment 2 Konrad Mosoń 2015-06-11 15:22:26 UTC
It's quite problematic, and fix is very easy. systemd handles process for itself, so maybe package maintainer could just remove this line?

Comment 3 Konrad Mosoń 2015-06-16 15:57:09 UTC
Hey, I was looking into this issue and I found interesting this.

.spec file contains: 


# tcmalloc exists only on selected arches, ppc64 (#238390)
%ifarch %{ix86} x86_64 ppc
BuildRequires: gperftools-devel
%endif


Runnning "./configure; make; pound -f /etc/pound.cfg"
WITHOUT gperftools-devel installed CREATED pidfile.


Running above command WITH that package installed causes that pidfile is not created.
I have no idea what this package does (except info which tell me nothing about connection with this bug)... maybe someone can look into this? It's quite interesting…

Comment 4 Konrad Mosoń 2015-08-07 11:07:45 UTC
What about this bug? It's more than year old…

Comment 5 Konrad Mosoń 2015-08-18 11:33:03 UTC
Created attachment 1064290 [details]
Inizialize fpid value as NULL

OK. Found what was the real problem!

Looks like bug in Pound which was exposed in connection with 0005-Allow-to-reload-configuration-on-SIGHUP-SIGINT-witho.patch along with gperftools included.

The problem was with "fpid" was uninitialized (so random value appeared depending on optimalizations used and on this magic gperftools).

The patch that was added by someone to Pound rpm checked if "fpid" is NULL, then it created PIDFile. But it wasn't initialized, so it could be anything on the first run.

It was not problem in original Pound code, cause they initialized "fpid" value on the first line of code that used it.

Comment 6 Konrad Mosoń 2015-08-25 18:14:58 UTC
Anybody maintains this package still?

Comment 7 Adam Tkac 2015-09-01 14:49:50 UTC
Good catch Konrad, however I preferred to drop whole reload patch because it is too invasive change to be kept downstream.

Comment 8 Fedora Update System 2015-09-01 14:54:28 UTC
Pound-2.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14779

Comment 9 Fedora Update System 2015-09-01 14:54:44 UTC
Pound-2.7-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14780

Comment 10 Fedora Update System 2015-09-01 14:55:00 UTC
Pound-2.7-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14781

Comment 11 Fedora Update System 2015-09-01 14:55:13 UTC
Pound-2.7-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7887

Comment 12 Fedora Update System 2015-09-01 19:49:19 UTC
Pound-2.7-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update Pound'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14781

Comment 13 Fedora Update System 2015-09-01 20:22:12 UTC
Pound-2.7-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update Pound'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14779

Comment 14 Fedora Update System 2015-09-02 08:49:04 UTC
Pound-2.7-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update Pound'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7887

Comment 15 Fedora Update System 2015-09-02 16:21:23 UTC
Pound-2.7-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update Pound'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14780

Comment 16 John Margaritsanakis 2015-09-14 17:48:32 UTC
Pound-2.7-1.fc22 appears to solve the issue. Thanks, guys!

Comment 17 Fedora Update System 2015-09-18 18:59:21 UTC
Pound-2.7-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Konrad Mosoń 2015-09-22 12:59:36 UTC
Will this package be pushed to EPEL 7 too?

Comment 19 Fedora Update System 2015-09-22 22:54:28 UTC
Pound-2.7-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-09-23 00:21:12 UTC
Pound-2.7-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2015-09-23 13:25:08 UTC
Pound-2.7-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.