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

Bug#580223: marked as done (kpsewhich runs in endlees loop, symlink loop)



Your message dated Thu, 6 May 2010 19:28:36 +0200
with message-id <19426.64580.294317.744173@suenner.informatik.uni-koeln.de>
and subject line Re: Bug#580223: kpsewhich runs in endlees loop, symlink loop
has caused the Debian Bug report #580223,
regarding kpsewhich runs in endlees loop, symlink loop
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
580223: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580223
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: texlive-binaries
Version: 2009-5
Severity: minor


If I install software inside a chroot (squeeze) environment, sometimes
kpsewhich runs into an endless loop and hangs. This is some part of
the output:

Processing triggers for tex-common ...
Running mktexlsr. This may take some time... done.
Setting up texlive-base (2009-8) ...
Running mktexlsr. This may take some time... done.
Building format(s) --all --cnffile /etc/texmf/fmt.d/10texlive-base.cnf.
        This may take some time... done.
Processing triggers for tex-common ...
Running updmap-sys. This may take some time... done.

<HERE IT HANGS>



I can strace the kpsewhich process and it shows following:

stat64("./sys/devices/platform/pcspkr/input:input4/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/input4/input:event4/subsystem/input3", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("./sys/devices/platform/pcspkr/input:input4/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/input4/input:event4/subsystem/input3/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 86
getdents(86, /* 16 entries */, 32768)   = 312
stat64("./sys/devices/platform/pcspkr/input:input4/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/input4/input:event4/subsystem/input3/uevent", {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
stat64("./sys/devices/platform/pcspkr/input:input4/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/mice/subsystem/input4/input:event4/subsystem/input3/subsystem", 0xbfff5ee4) = -1 ELOOP (Too many levels of symbolic links)

These processes are running:

suenner[~]# ps -efl|grep kpsew
0 R root     24037 23532 45  80   0 - 23074 -      16:20 pts/3    00:01:08 kpsewhich language.def
0 S root     23532 23529  0  80   0 -   442 -      16:20 pts/3    00:00:00 /bin/sh -e /var/lib/dpkg/info/tex-common.postinst triggered texmf-hyphen texmf-map
0 S root     23529  8132  0  80   0 -  2405 -      16:20 pts/3    00:00:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/tex-common.postinst triggered texmf-hyphen texmf-map


Inside the chroot, these filesystems are mounted.

proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)


There's a symlink loop in the host system (lenny)

# cd /sys/class/input/
# ls -l
total 0
-r--r--r-- 1 root root 4096 2010-05-04 16:20 dev
drwxr-xr-x 2 root root    0 2010-05-04 16:20 power
lrwxrwxrwx 1 root root    0 2010-05-04 16:20 subsystem -> ../../input
-rw-r--r-- 1 root root 4096 2010-05-04 16:20 uevent



I think kpsewhich should never search in /sys. Also /proc and other
directories may be omitted.

-- 
regards Thomas



--- End Message ---
--- Begin Message ---
>>>>> On Wed, 05 May 2010 18:01:46 +0200, Frank Küster <frank@debian.org> said:

    > You do have an interactive shell in the chroot, don't you?  Then please
    > - send the output of 
    >   egrep "^(SYST|T)EXMF =" /etc/texmf/texmf.cnf 
TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,!!$TEXMFMAIN,!!$TEXMFDIST}
SYSTEXMF = $TEXMFSYSVAR,$TEXMFLOCAL;$TEXMFMAIN;$TEXMFDIST

    > - send the file kpsedebug.lg after running
    >   kpsewhich --debug=90 language.def 2> kpsedebug.lg
Oh, it's about 580k but only 469 lines.

I guess this line from kpsedebug is sufficient:

kdebug:path element .// => ./ ./dev/ ./dev/shm/ ./dev/shm/network/ ./dev/pts/ ./root/ ./sbin/ ./srv/ ./srv/cvs/ ./srv/cvs/CVSROOT/ ./srv/cvs/CVSROOT/Emptydir/ ./boot/ ./mnt/ ./sys/ ./tmp/ ./media/
.....

This is a very, really a _very_ long line containing 14102 path elements! And it includes ./sys

I guess I found the bug by myself.
My normal account has set the variable TEXINPUTS to .//:/home/lange/tex/styles:
When I su to root and then build the chroot, this variable is still
set and causes kpsewhich to scan all subdirectories below . (the
current direcory). Since it's run in a chroot, also ./proc, ./sys and so
on are scanned. Since /sys also includes a symlink loop the build
process hangs.

I've tried the same without setting TEXINPUTS and it works like a
charm. Therefore I close this bug. Sorry for bothering you and thanks
for the hint using kpsewhich --debug=90.
-- 
regards Thomas


--- End Message ---

Reply to: