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

Bug#580223: kpsewhich runs in endlees loop, symlink loop



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



Reply to: