reassign 499139 mksh retitle mksh gets confused by nested debconf using scripts thanks
On Tue, Sep 16, 2008 at 04:27:59PM +0200, Markus Schaber wrote: > dictionaries-common seems to hang forever (without any cpu usage) during the > package > setup / configuration. Thanks for the info, seems I missed your bug report, > > PS auxf shows the following process (sub)tree: > > root 15382 0.1 1.2 31484 25340 pts/2 S+ 16:12 0:01 | \_ > apt-get install awesome/experimental > root 16202 0.0 0.4 14040 9760 pts/10 Ss+ 16:14 0:00 | \_ > /usr/bin/dpkg --status-fd 60 --configure dictionaries-common > openoffice.org-common openoffice.org-style-andromeda openoffice.org-core > openoffice.org-style-crystal > root 16203 0.1 0.5 15968 11212 pts/10 S+ 16:14 0:00 | \_ > /usr/bin/perl -w /usr/share/debconf/frontend > /var/lib/dpkg/info/dictionaries-common.postinst configure > root 16210 0.0 0.0 2000 652 pts/10 S+ 16:14 0:00 | \_ > /bin/sh /var/lib/dpkg/info/dictionaries-common.postinst configure > root 16214 0.0 0.1 7616 3072 pts/10 S+ 16:14 0:00 | > \_ /usr/bin/perl -w /usr/sbin/update-default-ispell --rebuild I cannot reproduce this at all here with either dash or bash as /bin/sh. However, since you use mksh, your bug report has reminded me about another bug report regarding the interaction between debconf and another ksh like shell, zsh (not the same bug, zsh has a different error), http://bugs.debian.org/351031 If I set /bin/sh to /bin/mksh and run # /var/lib/dpkg/info/dictionaries-common.postinst configure installation hangs as at your site. However, if I coment the line . /usr/share/debconf/confmodule and run the script again, it does not hang at all. the problem seems to appear when, from a script that has already loaded . /usr/share/debconf/confmodule another script which loads it again and uses it is called (update-default-{ispell,wordlist}). That is what seems to produce a loop under mksh. Similar behavior is observed when installing ispell dictionaries or wordlists. I have done further research on this and the result follows: GOOD: bash, dash, posh, pdksh BAD: ksh, mksh BAD2: zsh Under zsh just returns error if perl script, although does not hang, so BAD2. For this reason I tend to think this is a problem in mksh (and in its ancestor ksh). A simple test case follows: # ----- 8< -- test-mksh ------------------------ #!/bin/sh . /usr/share/debconf/confmodule ./run-test # ----- 8< -- test-mksh ------------------------ # ----- 8< -- run-test ------------------------- #!/bin/sh . /usr/share/debconf/confmodule db_get "dictionaries-common/default-ispell" echo "$RET"; # ----- 8< -- run-test ------------------------- does give # ./test-mksh ./run-test[5]: >&3 : bad file descriptor and hangs. The same for ksh. -- Agustin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]