Bug 8260

Summary: bitbake-prserv: when using --port 0, the daemon cannot be stopped
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: Scripts and ToolsAssignee: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: ross.burton
Version: 1.8   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Leonardo Sandoval Gonzalez 2015-09-04 22:12:55 UTC
When using --port 0 on the script bitbake-prserv, then one tries to stop the daemon, the latter does not stop

Steps to reproduce:

1. bitbake-prserv --host localhost --port 0 --loglevel=DEBUG --start

2. ls -la /tmp/PRServer_127.0.0.1_37183.pid 
-rw-rw-rw- 1 lsandov1 users 6 Sep  4 13:56 /tmp/PRServer_127.0.0.1_37183.pid

3. bitbake-prserv --host localhost --port 0 --loglevel=DEBUG --stop
pidfile /tmp/PRServer_localhost_0.pid does not exist. Daemon not running?

4. ps axu | grep bitbake
lsandov1 28535  0.0  0.0 174704 15136 ?        Sl   13:56   0:00 python /home/lsandov1/poky/bitbake/bin/bitbake-prserv --host localhost --port 0 --loglevel=DEBUG --start


As one can see, step 3 fails an daemon is still running as shown in 4.

This problem is quite similar to https://bugzilla.yoctoproject.org/show_bug.cgi?id=8258, however, in 8258 the daemon is closed, and in this case it is not, so filing this bug due to the latter.
Comment 1 Leonardo Sandoval Gonzalez 2015-09-15 23:12:52 UTC
Patch sent to the ML.