Description of problem:
Trying to build the stock kernel 2.6.32-220 src rpm on CentOS 6.2 x86_64.
The build process hangs for more than 12 hours.
This is stuck at debugedit.
Version-Release number of selected component (if applicable):
# uname -a
Linux aidkakinada 2.6.32-220.el6.x86_64 0000001 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 6.2 (Final)
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 22G 14G 6.2G 70% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 504M 43M 437M 9% /boot
/dev/sdb 9.9G 151M 9.2G 2% /root/rpmbuild
# rpm -qi rpm
Name : rpm Relocations: (not relocatable)
Version : 4.8.0 Vendor: CentOS
Release : 19.el6 Build Date: Thu 08 Dec 2011 03:04:07 AM IST
Install Date: Wed 20 Nov 2013 12:43:41 PM IST Build Host: c6b6.bsys.dev.centos.org
Group : System Environment/Base Source RPM: rpm-4.8.0-19.el6.src.rpm
Size : 2031079 License: GPLv2+
Signature : RSA/SHA1, Fri 09 Dec 2011 02:36:45 AM IST, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem <http://bugs.centos.org> [^]
URL : http://www.rpm.org/ [^]
Summary : The RPM package management system
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages. Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.
Steps to Reproduce:
# rpm -ivh /tmp/kernel-2.6.32-220.el6.src.rpm
# cd /root/rpmbuild
# rpmbuild -ba SPECS/kernel.spec
+ /usr/lib/rpm/debugedit -b /root/rpmbuild/BUILD -d /usr/src/debug -i arch/x86/vdso/vdso.so.dbg
+ /usr/lib/rpm/debugedit -b /root/rpmbuild/BUILD -d /usr/src/debug -i arch/x86/vdso/vdso32-int80.so.dbg
+ /usr/lib/rpm/debugedit -b /root/rpmbuild/BUILD -d /usr/src/debug -i arch/x86/vdso/vdso32-syscall.so.dbg
+ /usr/lib/rpm/debugedit -b /root/rpmbuild/BUILD -d /usr/src/debug -i arch/x86/vdso/vdso32-sysenter.so.dbg
It was stuck for more than 12 hours.
Updated to rpm-4.8.1-37, The problem persists.
hang, 100% cpu consumption.
Also raised bug on Centos bug tracker.
0007268: kernel build hangs in debugedit due to infinite loop
Stack trace with rpm-4.8.0-37 package and its corresponding debuginfo.
# gdb /usr/lib/rpm/debugedit
(gdb) attach 30842
#0 0x0000000000401c94 in canonicalize_path (s=0x7f6326fa6a5f "arch/x86/vdso", d=0x7f6326fa6a5f "arch/x86/vdso") at tools/debugedit.c:429
0000001 0x0000000000402552 in edit_dwarf2_line (dso=0x0, off=<value optimized out>, comp_dir=0xd <Address 0xd out of bounds>, phase=<value optimized out>) at tools/debugedit.c:659
0000002 0x0000000000402fbb in edit_attributes (dso=0xe66a70) at tools/debugedit.c:948
#3 edit_dwarf2 (dso=0xe66a70) at tools/debugedit.c:1260
#4 0x0000000000404748 in main (argc=<value optimized out>, argv=<value optimized out>) at tools/debugedit.c:1593
428 while (*s && ! IS_DIR_SEPARATOR (*s))
429 *d++ = *s++;
432 if (IS_DIR_SEPARATOR (*s))
(gdb) p s
$5 = 0x7f6326fa6a5f "arch/x86/vdso"
(gdb) p d
$6 = 0x7f6326fa6a5f "arch/x86/vdso"
(gdb) p *s
$3 = 97 'a'
(gdb) p *d
$4 = 97 'a'
I tried to reproduce it but I wasn't able to reproduce it on RHEL6.2 nor CentOS6.2. Building of kernel always finished successfully.
Did you try to do some steps in debuger in order to find that loop in which rpm spends so much time?
I'm able to see hang almost every time.
I'm not sure what is causing the issue to reproduce.
May be one of these are causing
a. If you noticed, /root/rpmbuild is a different file-system (ext3).
b. The system is a 4CPU Virtual Machine with 4GB of memory.
I've a 32GB Ram, 8CPU system on which the issue is less likely to happen.
I just attached to the hung debugedit and saw stack trace, and
the loop variables. Haven't tried any other commands in debugger.
I also tried configuration described in comment 4 and I am still not able to reproduce this.
Can you try this on rhel-6.7 if this is still problem?
This is reported against rhel-6.2 and I didn't get answer if this is still problem with the newest version i.e. rhel-6.7. and I am not able to reproduce this with any version of rhel so I am closing this bug. You can reopen this bug if you are able to reproduce this on on rhel-6.7.
I tried on RHEL 6.7 and didnt notice this issue. Let us close this and we can reopen if problem recurs. Thanks.