[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#413249: severity of 413249 is important, tagging 413249



Steve Langasek <vorlon@debian.org> wrote:

> # Automatically generated email from bts, devscripts version 2.9.27
> severity 413249 important
> tags 413249 unreproducible

It is very well reproducible here, it occurred again today.  This time,
even Ctrl-c wouldn't stop the script, it ate >95% CPU, and "ps axf"
showed that it had somehow detached from the controlling X terminal.  It
needed a "kill $pid" to get control of my CPU.

I have added a "set -x" in config and preinst, and this showed me one
point were there is a bug in the config script.  I am not sure, however,
that this is the root of my problem.  

The bug I found so far is

while :; do
  run db_input low x11-common/xwrapper/nice_value
  # is the question going to be asked?
  if [ $? -eq 30 ]; then
    break # no; bail out of validation loop
  fi

Because db_input is wrapped in the "run" function, the return value of
db_input is no longer in $?, and the script will not break the loop.  It
is in $_retval, though:

run () {
[...]
  "$@" || _retval=$?

  if [ ${_retval:-0} -ne 0 ]; then
    observe "command \"$*\" exited with status $_retval"
  fi

The patch for this would be

 while :; do
   run db_input low x11-common/xwrapper/nice_value
   # is the question going to be asked?
+  WILL_BE_ASKED=$_retval
-  if [ $? -eq 30 ]; then
+  if [ $WILL_BE_ASKED -eq 30 ]; then
    break # no; bail out of validation loop
  fi

However, changing this doesn't fix my problem, and I got sceptical
whether it originates in x11-common, since I get so many internal
debconf errors.

I removed the content of /var/cache/debconf, dpkg-reconfigure'd debconf,
and tried again, but that didn't help.

Somehow still debconf's answers are not what the config script expects.
Upon reinstalling x11-common with "set -xv", I get 

# next question requires input validation; assume safe valid value already
# present (possibly the template default)
SAFE=
+ SAFE=
if db_get x11-common/xwrapper/nice_value; then
  SAFE="$RET"
fi
+ db_get x11-common/xwrapper/nice_value
+ _db_cmd 'GET x11-common/xwrapper/nice_value'
+ IFS=' '
+ printf '%s\n' 'GET x11-common/xwrapper/nice_value'
debconf (developer): <-- GET x11-common/xwrapper/nice_value
debconf (developer): --> 0 0
+ IFS='
'
+ read -r _db_internal_line
+ RET='value set'
+ case ${_db_internal_line%%[ 	]*} in
+ return 0
+ SAFE='value set'

Why on earth is "$RET" now "value set", where it should be "0"?  Note
that "value set" was the last answer that debconf communicated about
that template, but not the last answer it communcated in that script
(which was about allowed_users.

What is happening here?  Please remember that this is an etch system
installed on the 10th of February, nothing were the system had time to
degrade into a mess of distribution mixture and local misconfiguration
(though I do not exclude the latter...)

Regards, Frank
-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: