Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 50322

Summary: python-updater causes logger to hang indefinitely
Product: Gentoo Linux Reporter: Erik van Mourik <emourik>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Erik van Mourik 2004-05-07 00:44:23 UTC
I upgraded to Python 2.3, and was instructed to run python-updater. This script  updated 6 packages but failed on one of them. At the end of the script, it started generating a result summary, using the ewarn macro from functions.sh. This macro in turn calls the logger application to write to the system log.

One of the strings to be logged is a " ". According to 'ps -ax', the logger receives arguments "-p daemon.warning -t rc-scripts --" and starts waiting for input on stdin. Result: logger halts, python-updater halts, user is confused.


Reproducible: Always
Steps to Reproduce:
1. Upgrade to python 2.3
2. Run python-updater
3. Make certain it fails upgrading at least one package (no idea how one could achieve this, but it happened to me :-)
4. Wait, and wait, and wait...

Actual Results:  
I returned the next morning and found a frozen script. Some script inspection 
combined with the 'ps -ax' output told me exactly what had gone wrong: the 
logger application was halted.

Expected Results:  
It should have logged the results of the python-updater script.

Simple workaround: Ctrl-Z, ps -ax, kill <logger process ID>, fg (multiple times, 
because the script contains several attempts to log empty strings :-)

A more elegant solution: Please don't try to log blank strings in 
python-updater.sh!!!

The ultimate solution: trap this situation in functions.sh. I verified that you 
can log a blank string with command 'logger -- " "'. The esyslog() function 
could test for a blank/empty string and then use the above construct to log a 
single space char...
Comment 1 Rob Cakebread (RETIRED) gentoo-dev 2004-06-14 10:30:42 UTC
Are you using an old version of baselayout? 

Is this bug related?
http://bugs.gentoo.org/show_bug.cgi?id=16466
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2004-06-26 13:18:41 UTC
needinfo