Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
this can't be good (memory corruption)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Mon May 09, 2011 12:41 am    Post subject: this can't be good (memory corruption) Reply with quote

Never seen anything like this before:

Code:

$ gm display /path/to/some/file

[after several seconds]

*** glibc detected *** gm: malloc(): memory corruption (fast): 0x0000000000d27790 ***
======= Backtrace: =========
/lib/libc.so.6(+0x77df6)[0x7f960f911df6]
/lib/libc.so.6(+0x7c123)[0x7f960f916123]
/lib/libc.so.6(__libc_malloc+0x6e)[0x7f960f916d9e]
/usr/lib/libxcb.so.1(+0xcc5a)[0x7f960db4bc5a]
/usr/lib/libxcb.so.1(+0xabed)[0x7f960db49bed]
/usr/lib/libxcb.so.1(xcb_wait_for_reply+0x12c)[0x7f960db4b78c]
/usr/lib/libX11.so.6(_XReply+0x10d)[0x7f960dda495d]
/usr/lib/libX11.so.6(XSync+0x62)[0x7f960dda03d2]
/usr/lib/libX11.so.6(XCloseDisplay+0x7f)[0x7f960dd7ef4f]
/usr/lib/libGraphicsMagick.so.3(DisplayImageCommand+0x81f)[0x7f960fca6dff]
/usr/lib/libGraphicsMagick.so.3(MagickCommand+0x14c)[0x7f960fca503c]
/usr/lib/libGraphicsMagick.so.3(GMCommand+0xba)[0x7f960fca514a]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f960f8b8bbd]
gm[0x4005e9]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:06 492237                             /usr/bin/gm
00600000-00601000 r--p 00000000 08:06 492237                             /usr/bin/gm
00601000-00602000 rw-p 00001000 08:06 492237                             /usr/bin/gm
00cea000-00f69000 rw-p 00000000 00:00 0                                  [heap]
7f9604000000-7f9604021000 rw-p 00000000 00:00 0
7f9604021000-7f9608000000 ---p 00000000 00:00 0
7f960b7ca000-7f960b7e0000 r-xp 00000000 08:06 286022                     /lib64/libgcc_s.so.1
7f960b7e0000-7f960b9df000 ---p 00016000 08:06 286022                     /lib64/libgcc_s.so.1
7f960b9df000-7f960b9e0000 r--p 00015000 08:06 286022                     /lib64/libgcc_s.so.1
7f960b9e0000-7f960b9e1000 rw-p 00016000 08:06 286022                     /lib64/libgcc_s.so.1
7f960b9e1000-7f960b9e6000 r-xp 00000000 08:06 17351                      /usr/lib64/libXfixes.so.3.1.0
7f960b9e6000-7f960bbe6000 ---p 00005000 08:06 17351                      /usr/lib64/libXfixes.so.3.1.0
7f960bbe6000-7f960bbe7000 r--p 00005000 08:06 17351                      /usr/lib64/libXfixes.so.3.1.0
7f960bbe7000-7f960bbe8000 rw-p 00006000 08:06 17351                      /usr/lib64/libXfixes.so.3.1.0
7f960bbe8000-7f960bbf1000 r-xp 00000000 08:06 19700                      /usr/lib64/libXrender.so.1.3.0
7f960bbf1000-7f960bdf1000 ---p 00009000 08:06 19700                      /usr/lib64/libXrender.so.1.3.0
7f960bdf1000-7f960bdf2000 r--p 00009000 08:06 19700                      /usr/lib64/libXrender.so.1.3.0
7f960bdf2000-7f960bdf3000 rw-p 0000a000 08:06 19700                      /usr/lib64/libXrender.so.1.3.0
7f960bdf3000-7f960bdfd000 r-xp 00000000 08:06 95499                      /usr/lib64/libXcursor.so.1.0.2
7f960bdfd000-7f960bffc000 ---p 0000a000 08:06 95499                      /usr/lib64/libXcursor.so.1.0.2
7f960bffc000-7f960bffd000 r--p 00009000 08:06 95499                      /usr/lib64/libXcursor.so.1.0.2
7f960bffd000-7f960bffe000 rw-p 0000a000 08:06 95499                      /usr/lib64/libXcursor.so.1.0.2
7f960c209000-7f960c515000 r--p 00000000 08:06 52948                      /usr/lib64/locale/locale-archive
7f960c515000-7f960c517000 r-xp 00000000 08:06 283828                     /lib64/libdl-2.11.3.so
7f960c517000-7f960c717000 ---p 00002000 08:06 283828                     /lib64/libdl-2.11.3.so
7f960c717000-7f960c718000 r--p 00002000 08:06 283828                     /lib64/libdl-2.11.3.so
7f960c718000-7f960c719000 rw-p 00003000 08:06 283828                     /lib64/libdl-2.11.3.so
7f960c719000-7f960c722000 r-xp 00000000 08:06 17517                      /usr/lib64/libltdl.so.7.2.2
7f960c722000-7f960c921000 ---p 00009000 08:06 17517                      /usr/lib64/libltdl.so.7.2.2
7f960c921000-7f960c922000 r--p 00008000 08:06 17517                      /usr/lib64/libltdl.so.7.2.2
7f960c922000-7f960c923000 rw-p 00009000 08:06 17517                      /usr/lib64/libltdl.so.7.2.2
7f960c923000-7f960c92b000 r-xp 00000000 08:06 283820                     /lib64/librt-2.11.3.so
7f960c92b000-7f960cb2a000 ---p 00008000 08:06 283820                     /lib64/librt-2.11.3.so
7f960cb2a000-7f960cb2b000 r--p 00007000 08:06 283820                     /lib64/librt-2.11.3.so
7f960cb2b000-7f960cb2c000 rw-p 00008000 08:06 283820                     /lib64/librt-2.11.3.so
7f960cb2c000-7f960cb39000 r-xp 00000000 08:06 131560                     /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libgomp.so.1.0.0
7f960cb39000-7f960cd38000 ---p 0000d000 08:06 131560                     /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libgomp.so.1.0.0
7f960cd38000-7f960cd39000 r--p 0000c000 08:06 131560                     /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libgomp.so.1.0.0
7f960cd39000-7f960cd3a000 rw-p 0000d000 08:06 131560                     /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libgomp.so.1.0.0
7f960cd3a000-7f960cdbc000 r-xp 00000000 08:06 283843                     /lib64/libm-2.11.3.so
7f960cdbc000-7f960cfbb000 ---p 00082000 08:06 283843                     /lib64/libm-2.11.3.so
7f960cfbb000-7f960cfbc000 r--p 00081000 08:06 283843                     /lib64/libm-2.11.3.so
7f960cfbc000-7f960cfbd000 rw-p 00082000 08:06 283843                     /lib64/libm-2.11.3.so
7f960cfbd000-7f960cfd3000 r-xp 00000000 08:06 283430                     /lib64/libz.so.1.2.5
7f960cfd3000-7f960d1d3000 ---p 00016000 08:06 283430                     /lib64/libz.so.1.2.5
7f960d1d3000-7f960d1d4000 r--p 00016000 08:06 283430                     /lib64/libz.so.1.2.5
7f960d1d4000-7f960d1d5000 rw-p 00017000 08:06 283430                     /lib64/libz.so.1.2.5
7f960d1d5000-7f960d31a000 r-xp 00000000 08:06 20017                      /usr/lib64/libxml2.so.2.7.8
7f960d31a000-7f960d519000 ---p 00145000 08:06 20017                      /usr/lib64/libxml2.so.2.7.8
7f960d519000-7f960d521000 r--p 00144000 08:06 20017                      /usr/lib64/libxml2.so.2.7.8
7f960d521000-7f960d523000 rw-p 0014c000 08:06 20017                      /usr/lib64/libxml2.so.2.7.8
7f960d523000-7f960d524000 rw-p 00000000 00:00 0
7f960d524000-7f960d533000 r-xp 00000000 08:06 290267                     /lib64/libbz2.so.1.0.6
7f960d533000-7f960d733000 ---p 0000f000 08:06 290267                     /lib64/libbz2.so.1.0.6
7f960d733000-7f960d734000 r--p 0000f000 08:06 290267                     /lib64/libbz2.so.1.0.6
7f960d734000-7f960d735000 rw-p 00010000 08:06 290267                     /lib64/libbz2.so.1.0.6


Any thoughts about what I should do or check? I have tested the memory thoroughly (for no specific reason other than I like to test things :) ), although that was about a year ago.
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Tue May 10, 2011 11:24 am    Post subject: Reply with quote

It's not likely to be a real hardware memory issue unless you're seeing other random failures, segfaults, freezes etc. Especially if your problem is repeatable. The most likely cause is a package (library) update where reverse dependencies needed a rebuild, but for some reason that rebuild didn't happen.

First line of attack is check your recent emerge logs and make sure you've followed all the instructions there. Second line is a revdep-rebuild. Third line is to rebuild gm, ie. emerge -1 graphicsmagick. If none of that works, you can try rebuilding all of gm's dependencies.

Here's how I'd do that last one (I don't claim this is the best way, but it should work). I'm using /usr/bin/convert (part of imagemagick) as an example, as I don't have graphicsmagick installed)...

First get a list of all the packages linked by /usr/bin/convert:
Code:
$ qfile -qC -e $(ldd /usr/bin/convert | cut -f 3 -d ' ') | sort -u | tee /tmp/xx
app-arch/bzip2-1.0.6
media-gfx/imagemagick-6.6.5.6
media-libs/freetype-2.4.4
media-libs/jpeg-8b
media-libs/lcms-2.0a
media-libs/tiff-3.9.4-r1
sys-apps/util-linux-2.19.1
sys-devel/gcc-4.4.5
sys-devel/libtool-2.2.10
sys-libs/glibc-2.11.3
sys-libs/zlib-1.2.5-r2
x11-libs/libICE-1.0.7
x11-libs/libSM-1.2.0
x11-libs/libX11-1.4.3
x11-libs/libXau-1.0.6
x11-libs/libxcb-1.7
x11-libs/libXdmcp-1.1.0
x11-libs/libXext-1.2.0
x11-libs/libXt-1.1.1

Now edit the list and cull stuff that really shouldn't need rebuilding (glibc, libtool, gcc, probably perl, python, ruby too if they appear). Also stick an = at the front of each line so the list works as arguments to emerge:
Code:
$ vi /tmp/xx
$ cat /tmp/xx
=app-arch/bzip2-1.0.6
=media-gfx/imagemagick-6.6.5.6
=media-libs/freetype-2.4.4
=media-libs/jpeg-8b
=media-libs/lcms-2.0a
=media-libs/tiff-3.9.4-r1
=sys-apps/util-linux-2.19.1
=sys-libs/zlib-1.2.5-r2
=x11-libs/libICE-1.0.7
=x11-libs/libSM-1.2.0
=x11-libs/libX11-1.4.3
=x11-libs/libXau-1.0.6
=x11-libs/libxcb-1.7
=x11-libs/libXdmcp-1.1.0
=x11-libs/libXext-1.2.0
=x11-libs/libXt-1.1.1

Then rebuild. Emerge will make sure the build order is correct. Make sure you use -1 arg to emerge so those libs don't get into your world file:
Code:
$ emerge -1p $(cat /tmp/xx)

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-libs/zlib-1.2.5-r2
[ebuild   R   ] app-arch/bzip2-1.0.6
[ebuild   R   ] media-libs/jpeg-8b
[ebuild   R   ] x11-libs/libICE-1.0.7
[ebuild   R   ] x11-libs/libXau-1.0.6
[ebuild   R   ] x11-libs/libXdmcp-1.1.0
[ebuild   R   ] sys-apps/util-linux-2.19.1
[ebuild   R   ] media-libs/tiff-3.9.4-r1
[ebuild   R   ] x11-libs/libxcb-1.7
[ebuild   R   ] x11-libs/libX11-1.4.3
[ebuild   R   ] x11-libs/libSM-1.2.0
[ebuild   R   ] media-libs/lcms-2.0a
[ebuild   R   ] media-libs/freetype-2.4.4
[ebuild   R   ] x11-libs/libXext-1.2.0
[ebuild   R   ] x11-libs/libXt-1.1.1
[ebuild   R   ] media-gfx/imagemagick-6.6.5.6

If you've still got the problem, you've probably hit a bug. You could try downgrading graphicsmagick, or upgrading to a testing version.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum