[RPL-1959] conary update --root=... prints a lot of errors and *** glibc detected *** awk: free(): invalid pointer on kernel tag handlers Created: 19/Nov/07 Updated: 28/Jan/08 Resolved: 20/Dec/07 Status: Project: Component/s: Affects Version/s: Fix Version/s: Security Level: Closed rPath Linux kernel rPath Linux Development, rPath Linux 2 - alpha 4 Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Bug Pavel Volkovitskiy Fixed None 0h Attachments: Issue Links: Blocked: Benefit: Rank: rPath Linux 2, December 20, 2007 Public (Viewable by anyone) Priority: Assignee: Votes: Major - SEV 2 Stas Kysel (Inactive) 0 14.5h 4h conary-1.2-console.txt conary-1.2.log Duplicate Related relates to RPL-1870 update kernel tag handler for bootman... Not Blocked 5 - Enormous 12,811 Description sudo conary update --root=rpath/ group-core=conary.rpath.com@rpl:devel (smal) part of output (full ouput in attachments): ** The update will restart itself after job 7 and continue updating continue with update? [Y/n] y Performing critical system updates, will then restart update. Applying update job 1 of 7: Install info-lock:group=1-2-9 Applying update job 2 of 7: Install info-mail:user=1-2-9 Closed Install info-tty:group=1-2-9 Applying update job 3 of 7: Install audit:config=1.2.8-5-9 Install bash:config=3.2.10-6-5 Install coreutils:config=6.9-5-7 Install cracklib:data=2.8.10-4-3 Install dev:runtime=3.23-3-9 Install dhclient:lib=3.0.5-7-2 Install e2fsprogs:config=1.40.2-1-2 Install e2fsprogs:data=1.40.2-1-2 Install filesystem:runtime=2.2.1-11-7 Install info-utmp:group=1-2-9 Applying update job 4 of 7: Install gawk:data=3.1.5-7-9 Install glibc:config=2.5-33-5 Install iproute:config=2.6.19_061214-1-6 Install krb5:data=1.6.2-2-1 Install lvm2:config=2.02.23-1-7 Install mkinitrd:config=6.0.9-7-1 Install module-init-tools:config=3.2.2-12-5 Install ncurses:data=5.6-3-2 Install openssl:config=0.9.8g-2-1 Install pam:config=0.99.6.2-6-2 Applying update job 5 of 7: Install acl:lib=2.2.34-2-4 Install attr:lib=2.4.28-1-10 Install audit:lib=1.2.8-5-9 Install bash:runtime=3.2.10-6-5 Install coreutils:runtime=6.9-5-7 Install cpio:runtime=2.8-2-9 Install cracklib:lib=2.8.10-4-3 Install db:lib=4.5.20-12-6 Install device-mapper:lib=1.02.19-1-4 Install device-mapper:runtime=1.02.19-1-4 Install dhclient:runtime=3.0.5-7-2 Install e2fsprogs:lib=1.40.2-1-2 Install ext3flush:runtime=1-1-3 Install gawk:runtime=3.1.5-7-9 Install glib:data=2.14.1-1-1 Install glib:lib=2.14.1-1-1 Install glibc:lib=2.5-33-5[is: x86(i486,i586,i686)] Install glibc:lib=2.5-33-5[is: x86_64] Install glibc:runtime=2.5-33-5 Install grep:runtime=2.5.1a-8-7 Install gzip:runtime=1.3.12-4-5 Install initscripts:config=8.54.3-8-1 Install initscripts:lib=8.54.3-8-1 Install initscripts:runtime=8.54.3-8-1 Install iproute:lib=2.6.19_061214-1-6 Install iproute:runtime=2.6.19_061214-1-6 Install iputils:runtime=20020927-12-10 Install kernel:runtime=2.6.22.9-1-1[~!kernel.core] Install krb5:lib=1.6.2-2-1 Install libdhcp4client:lib=3.0.5-7-2 Install libdhcp6client:lib=0.10-8-11 Install libdhcp:lib=1.20-1-11 Install libgcc:lib=4.1.1-21-5[~!gcc.core] Install libnl:lib=1.0-1-8 Install libstdc++:lib=4.1.1-21-5[~!gcc.core] Install libtermcap:lib=2.0.8-12-7 Install lvm2:runtime=2.02.23-1-7 Install mingetty:runtime=1.07-9-10 Install mkinitrd:lib=6.0.9-7-1 Install mkinitrd:runtime=6.0.9-7-1 Install mktemp:runtime=1.5-26-7 Install module-init-tools:runtime=3.2.2-12-5 Install ncurses:lib=5.6-3-2 Install openssl:data=0.9.8g-2-1 Install openssl:lib=0.9.8g-2-1 Install pam:data=0.99.6.2-6-2 Install pam:lib=0.99.6.2-6-2 Install parted:lib=1.8.6-1-6 Install popt:lib=4.4.2-2-7 Install procps:lib=3.2.7-1-8 Install procps:runtime=3.2.7-1-8 Install psmisc:runtime=22.3-1-8 Install readline:lib=5.2-3-7 Install sed:runtime=4.1.5-5-9 Install sysvinit:runtime=2.86-8-1 Install tzdata:data=2007g-1-1 Install util-linux:config=2.13_pre7-13-1 Install util-linux:data=2.13_pre7-13-1 Install util-linux:runtime=2.13_pre7-13-1 Install zlib:lib=1.2.3-5-9 [kernel] FATAL: Could not open '/boot/System.map-boot/vmlinuz-2.6.22.91.smp.gcc4.1.x86_64': No such file or directory [kernel] No modules available for kernel "boot/vmlinuz-2.6.22.91.smp.gcc4.1.x86_64". [kernel] /sbin/ext3flush: /boot/initrd-boot/vmlinuz-2.6.22.91.smp.gcc4.1.x86_64.img: No such file or directory [kernel] FATAL: Could not open '/boot/System.map-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/crypto/aes-x86_64.ko': No such file or directory [kernel] No modules available for kernel "lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/crypto/aes-x86_64.ko". [kernel] /sbin/ext3flush: /boot/initrd-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/crypto/aes-x86_64.ko.img: No such file or directory [kernel] FATAL: Could not open '/boot/System.map-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/crypto/twofish-x86_64.ko': No such file or directory [kernel] No modules available for kernel "lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/crypto/twofish-x86_64.ko". [kernel] /sbin/ext3flush: /boot/initrd-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/crypto/twofish-x86_64.ko.img: No such file or directory [kernel] FATAL: Could not open '/boot/System.map-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko': No such file or directory [kernel] No modules available for kernel "lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko". [kernel] /sbin/ext3flush: /boot/initrd-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko.img: No such file or directory [kernel] FATAL: Could not open '/boot/System.map-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/kernel/microcode.ko': No such file or directory [kernel] No modules available for kernel "lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/arch/x86_64/kernel/microcode.ko". <skipped> [kernel] No modules available for kernel "lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/sound/usb/snd-usb-lib.ko". [kernel] /sbin/ext3flush: /boot/initrd-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/sound/usb/snd-usb-lib.ko.img: No such file or directory [kernel] FATAL: Could not open '/boot/System.map-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/sound/usb/usx2y/snd-usb-usx2y.ko': No such file or directory [kernel] No modules available for kernel "lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/sound/usb/usx2y/snd-usb-usx2y.ko". [kernel] /sbin/ext3flush: /boot/initrd-lib/modules/2.6.22.91.smp.gcc4.1.x86_64/kernel/sound/usb/usx2y/snd-usb-usx2y.ko.img: No such file or directory *** glibc detected *** awk: free(): invalid pointer: 0x0000000000653300 *** ======= Backtrace: ========= lib64/libc.so.6[0x2b99c6fd38a0] lib64/libc.so.6(cfree+0x8c)[0x2b99c6fd6fbc] awk[0x421dda] awk[0x421ecf] awk[0x4221d8] awk(do_input+0x17)[0x4259c7] awk(main+0xe9b)[0x427b9b] lib64/libc.so.6(__libc_start_main+0xf4)[0x2b99c6f828a4] awk[0x406169] ======= Memory map: ======== [kernel] error opening /boot/grub/grub.conf for read: No such file or directory [kernel] /sbin/ext3flush: /boot/grub/grub.conf: No such file or directory *** glibc detected *** awk: free(): invalid pointer: 0x0000000000653300 *** ======= Backtrace: ========= lib64/libc.so.6[0x2b6891d528a0] lib64/libc.so.6(cfree+0x8c)[0x2b6891d55fbc] awk[0x421dda] awk[0x421ecf] awk[0x4221d8] awk(do_input+0x17)[0x4259c7] awk(main+0xe9b)[0x427b9b] lib64/libc.so.6(__libc_start_main+0xf4)[0x2b6891d018a4] awk[0x406169] ======= Memory map: ======== [kernel] error opening /boot/grub/grub.conf for read: No such file or directory [kernel] /sbin/ext3flush: /boot/grub/grub.conf: No such file or directory *** glibc detected *** awk: free(): invalid pointer: 0x0000000000653300 *** ======= Backtrace: ========= lib64/libc.so.6[0x2b18cf91a8a0] lib64/libc.so.6(cfree+0x8c)[0x2b18cf91dfbc] awk[0x421dda] awk[0x421ecf] awk[0x4221d8] awk(do_input+0x17)[0x4259c7] awk(main+0xe9b)[0x427b9b] lib64/libc.so.6(__libc_start_main+0xf4)[0x2b18cf8c98a4] awk[0x406169] ======= Memory map: ======== [kernel] error opening /boot/grub/grub.conf for read: No such file or directory [kernel] /sbin/ext3flush: /boot/grub/grub.conf: No such file or directory *** glibc detected *** awk: free(): invalid pointer: 0x0000000000653300 *** ======= Backtrace: ========= lib64/libc.so.6[0x2b26fa26d8a0] lib64/libc.so.6(cfree+0x8c)[0x2b26fa270fbc] awk[0x421dda] awk[0x421ecf] awk[0x4221d8] awk(do_input+0x17)[0x4259c7] awk(main+0xe9b)[0x427b9b] lib64/libc.so.6(__libc_start_main+0xf4)[0x2b26fa21c8a4] awk[0x406169] ======= Memory map: ======== [kernel] error opening /boot/grub/grub.conf for read: No such file or directory [kernel] /sbin/ext3flush: /boot/grub/grub.conf: No such file or directory Comments Comment by Elliot Peele [ 19/Nov/07 ] We have seen this behavior installing with Anaconda as well (RPL-1883). Comment by Stas Kysel (Inactive) [ 13/Dec/07 ] I can not reproduce kernel tag messages, only awk dumps. Tag messages are interesting, because there's really no /boot/System.map-boot/vmlinuz2.6.22.9-1.smp.gcc4.1.x86_64. Any specific setup is necessary to get tag messages? Comment by Michael K. Johnson [ 13/Dec/07 ] For this issue, just fix the awk dumps. I think that will fix the other messages; if not, we'll want to open separate issues for those cases. Comment by Stas Kysel (Inactive) [ 14/Dec/07 ] 2 errors here: 1. awk crashes if there is nonexistent file in it's args. Reproducer: awk '{}' /nonexistent BTW, this doesn't affect :1 - gawk prints error message to stderr in this case. Fixing this... 2. Kernel tag relies on null output of awk in case when /etc/fstab is not present: rootdev=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; exit} }' /etc/fstab) label=${rootdev/*=/} I guess, something like this won't harm: [ -f /etc/fstab ] && rootdev=..... Comments? Comment by Michael K. Johnson [ 14/Dec/07 ] That probably makes sense – should probably make sure it's empty before that. Comment by Stas Kysel (Inactive) [ 17/Dec/07 ] awk bug is known: http://lists.gnu.org/archive/html/bug-gnu-utils/2006-01/msg00058.html It is fixed in current version gawk-3.1.6. Our package is using 1 patch from srpm, and patch for this issue is present in srpm also, but is not used by us: gawk-3.1.5-free.patch gawk issue fixed by upgrading gawk to latest version. gawk:source=/conary.rpath.com@rpl:devel/3.1.6-1 "make check" in test directory says "ALL TESTS PASSED" Binary packages and deps are ok. As a side effect of upgrading, we don't need to move locales in recipe anymore. Comment by Stas Kysel (Inactive) [ 18/Dec/07 ] /sbin/mkinitrd is using /etc/fstab as well, and it is assuming that it's present. In mkinitrd, fstab location defaults to /etc/fstab but can be set using command line switch (just like many of it's derivatives detailed below). If fstab doesn't exist, then mkinitrd can't determine correct arguments for "mkrootdev" to put it into initrd, and initrd will be invalid. Therefore, mkinitrd should fail in case of absense of fstab file (this should be checked after setting fstab file name from command line, in presence of corresponding switch). Fail with some useful diagnostic message. Probably we can try to issue warning and try to guess correct values for root and swap, using root filesystem mounted during mkinitrd execution, but that looks -- like too much heuristics, too complex to realize for user, in case we won't guess correctly. /sbin/mkinitrd needs fstab to: 1. Find out root filesystem type ($rootfs). $rootfs is used for: installing appropriate module into initrd handlenfs() or handlelvordev() "mkrootdev" instruction for nash 2. Find out root filesystem options ($rootopts). If not found, value of "defaults" is used. $rootopts is used for: loopback root device recognition "mkrootdev" instruction for nash 3. Find out root filesystem device ($rootdev). Used for: handlenfs() or handlelvordev() finding out $devname "mkrootdev" instruction for nash 4. Find out first swap device ($swsuspdev). Used for: handlelvordev() "resume" instruction for nash Comment by Stas Kysel (Inactive) [ 18/Dec/07 ] In :1 1. "conary --root=rpath/ update group-core=conary.rpath.com@rpl:1" doesn't install kernel. This obviously happens because kernel is included in group-core but byDefault=False while in :devel kernel is part of group-bootable, included in group-core. 2. installing kernel explicitly spits out 1 awk warning (it comes from tag handler probably) 3. /sbin/mkinitrd has code very similar to the one I have in my repository, and almost in the same place: 4. if [ ! -r "$fstab" ]; then 5. echo "error: $fstab is not readable" 6. exit 1 7. fi It's added in mkinitrd-robust.patch. The patch has one more change, already in :devel. Therefore: 1. We may need to do something about groups. 2. I should commit my changes to mkinitrd. Comment by Stas Kysel (Inactive) [ 20/Dec/07 ] Done. mkinitrd:source=/conary.rpath.com@rpl:devel/6.0.9-11 Comment by Administrator - Auto (Inactive) [ 28/Jan/08 ] Closing this issue since it has been in resolved status for thirty days. Please re-open if additional action is required. Generated at Mon Mar 07 04:06:59 EST 2016 using JIRA 6.3.8#6338sha1:68f19fa1b0735858c317bd22f79afd47ceeab007.