View previous topic :: View next topic |
Author |
Message |
thomasvk Guru
Joined: 19 Mar 2005 Posts: 597
|
Posted: Sun Apr 05, 2009 8:43 pm Post subject: *** glibc detected *** locate: double free or corruption |
|
|
Dear people,
Recently I have been having some problems with 'locate'. On some search queries it seems to thrown an error, or notice 'glibc detected'. I am unable to find the cause, and am unable to find a solution as well. The error message shows up on a lot of different causes on Google and this forum, and none seem closely related. I have rebuilt my entire system (not because of this problem, but the problem showed up before and after the rebuild), reinstalled 'located', tried different versions, etc. I have tested my RAM entirely, but it is all good (several hours of memtest). I have not made any hardware changes before the problem started to occur, and cannot remember what software changes I made, if any.
Some search queries do spit out this message, while others do not. It is very reproducable though: if a search query causes this, it does always. It does not seem to be related to the results: one search query gave me a certain result set and caused this problem, while another search query (in fact, just changed some characters in the query) yielded the same search results but did not cause the problem. If there are results, locate first displays the results and then spits out the error. I am not sure if it shows all the results, as I have not yet been able to create a problematic search query with a result set of which I know is complete.
The entire message is like:
Code: | $ locate -i *bl*st*cult*
*** glibc detected *** locate: double free or corruption (fasttop): 0x080538e8 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7e38370]
/lib/libc.so.6(cfree+0x89)[0xb7e39d89]
locate[0x804b0f8]
======= Memory map: ========
08048000-08050000 r-xp 00000000 08:01 99821 /usr/bin/slocate
08050000-08051000 r--p 00007000 08:01 99821 /usr/bin/slocate
08051000-08052000 rw-p 00008000 08:01 99821 /usr/bin/slocate
08052000-08073000 rw-p 08052000 00:00 0 [heap]
b7c00000-b7c21000 rw-p b7c00000 00:00 0
b7c21000-b7d00000 ---p b7c21000 00:00 0
b7d8d000-b7d97000 r-xp 00000000 08:01 180937 /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1
b7d97000-b7d98000 r--p 00009000 08:01 180937 /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1
b7d98000-b7d99000 rw-p 0000a000 08:01 180937 /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/libgcc_s.so.1
b7d99000-b7da2000 r-xp 00000000 08:01 174730 /lib/libnss_files-2.8.so
b7da2000-b7da3000 r--p 00008000 08:01 174730 /lib/libnss_files-2.8.so
b7da3000-b7da4000 rw-p 00009000 08:01 174730 /lib/libnss_files-2.8.so
b7da4000-b7dac000 r-xp 00000000 08:01 174712 /lib/libnss_nis-2.8.so
b7dac000-b7dad000 r--p 00007000 08:01 174712 /lib/libnss_nis-2.8.so
b7dad000-b7dae000 rw-p 00008000 08:01 174712 /lib/libnss_nis-2.8.so
b7dae000-b7dc1000 r-xp 00000000 08:01 174584 /lib/libnsl-2.8.so
b7dc1000-b7dc2000 r--p 00012000 08:01 174584 /lib/libnsl-2.8.so
b7dc2000-b7dc3000 rw-p 00013000 08:01 174584 /lib/libnsl-2.8.so
b7dc3000-b7dc5000 rw-p b7dc3000 00:00 0
b7dc5000-b7dcb000 r-xp 00000000 08:01 174697 /lib/libnss_compat-2.8.so
b7dcb000-b7dcc000 r--p 00005000 08:01 174697 /lib/libnss_compat-2.8.so
b7dcc000-b7dcd000 rw-p 00006000 08:01 174697 /lib/libnss_compat-2.8.so
b7dcd000-b7dce000 rw-p b7dcd000 00:00 0
b7dce000-b7f02000 r-xp 00000000 08:01 174536 /lib/libc-2.8.so
b7f02000-b7f04000 r--p 00133000 08:01 174536 /lib/libc-2.8.so
b7f04000-b7f05000 rw-p 00135000 08:01 174536 /lib/libc-2.8.so
b7f05000-b7f09000 rw-p b7f05000 00:00 0
b7f0f000-b7f2a000 r-xp 00000000 08:01 174768 /lib/ld-2.8.so
b7f2a000-b7f2b000 r--p 0001a000 08:01 174768 /lib/ld-2.8.so
b7f2b000-b7f2c000 rw-p 0001b000 08:01 174768 /lib/ld-2.8.so
bfeee000-bff03000 rw-p bffeb000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] |
Is anyone able to help me? It was not so bad at first but now it is starting to get annoying. |
|
Back to top |
|
|
poly_poly-man Advocate
Joined: 06 Dec 2006 Posts: 2477 Location: RIT, NY, US
|
Posted: Sun Apr 05, 2009 11:41 pm Post subject: |
|
|
does it work if you wrap queries with *'s and ?'s and other special characters in quotes? _________________ iVBORw0KGgoAAAANSUhEUgAAA
avatar: new version of logo - see topic 838248. Potentially still a WiP. |
|
Back to top |
|
|
fiolj n00b
Joined: 17 Mar 2008 Posts: 45 Location: Bariloche, Argentina
|
Posted: Mon Apr 06, 2009 12:05 am Post subject: Same problem here |
|
|
I didn't notice it. But tried the same locate command with and without quotes:
Code: | locate -i *bl*st*cult* |
Code: | locate -i '*bl*st*cult*' |
running recent version of glibc: sys-libs/glibc-2.8_p20080602-r1, compiled with new gcc-4.3.2
In other machine with the same version of glibc but older gcc-4.1.2 it is working. Of course I cannot say that gcc is the responsible (it is not the only difference between the machines)
Regards, Juan |
|
Back to top |
|
|
thomasvk Guru
Joined: 19 Mar 2005 Posts: 597
|
Posted: Tue Apr 07, 2009 6:36 pm Post subject: |
|
|
Wrapping with quotes (as well as escaping with \) doesn't make a difference. Nor does installing a different glibc version (including downgrading to the one previously installed). |
|
Back to top |
|
|
fiolj n00b
Joined: 17 Mar 2008 Posts: 45 Location: Bariloche, Argentina
|
Posted: Wed Apr 08, 2009 7:06 pm Post subject: |
|
|
Hi, simpler examples still have problems. For instance,
Code: | locate -i istor*a/cult |
gives the same double free or corruption (fasttop) error
while neither
Code: | locate -i stor*a/cult |
or
Code: | locate istor*a/cult |
have any problem. I used strace but can not understand it. Somebody can point where to report the bug. Should it be locate or glibc (or gcc)?
Note: In my experience, it does not matter if locate find or not results. Quotes do not change the result.
regards,
Juan |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21724
|
Posted: Mon Apr 13, 2009 1:08 am Post subject: |
|
|
It is very likely that the problem is in locate. Using strace is a nice idea, but not very likely to produce useful data. If you can, try running locate under the Memcheck tool from dev-util/valgrind. You will get much more useful output if debug information is available. See How to get meaningful backtraces in Gentoo for details on how to do that. You will need debug information in locate, and it may help to have it for glibc as well. |
|
Back to top |
|
|
|