Bug#257456: gconf2: gconftool-2 --makefile-install-rule hangs while installing packages

Walther Zwart Walther Zwart <w.h.zwart@home.nl>, 257456@bugs.debian.org
Sun, 4 Jul 2004 17:02:34 +0200


Ok, I've tried to get some more info about the bug I submitted.


======== contents of /var/lib/dpkg/info/gnome-session.postinst
#!/bin/sh -e

if [ "$1" = configure ]; then
  update-alternatives --install /usr/bin/x-session-manager \
    x-session-manager /usr/bin/gnome-session 50 \
    --slave /usr/share/man/man1/x-session-manager.1.gz \
    x-session-manager.1.gz /usr/share/man/man1/gnome-session.1.gz
fi

# Automatically added by dh_gconf
if [ "$1" = "configure" ]; then
	SCHEMA_LOCATION=/etc/gconf/schemas
	SCHEMA_FILES="gnome-session.schemas "
	for SCHEMA in $SCHEMA_FILES; do
		if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then
			HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \		}
				gconftool-2 \								}	This is what hangs
				--makefile-install-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null		}
		fi
	done
fi
# End automatically added section


exit 0

======== when I run it manually it hangs too
workstation:/var/lib/dpkg/info# ls /etc/gconf/schemas/gnome-session.schemas
/etc/gconf/schemas/gnome-session.schemas
workstation:/var/lib/dpkg/info# export HOME=/root
workstation:/var/lib/dpkg/info# echo `gconftool-2 --get-default-source`
xml::/etc/gconf/gconf.xml.defaults
workstation:/var/lib/dpkg/info# export GCONF_CONFIG_SOURCE=`gconftool-2 
--get-default-source`
workstation:/var/lib/dpkg/info# gconftool-2 
--makefile-install-rule /etc/gconf/schemas/gnome-session.schemas
======== hangs until I push CTRL+C


======== when gconftool is running the following files are open:
walther@workstation:~$ lsof | grep gconftool
gconftool 3056        root  mem    REG       3,69    52272     
370267 /usr/bin/gconftool-2
gconftool 3056        root  mem    REG       3,69    90152      
14553 /lib/ld-2.3.2.so
gconftool 3056        root  mem    REG       3,69   987120       
2292 /usr/lib/libxml2.so.2.6.10
gconftool 3056        root  mem    REG       3,69    67304      
11425 /usr/lib/libz.so.1.2.1.1
gconftool 3056        root  mem    REG       3,69   141312      
14584 /lib/tls/libm-2.3.2.so
gconftool 3056        root  mem    REG       3,69   162608      
13276 /usr/lib/libgconf-2.so.4.1.0
gconftool 3056        root  mem    REG       3,69   321712      
28739 /usr/lib/libORBit-2.so.0.0.0
gconftool 3056        root  mem    REG       3,69    26592       
3137 /lib/libpopt.so.0.0.0
gconftool 3056        root  mem    REG       3,69   230224       
1746 /usr/lib/libgobject-2.0.so.0.400.2
gconftool 3056        root  mem    REG       3,69    10928       
1747 /usr/lib/libgmodule-2.0.so.0.400.2
gconftool 3056        root  mem    REG       3,69     9432      
14583 /lib/tls/libdl-2.3.2.so
gconftool 3056        root  mem    REG       3,69    14712       
1748 /usr/lib/libgthread-2.0.so.0.400.2
gconftool 3056        root  mem    REG       3,69    78112      
14594 /lib/tls/libpthread-0.60.so
gconftool 3056        root  mem    REG       3,69   515944       
1745 /usr/lib/libglib-2.0.so.0.400.2
gconftool 3056        root  mem    REG       3,69  1279044      
14581 /lib/tls/libc-2.3.2.so
gconftool 3056        root  mem    REG       3,69    43092     
370269 /usr/lib/GConf/2/libgconfbackend-xml.so
gconftool 3056        root  mem    REG       3,69    30576      
14587 /lib/tls/libnss_compat-2.3.2.so
gconftool 3056        root  mem    REG       3,69    74264      
14586 /lib/tls/libnsl-2.3.2.so
gconftool 3056        root  mem    REG       3,69    34948      
14591 /lib/tls/libnss_nis-2.3.2.so
gconftool 3056        root  mem    REG       3,69    35288      
14589 /lib/tls/libnss_files-2.3.2.so
walther@workstation:~$

I've never used ltrace or strace before, but here it goes:
======== ltrace

first I ran:
(this was all in the same bash-session so the GCONF_CONFIG_SOURCE etc was stil 
set)

workstation:/var/lib/dpkg/info# ltrace gconftool-2 
--makefile-install-rule /etc/gconf/schemas/gnome-session.schemas 
&>/tmp/ltrace.output

After about one minute I tailed the file in another terminal and nothing was 
written to the file anymore
so I pressed CTRL+C in the terminal where ltrace was running and tailed the 
file again:

walther@workstation:~$ tail -f /tmp/ltrace.output
gconf_schema_set_long_desc(0x809a6c0, 0x8099ea8, 0x809a618, 0x804ea5d, 
0x8059c20) = 0x809a738
gconf_schema_get_locale(0x809a6c0, 0x8099ea8, 0x809a618, 0x804ea5d, 0x8059c20) 
= 0x809a6f8
g_hash_table_insert(0x80592c8, 0x809a6f8, 0x809a6c0, 0x804ea5d, 0x8059c20 
<unfinished ...>
g_str_hash(0x809a6f8, 0x8099ea8, 43, 0x4017efd4, 0x403e3840) = 0x6e7e934
g_str_equal(0x809a580, 0x809a6f8, 43, 0x4017efd4, 0x403e3840) = 0
<... g_hash_table_insert resumed> )              = 111
g_hash_table_size(0x80592c8, 0xbffff6c0, 1, 0xbffff6d4, 0x40118a0c) = 61
g_free(0x8062708, 0xbffff6c0, 1, 0xbffff6d4, 0x40118a0c) = 72
gconf_value_free(0x8062718, 0xbffff6c0, 1, 0xbffff6d4, 0x40118a0c) = 72
gconf_engine_associate_schema(0x8055de0, 0x80626d0, 0x8061a30, 0xbffff6f8, 
0x8059110 <unfinished ...>
--- SIGINT (Interrupt) ---
+++ killed by SIGINT +++


======== strace:
same procedure as ltrace

workstation:/var/lib/dpkg/info# strace gconftool-2 
--makefile-install-rule /etc/gconf/schemas/gnome-session.schemas 
&>/tmp/strace.output

walther@workstation:~$ tail -f /tmp/strace.output
getdents64(3, /* 4 entries */, 131072)  = 112
stat64("/etc/gconf/gconf.xml.defaults/apps/gnome-session/options/%gconf.xml", 
{st_mode=S_IFREG|0644, st_size=651, ...}) = 0
getdents64(3, /* 0 entries */, 131072)  = 0
munmap(0x40428000, 135168)              = 0
close(3)                                = 0
stat64
("/etc/gconf/gconf.xml.defaults/apps/gnome-session/options/%gconf-tree.xml", 
0xbffff43c) = -1 ENOENT (No such file or directory)
open("/etc/gconf/gconf.xml.defaults/apps/gnome-session/options/%gconf.xml", 
O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=651, ...}) = 0
read(3, "<?xml version=\"1.0\"?>\n<gconf>\n  "..., 651) = 651
close(3)                                = 0

so it looks like it tries to close the file and then everything stops

workstation:/var/lib/dpkg/info# ls 
-l /etc/gconf/gconf.xml.defaults/apps/gnome-session/options/%gconf.xml
-rw-r--r--    1 root     root          651 Jul  3 
16:07 /etc/gconf/gconf.xml.defaults/apps/gnome-session/options/%gconf.xml


======== 


I hope this gives you more info.
If you want me to do more, please let me know.

Regards,
Walther Zwart


On Sunday 04 July 2004 12:04, J.H.M. Dassen (Ray) wrote:
> severity 257456 important
> tags 257456 + moreinfo unreproducible
> thanks
>
> On Sat, Jul 03, 2004 at 17:52:23 +0200, Walther Zwart wrote:
> > I installed my system from scratch using install floppies so it should be
> > clean. When a package needs gconftool-2 in a postinst script, gconftool-2
> > hangs using all cpu time.
>
> I install such packages in a known-to-be-clean setup (pbuilder chroot)
> probably a dozen times per week without seeing this issue. Please provide
> more information as to the hangs you experience; things like strace,
> ltrace, and lsof output for the gconftool-2 process.
>
> Ray