LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   grep -Ri <searchterm> * returns glibc detected *** free(): invalid next size (fast) (https://www.linuxquestions.org/questions/linux-newbie-8/grep-ri-searchterm-%2A-returns-glibc-detected-%2A%2A%2A-free-invalid-next-size-fast-725727/)

abylin1 05-13-2009 11:29 AM

grep -Ri <searchterm> * returns glibc detected *** free(): invalid next size (fast)
 
Hello,

I've been hunting around on the internet for the last two days trying to find someone who's encountered the problem I've run into, but haven't found anything that's helped me.

I'm running RHEL4 update 4 with Oracle 10.2.0.4. I have always been able to do a grep -Ri <searchterm> * without any problems. Last week I upgraded Oracle from 10.2.0.1 to 10.2.0.4 and applied the latest Critical Patch. I did a rpm -Uvh on these rpm's before upgrading my database:
glibc-devel-2.3.4-2.25.i386.rpm
libstdc++-devel-3.4.3-22.1.i386.rpm
sysstat-5.0.5-1.i386.rpm
bzip2-1.0.2-14.el4_7.i386.rpm
bzip2-libs-1.0.2-14.el4_7.i386.rpm

I also upgraded OpenSSL to openssl-0.9.8h.

When I do a rpm -qa | grep I see this:
glibc-2.3.4-2.25
glibc-profile-2.3.6-3
glibc-common-2.3.4-2.25
glibc-headers-2.3.4-2.25
glibc-devel-2.3.4-2.25
glibc-kernheaders-2.4-9.1.98EL

After I installed the new rpms, did the upgrade, and applied the patch, whenever I do a grep -Ri <searchterm> *, I get this error:
*** glibc detected *** free(): invalid next size (fast): 0x09034c90 *** Aborted

What is puzzling is that this always used to work, but now it doesn't. I believe it is the "case insensitive" part of the grep that is causing the problem, because without the -i, the grep works just fine.

Laura

Tinkster 05-13-2009 03:52 PM

Can't tell you what exactly you screwed up with that partial update (updateing
libc in isolation [w/o doing most of the system built against it at the same time]
is almost always a very bad idea), but have a look at the output of
Code:

rpm -qR $(rpm -qf $(which grep))
and compare the versions required against the ones installed.



Cheers,
Tink

abylin1 05-14-2009 02:30 PM

Hello,

I did a rpm -qR $(rpm -qf $(which grep)), and this is what was returned (I don't understand how to interpret that command and what the output means):

/bin/sh
/bin/sh
/sbin/install-info
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2)
libc.so.6(GLIBC_2.2.3)
libc.so.6(GLIBC_2.3)
libc.so.6(GLIBC_2.3.4)
libpcre.so.0
pcre
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

I didn't realize I did a "partial update (updating libc in isolation)". Before I upgraded/patched my database, I checked the Oracle docs to make sure I had all the required rpms, and I was missing libstdc++-devel-3.4.3-22.1 and sysstat-5.0.5-1, so I downloaded them and did the rpm -Uvh commands on them to install. I didn't have any issues when I did that, so I had no idea I was only doing a partial install. According to the Oracle preinstallation tasks, these are the necessary rpms (http://download.oracle.com/docs/cd/B...htm#CIHFICFD):

Red Hat Enterprise Linux 4.0 and Asianux 2.0:

binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1

Could you please help me interpret what the rpm -qR $(rpm -qf $(which grep)) is telling me and what I can do now?

Thank you!

Tinkster 05-14-2009 04:08 PM

Quote:

Originally Posted by abylin1 (Post 3540969)

Could you please help me interpret what the rpm -qR $(rpm -qf $(which grep)) is telling me and what I can do now?

Sure ... start reading from the innermost parenthesis
(the $( ) construct will run a sub-shell and hand its
output back to the calling shell):


Code:

which grep
/usr/bin/grep

The result, /usr/bin/grep, gets passed into
rpm -qf (man rpm: find which package a file belongs to, and
return its name):
Code:

rpm -qf /usr/bin/grep
grep-2.5.1-32.3

The result, grep-2.5.1-32.3, then gets passed into the
next rpm query; rpm -qR (man rpm: list packages this package
depends on):
Code:

rpm -qR grep-2.5.1-32.3

If the versions of libs your grep depends on matches the
list of installed packages, it's sweet. If there's no
obvious discrepancies, proceed with libs that are listed
w/o explicit version numbers in your last command, and
see whether anything THESE depend on is missing/in a
wrong version number.

A good candidate will be the regex library.



Cheers,
Tink


All times are GMT -5. The time now is 12:29 AM.