I have python 3.6 installed from source code. And because up arrow key is not working, I installed readline module by 'pip install readline'
But after this, my python console crash.
*** glibc detected *** python: free(): invalid pointer: 0xb7506578 ***
======= Backtrace: =========
/lib/libc.so.6(+0x70e31)[0xce8e31]
python(PyMem_RawFree+0x1b)[0x805faab]
python(PyOS_Readline+0xe0)[0x81c87a0]
python[0x8083924]
python[0x8084007]
python(PyTokenizer_Get+0x17)[0x8084d17]
python[0x80817fc]
python(PyParser_ASTFromFileObject+0x91)[0x8067231]
python(PyRun_InteractiveOneObject+0x111)[0x8068231]
python(PyRun_InteractiveLoopFlags+0x60)[0x80685c0]
python(PyRun_AnyFileExFlags+0x4b)[0x806870b]
python(Py_Main+0xfae)[0x80782ce]
python(main+0x186)[0x805f716]
/lib/libc.so.6(__libc_start_main+0xe6)[0xc8ed26]
python[0x805f4f1]
======= Memory map: ========
0033e000-00366000 r-xp 00000000 fd:00 12964 /lib/libm-2.12.so
00366000-00367000 r--p 00027000 fd:00 12964 /lib/libm-2.12.so
00367000-00368000 rw-p 00028000 fd:00 12964 /lib/libm-2.12.so
00463000-00464000 r-xp 00000000 00:00 0 [vdso]
0048e000-004b0000 r-xp 00000000 fd:00 4544 /lib/libncurses.so.5.7
004b0000-004b1000 rw-p 00021000 fd:00 4544 /lib/libncurses.so.5.7
004e4000-004fb000 r-xp 00000000 fd:00 4246 /lib/libpthread-2.12.so
004fb000-004fc000 r--p 00016000 fd:00 4246 /lib/libpthread-2.12.so
004fc000-004fd000 rw-p 00017000 fd:00 4246 /lib/libpthread-2.12.so
004fd000-004ff000 rw-p 00000000 00:00 0
005f5000-0060b000 r-xp 00000000 fd:00 4548 /lib/libtinfo.so.5.7
0060b000-0060e000 rw-p 00015000 fd:00 4548 /lib/libtinfo.so.5.7
0061b000-00622000 r-xp 00000000 fd:00 12976 /lib/librt-2.12.so
00622000-00623000 r--p 00006000 fd:00 12976 /lib/librt-2.12.so
00623000-00624000 rw-p 00007000 fd:00 12976 /lib/librt-2.12.so
00680000-00682000 r-xp 00000000 fd:00 9932 /lib/libutil-2.12.so
00682000-00683000 r--p 00001000 fd:00 9932 /lib/libutil-2.12.so
00683000-00684000 rw-p 00002000 fd:00 9932 /lib/libutil-2.12.so
00ace000-00afc000 r-xp 00000000 fd:00 387421 /home/i2b2demo/PMI-Project/PMI_id_map_script/pmi/lib/python3.6/site-packages/readline.cpython-36m-i386-linux-gnu.so
00afc000-00b01000 rw-p 0002e000 fd:00 387421 /home/i2b2demo/PMI-Project/PMI_id_map_script/pmi/lib/python3.6/site-packages/readline.cpython-36m-i386-linux-gnu.so
00b01000-00b02000 rw-p 00000000 00:00 0
00c78000-00e09000 r-xp 00000000 fd:00 4203 /lib/libc-2.12.so
00e09000-00e0b000 r--p 00191000 fd:00 4203 /lib/libc-2.12.so
00e0b000-00e0c000 rw-p 00193000 fd:00 4203 /lib/libc-2.12.so
00e0c000-00e0f000 rw-p 00000000 00:00 0
00e63000-00e81000 r-xp 00000000 fd:00 3473 /lib/ld-2.12.so
00e81000-00e82000 r--p 0001d000 fd:00 3473 /lib/ld-2.12.so
00e82000-00e83000 rw-p 0001e000 fd:00 3473 /lib/ld-2.12.so
00ea4000-00ea7000 r-xp 00000000 fd:00 12962 /lib/libdl-2.12.so
00ea7000-00ea8000 r--p 00002000 fd:00 12962 /lib/libdl-2.12.so
00ea8000-00ea9000 rw-p 00003000 fd:00 12962 /lib/libdl-2.12.so
00fc9000-00fe6000 r-xp 00000000 fd:00 15323 /lib/libgcc_s-4.4.7-20120601.so.1
00fe6000-00fe7000 rw-p 0001d000 fd:00 15323 /lib/libgcc_s-4.4.7-20120601.so.1
08048000-08222000 r-xp 00000000 fd:00 394807 /home/i2b2demo/PMI-Project/PMI_id_map_script/pmi/bin/python3.6
08222000-0826d000 rw-p 001d9000 fd:00 394807 /home/i2b2demo/PMI-Project/PMI_id_map_script/pmi/bin/python3.6
0826d000-0828e000 rw-p 00000000 00:00 0
08c10000-08c87000 rw-p 00000000 00:00 0 [heap]
b747f000-b7581000 rw-p 00000000 00:00 0
b7581000-b7781000 r--p 00000000 fd:00 4192 /usr/lib/locale/locale-archive
b7781000-b7783000 rw-p 00000000 00:00 0
b778a000-b7791000 r--s 00000000 fd:00 5148 /usr/lib/gconv/gconv-modules.cache
b7791000-b7792000 rw-p 00000000 00:00 0
bfb0d000-bfb2b000 rw-p 00000000 00:00 0 [stack]
[1] 32069 abort python
Install gnureadline instead of readline
pip uninstall readline
pip install gnureadline
I am having this problem, as well. When I ran "make" in preparation to install python 3.6.1, I saw this output toward the end:
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _dbm _gdbm
_lzma _sqlite3 _tkinter
readline
I'm guessing that without the readline binaries present, trying to use the readline Python library will not work. The thing is, I know I've installed the readline binaries previously. From what I can gather, this is an issue with the python installation being able to find them.
UPDATE:
I followed the advice here:
https://gist.github.com/Nesffer/5fb3d6d4cd3e0cb65624
Essentially, just run this command:
sudo apt-get install libbz2-dev libncurses5-dev libgdbm-dev liblzma-dev sqlite3 libsqlite3-dev openssl libssl-dev tcl8.6-dev tk8.6-dev libreadline-dev zlib1g-dev
And then cleaned and reinstalled python 3.6.1. Ensure no traces of python3.6 on your system This fixes the problem for me. I'm sure I had readline installed before, so I'm not entirely sure what the mechanics of this problem are.
Related
I have dedicated server with WHM when am trying to run any script from the command line am getting the following error but when am running the same script from Root it's run correctly :
Please help :)
*** buffer overflow detected ***: php terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x76e9e6f9e7f7]
/lib64/libc.so.6(+0x1006e0)[0x76e9e6f9c6e0]
/lib64/libc.so.6(+0xffb39)[0x76e9e6f9bb39]
/lib64/libc.so.6(_IO_default_xsputn+0xc9)[0x76e9e6f104a9]
/lib64/libc.so.6(_IO_vfprintf+0x64f)[0x76e9e6ee048f]
/lib64/libc.so.6(__vsprintf_chk+0x9d)[0x76e9e6f9bbdd]
/lib64/libc.so.6(__sprintf_chk+0x7f)[0x76e9e6f9bb1f]
php[0x403328]
php[0x4020e9]
php[0x40171f]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x76e9e6ebad1d]
php[0x4011e9]
======= Memory map: ========
00400000-00404000 r-xp 00000000 09:02 565253 /usr/local/bin/php
00604000-00605000 rw-p 00004000 09:02 565253 /usr/local/bin/php
00605000-01b81000 ---p 00000000 00:00 0
01b81000-01ba2000 rw-p 00000000 00:00 0 [heap]
76e9e6c86000-76e9e6c9c000 r-xp 00000000 09:02 2727991 /lib64/libgcc_s-4.4.7-20120601.so.1
76e9e6c9c000-76e9e6e9b000 ---p 00016000 09:02 2727991 /lib64/libgcc_s-4.4.7-20120601.so.1
76e9e6e9b000-76e9e6e9c000 rw-p 00015000 09:02 2727991 /lib64/libgcc_s-4.4.7-20120601.so.1
76e9e6e9c000-76e9e7026000 r-xp 00000000 09:02 2728045 /lib64/libc-2.12.so
76e9e7026000-76e9e7226000 ---p 0018a000 09:02 2728045 /lib64/libc-2.12.so
76e9e7226000-76e9e722a000 r--p 0018a000 09:02 2728045 /lib64/libc-2.12.so
76e9e722a000-76e9e722c000 rw-p 0018e000 09:02 2728045 /lib64/libc-2.12.so
76e9e722c000-76e9e7230000 rw-p 00000000 00:00 0
76e9e7230000-76e9e724f000 r-xp 00000000 09:02 5392297 /usr/lib64/libyaml-0.so.2.0.4
76e9e724f000-76e9e744e000 ---p 0001f000 09:02 5392297 /usr/lib64/libyaml-0.so.2.0.4
76e9e744e000-76e9e744f000 rw-p 0001e000 09:02 5392297 /usr/lib64/libyaml-0.so.2.0.4
76e9e744f000-76e9e746f000 r-xp 00000000 09:02 2727958 /lib64/ld-2.12.so
76e9e7660000-76e9e7663000 rw-p 00000000 00:00 0
76e9e766b000-76e9e766e000 rw-p 00000000 00:00 0
76e9e766e000-76e9e766f000 r-xp 00000000 00:00 0 [vdso]
76e9e766f000-76e9e7670000 r--p 00020000 09:02 2727958 /lib64/ld-2.12.so
76e9e7670000-76e9e7671000 rw-p 00021000 09:02 2727958 /lib64/ld-2.12.so
76e9e7671000-76e9e7672000 rw-p 00000000 00:00 0
7d3fc456e000-7d3fc458f000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r--p 00000000 0
solved it was an error related to Apache buffering module.
I try install netbeans 7.4 for html5 and php develop version on Linux Mint 15 Olivia.But installer throw error wthi next message:
* Error in
`/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200': double free or
corruption (out): 0x089f5720 *
======= Backtrace: ========= /lib/i386-linux-gnu/libc.so.6(+0x767e2)[0xb765d7e2]
/lib/i386-linux-gnu/libc.so.6(+0x77530)[0xb765e530]
/lib/i386-linux-gnu/libz.so.1(+0xd8fb)[0xb77a88fb]
/lib/i386-linux-gnu/libz.so.1(deflateEnd+0x3c)[0xb77a01dc]
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200[0x8057911]
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200[0x8057ad6]
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200[0x804eee0]
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200[0x8058adc]
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200[0x8048f87]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0xb7600935]
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200[0x8048fad]
======= Memory map: ======== 08048000-0805d000 r-xp 00000000 08:08 526424 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200
0805d000-0805e000 r--p 00015000 08:08 526424
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200 0805e000-0805f000
rw-p 00016000 08:08 526424
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/unpack200 0805f000-08060000
rw-p 00000000 00:00 0 089ac000-08a16000 rw-p 00000000 00:00 0
[heap] b75ac000-b75c7000 r-xp 00000000 08:01 393963
/lib/i386-linux-gnu/libgcc_s.so.1 b75c7000-b75c8000 r--p 0001a000
08:01 393963 /lib/i386-linux-gnu/libgcc_s.so.1 b75c8000-b75c9000
rw-p 0001b000 08:01 393963 /lib/i386-linux-gnu/libgcc_s.so.1
b75e5000-b75e7000 rw-p 00000000 00:00 0 b75e7000-b7795000 r-xp
00000000 08:01 397441 /lib/i386-linux-gnu/libc-2.17.so
b7795000-b7797000 r--p 001ae000 08:01 397441
/lib/i386-linux-gnu/libc-2.17.so b7797000-b7798000 rw-p 001b0000 08:01
397441 /lib/i386-linux-gnu/libc-2.17.so b7798000-b779b000 rw-p
00000000 00:00 0 b779b000-b77b2000 r-xp 00000000 08:01 394091
/lib/i386-linux-gnu/libz.so.1.2.7 b77b2000-b77b3000 r--p 00016000
08:01 394091 /lib/i386-linux-gnu/libz.so.1.2.7 b77b3000-b77b4000
rw-p 00017000 08:01 394091 /lib/i386-linux-gnu/libz.so.1.2.7
b77cd000-b77d2000 rw-p 00000000 00:00 0 b77d2000-b77d3000 r-xp
00000000 00:00 0 [vdso] b77d3000-b77f3000 r-xp 00000000 08:01
397442 /lib/i386-linux-gnu/ld-2.17.so b77f3000-b77f4000 r--p
0001f000 08:01 397442 /lib/i386-linux-gnu/ld-2.17.so
b77f4000-b77f5000 rw-p 00020000 08:01 397442
/lib/i386-linux-gnu/ld-2.17.so bfa28000-bfa49000 rw-p 00000000 00:00 0
[stack]
If I call clGetPlatformIDs and directly after it SDL_Quit(), the program crashes (segfault). The OpenGL version doesn't seem to matter at all (tried 2.1, 3.1, 3.2, 3.3). The operating system is Fedora 18, fully updated. I have installed the fglrx drivers.
The problem doesn't seem to be SDL-only; GLFW had a very similar crash on glfwTerminate().
GLFW didn't tell me anything about the crash, except that it was a segfault. But luckily, SDL gives a bit more information:
*** glibc detected *** bin/Debug/voxel renderer: double free or corruption (fasttop): 0x0000000001086220 ***
======= Backtrace: =========
/lib64/libc.so.6[0x322c87ca8e]
/usr/local/lib/libSDL2-2.0.so.0(+0xb0a56)[0x7f256e97ba56]
/usr/local/lib/libSDL2-2.0.so.0(SDL_VideoQuit+0x6e)[0x7f256e960d4e]
/usr/local/lib/libSDL2-2.0.so.0(SDL_QuitSubSystem+0x18d)[0x7f256e8daded]
/usr/local/lib/libSDL2-2.0.so.0(SDL_Quit+0x18)[0x7f256e8daf18]
/usr/local/lib/libSDL2-2.0.so.0(+0x10d5f)[0x7f256e8dbd5f]
/lib64/libpthread.so.0[0x322d00f000]
======= Memory map: ========
00400000-00408000 r-xp 00000000 fd:02 13762941 /home/julius/Ohjelmointi/Raytracer/bin/Debug/voxel renderer
00607000-00608000 r--p 00007000 fd:02 13762941 /home/julius/Ohjelmointi/Raytracer/bin/Debug/voxel renderer
00608000-00609000 rw-p 00008000 fd:02 13762941 /home/julius/Ohjelmointi/Raytracer/bin/Debug/voxel renderer
01083000-028e5000 rw-p 00000000 00:00 0 [heap]
322c400000-322c420000 r-xp 00000000 fd:01 669659 /usr/lib64/ld-2.16.so
322c620000-322c621000 r--p 00020000 fd:01 669659 /usr/lib64/ld-2.16.so
322c621000-322c622000 rw-p 00021000 fd:01 669659 /usr/lib64/ld-2.16.so
322c622000-322c623000 rw-p 00000000 00:00 0
322c800000-322c9ad000 r-xp 00000000 fd:01 669660 /usr/lib64/libc-2.16.so
322c9ad000-322cbad000 ---p 001ad000 fd:01 669660 /usr/lib64/libc-2.16.so
322cbad000-322cbb1000 r--p 001ad000 fd:01 669660 /usr/lib64/libc-2.16.so
322cbb1000-322cbb3000 rw-p 001b1000 fd:01 669660 /usr/lib64/libc-2.16.so
322cbb3000-322cbb8000 rw-p 00000000 00:00 0
322cc00000-322cc03000 r-xp 00000000 fd:01 669661 /usr/lib64/libdl-2.16.so
322cc03000-322ce02000 ---p 00003000 fd:01 669661 /usr/lib64/libdl-2.16.so
322ce02000-322ce03000 r--p 00002000 fd:01 669661 /usr/lib64/libdl-2.16.so
322ce03000-322ce04000 rw-p 00003000 fd:01 669661 /usr/lib64/libdl-2.16.so
322d000000-322d016000 r-xp 00000000 fd:01 669662 /usr/lib64/libpthread-2.16.so
322d016000-322d216000 ---p 00016000 fd:01 669662 /usr/lib64/libpthread-2.16.so
322d216000-322d217000 r--p 00016000 fd:01 669662 /usr/lib64/libpthread-2.16.so
322d217000-322d218000 rw-p 00017000 fd:01 669662 /usr/lib64/libpthread-2.16.so
322d218000-322d21c000 rw-p 00000000 00:00 0
322d400000-322d407000 r-xp 00000000 fd:01 669663 /usr/lib64/librt-2.16.so
322d407000-322d606000 ---p 00007000 fd:01 669663 /usr/lib64/librt-2.16.so
322d606000-322d607000 r--p 00006000 fd:01 669663 /usr/lib64/librt-2.16.so
322d607000-322d608000 rw-p 00007000 fd:01 669663 /usr/lib64/librt-2.16.so
322dc00000-322dd00000 r-xp 00000000 fd:01 663279 /usr/lib64/libm-2.16.so
322dd00000-322deff000 ---p 00100000 fd:01 663279 /usr/lib64/libm-2.16.so
322deff000-322df00000 r--p 000ff000 fd:01 663279 /usr/lib64/libm-2.16.so
322df00000-322df01000 rw-p 00100000 fd:01 663279 /usr/lib64/libm-2.16.so
322e800000-322e815000 r-xp 00000000 fd:01 669679 /usr/lib64/libgcc_s-4.7.2-20121109.so.1
322e815000-322ea14000 ---p 00015000 fd:01 669679 /usr/lib64/libgcc_s-4.7.2-20121109.so.1
322ea14000-322ea15000 r--p 00014000 fd:01 669679 /usr/lib64/libgcc_s-4.7.2-20121109.so.1
322ea15000-322ea16000 rw-p 00015000 fd:01 669679 /usr/lib64/libgcc_s-4.7.2-20121109.so.1
3230800000-32308e5000 r-xp 00000000 fd:01 669721 /usr/lib64/libstdc++.so.6.0.17
32308e5000-3230ae4000 ---p 000e5000 fd:01 669721 /usr/lib64/libstdc++.so.6.0.17
3230ae4000-3230aec000 r--p 000e4000 fd:01 669721 /usr/lib64/libstdc++.so.6.0.17
3230aec000-3230aee000 rw-p 000ec000 fd:01 669721 /usr/lib64/libstdc++.so.6.0.17
3230aee000-3230b03000 rw-p 00000000 00:00 0
3230c00000-3230d34000 r-xp 00000000 fd:01 669700 /usr/lib64/libX11.so.6.3.0
3230d34000-3230f34000 ---p 00134000 fd:01 669700 /usr/lib64/libX11.so.6.3.0
3230f34000-3230f35000 r--p 00134000 fd:01 669700 /usr/lib64/libX11.so.6.3.0
3230f35000-3230f3a000 rw-p 00135000 fd:01 669700 /usr/lib64/libX11.so.6.3.0
3231000000-3231002000 r-xp 00000000 fd:01 669698 /usr/lib64/libXau.so.6.0.0
3231002000-3231202000 ---p 00002000 fd:01 669698 /usr/lib64/libXau.so.6.0.0
3231202000-3231203000 r--p 00002000 fd:01 669698 /usr/lib64/libXau.so.6.0.0
3231203000-3231204000 rw-p 00003000 fd:01 669698 /usr/lib64/libXau.so.6.0.0
3231400000-323141d000 r-xp 00000000 fd:01 669699 /usr/lib64/libxcb.so.1.1.0
323141d000-323161c000 ---p 0001d000 fd:01 669699 /usr/lib64/libxcb.so.1.1.0
323161c000-323161d000 r--p 0001c000 fd:01 669699 /usr/lib64/libxcb.so.1.1.0
323161d000-323161e000 rw-p 0001d000 fd:01 669699 /usr/lib64/libxcb.so.1.1.0
3231c00000-3231c11000 r-xp 00000000 fd:01 669716 /usr/lib64/libXext.so.6.4.0
3231c11000-3231e10000 ---p 00011000 fd:01 669716 /usr/lib64/libXext.so.6.4.0
3231e10000-3231e11000 r--p 00010000 fd:01 669716 /usr/lib64/libXext.so.6.4.0
3231e11000-3231e12000 rw-p 00011000 fd:01 669716 /usr/lib64/libXext.so.6.4.0
3232c00000-3232c09000 r-xp 00000000 fd:01 669715 /usr/lib64/libXrender.so.1.3.0
3232c09000-3232e08000 ---p 00009000 fd:01 669715 /usr/lib64/libXrender.so.1.3.0
3232e08000-3232e09000 r--p 00008000 fd:01 669715 /usr/lib64/libXrender.so.1.3.0
3232e09000-3232e0a000 rw-p 00009000 fd:01 669715 /usr/lib64/libXrender.so.1.3.0
3233000000-3233002000 r-xp 00000000 fd:01 669729 /usr/lib64/libXinerama.so.1.0.0
3233002000-3233201000 ---p 00002000 fd:01 669729 /usr/lib64/libXinerama.so.1.0.0
3233201000-3233202000 r--p 00001000 fd:01 669729 /usr/lib64/libXinerama.so.1.0.0
3233202000-3233203000 rw-p 00002000 fd:01 669729 /usr/lib64/libXinerama.so.1.0.0
3233c00000-3233c09000 r-xp 00000000 fd:01 669731 /usr/lib64/libXrandr.so.2.2.0
3233c09000-3233e08000 ---p 00009000 fd:01 669731 /usr/lib64/libXrandr.so.2.2.0
3233e08000-3233e09000 r--p 00008000 fd:01 669731 /usr/lib64/libXrandr.so.2.2.0
3233e09000-3233e0a000 rw-p 00009000 fd:01 669731 /usr/lib64/libXrandr.so.2.2.0
3235800000-32358bf000 r-xp 00000000 fd:01 794670 /usr/lib64/catalyst/libGL.so.1.2
32358bf000-32359bf000 ---p 000bf000 fd:01 794670 /usr/lib64/catalyst/libGL.so.1.2
32359bf000-32359e6000 rwxp 000bf000 fd:01 794670 /usr/lib64/catalyst/libGL.so.1.2
32359e6000-3235a08000 rwxp 00000000 00:00 0
3235c00000-3235c0f000 r-xp 00000000 fd:01 794669 /usr/lib64/catalyst/libatiuki.so.1.0
3235c0f000-3235d0e000 ---p 0000f000 fd:01 794669 /usr/lib64/catalyst/libatiuki.so.1.0
3235d0e000-3235d1a000 rw-p 0000e000 fd:01 794669 /usr/lib64/catalyst/libatiuki.so.1.0
323f600000-323f604000 r-xp 00000000 fd:01 669766 /usr/lib64/libXxf86vm.so.1.0.0
323f604000-323f804000 ---p 00004000 fd:01 669766 /usr/lib64/libXxf86vm.so.1.0.0
323f804000-323f805000 r--p 00004000 fd:01 669766 /usr/lib64/libXxf86vm.so.1.0.0
323f805000-323f806000 rw-p 00005000 fd:01 669766 /usr/lib64/libXxf86vm.so.1.0.0
3a2e200000-3a2e276000 r-xp 00000000 fd:01 655591 /usr/lib64/libGLEW.so.1.7.0
3a2e276000-3a2e475000 ---p 00076000 fd:01 655591 /usr/lib64/libGLEW.so.1.7.0
3a2e475000-3a2e47b000 r--p 00075000 fd:01 655591 /usr/lib64/libGLEW.so.1.7.0
3a2e47b000-3a2e47c000 rw-p 0007b000 fd:01 655591 /usr/lib64/libGLEW.so.1.7.0
3a2e47c000-3a2e480000 rw-p 00000000 00:00 0
3c2ce00000-3c2ce7d000 r-xp 00000000 fd:01 663378 /usr/lib64/libGLU.so.1.3.1
3c2ce7d000-3c2d07c000 ---p 0007d000 fd:01 663378 /usr/lib64/libGLU.so.1.3.1
3c2d07c000-3c2d07e000 r--p 0007c000 fd:01 663378 /usr/lib64/libGLU.so.1.3.1
3c2d07e000-3c2d07f000 rw-p 0007e000 fd:01 663378 /usr/lib64/libGLU.so.1.3.1
7f2564000000-7f25644c2000 rw-p 00000000 00:00 0
7f25644c2000-7f2568000000 ---p 00000000 00:00 0
7f25688c3000-7f25688c4000 ---p 00000000 00:00 0
7f25688c4000-7f2568904000 rw-p 00000000 00:00 0
7f2568904000-7f2568905000 rw-s 1cee5000 00:05 19449 /dev/ati/card0
7f2568905000-7f2568966000 rw-s 1cee4000 00:05 19449 /dev/ati/card0
7f2568966000-7f2568986000 rw-s 00004000 00:05 19449 /dev/ati/card0
7f2568986000-7f2568988000 rw-s 00002000 00:05 19449 /dev/ati/card0
7f2568988000-7f256ab96000 r-xp 00000000 fd:01 926157 /opt/AMDAPP/lib/x86_64/libamdocl64.so
7f256ab96000-7f256ad96000 ---p 0220e000 fd:01 926157 /opt/AMDAPP/lib/x86_64/libamdocl64.so
7f256ad96000-7f256afa9000 rw-p 0220e000 fd:01 926157 /opt/AMDAPP/lib/x86_64/libamdocl64.so
7f256afa9000-7f256b0bd000 rw-p 00000000 00:00 0
7f256b2bf000-7f256b308000 rw-p 00000000 00:00 0
7f256b308000-7f256b348000 rw-s 00027000 00:05 19449 /dev/ati/card0
7f256b348000-7f256ba48000 rw-s 00006000 00:05 19449 /dev/ati/card0
7f256ba82000-7f256ba89000 r--s 00000000 fd:01 791548 /usr/lib64/gconv/gconv-modules.cache
7f256ba89000-7f256bd09000 rw-p 00000000 00:00 0
7f256bd09000-7f256bd5a000 r-xp 00000000 fd:01 794075 /usr/lib64/catalyst/libatiadlxx.so
7f256bd5a000-7f256be5a000 ---p 00051000 fd:01 794075 /usr/lib64/catalyst/libatiadlxx.so
7f256be5a000-7f256be66000 rw-p 00051000 fd:01 794075 /usr/lib64/catalyst/libatiadlxx.so
7f256be66000-7f256be76000 rw-p 00000000 00:00 0
7f256be94000-7f256be95000 rw-s 00005000 00:05 19449 /dev/ati/card0
7f256be95000-7f256beb5000 rw-s 00004000 00:05 19449 /dev/ati/card0
7f256beb5000-7f256db10000 r-xp 00000000 fd:01 794085 /usr/lib64/dri/fglrx_dri.so
7f256db10000-7f256dc10000 ---p 01c5b000 fd:01 794085 /usr/lib64/dri/fglrx_dri.so
7f256dc10000-7f256dd76000 rwxp 01c5b000 fd:01 794085 /usr/lib64/dri/fglrx_dri.so
7f256dd76000-7f256de9a000 rwxp 00000000 00:00 0
7f256de9a000-7f256de9b000 ---p 00000000 00:00 0
7f256de9b000-7f256e6a5000 rw-p 00000000 00:00 0 [stack:27487]
7f256e6a5000-7f256e6ab000 r-xp 00000000 fd:01 926159 /opt/AMDAPP/lib/x86_64/libOpenCL.so.1
7f256e6ab000-7f256e8aa000 ---p 00006000 fd:01 926159 /opt/AMDAPP/lib/x86_64/libOpenCL.so.1
7f256e8aa000-7f256e8ab000 rw-p 00005000 fd:01 926159 /opt/AMDAPP/lib/x86_64/libOpenCL.so.1
7f256e8ab000-7f256e8ad000 rw-p 00000000 00:00 0
7f256e8b5000-7f256e8b6000 rw-p 00000000 00:00 0
7f256e8c8000-7f256e8c9000 rw-p 00000000 00:00 0
7f256e8c9000-7f256e8cb000 rw-s 00002000 00:05 19449 /dev/ati/card0
7f256e8cb000-7f256e9a7000 r-xp 00000000 fd:01 656113 /usr/local/lib/libSDL2-2.0.so.0.0.0
7f256e9a7000-7f256eba7000 ---p 000dc000 fd:01 656113 /usr/local/lib/libSDL2-2.0.so.0.0.0
7f256eba7000-7f256ebaa000 r--p 000dc000 fd:01 656113 /usr/local/lib/libSDL2-2.0.so.0.0.0
7f256ebaa000-7f256ebb5000 rw-p 000df000 fd:01 656113 /usr/local/lib/libSDL2-2.0.so.0.0.0
7f256ebb5000-7f256ebb9000 rw-p 00000000 00:00 0
7ffff46c4000-7ffff46e5000 rw-p 00000000 00:00 0 [stack]
7ffff47ff000-7ffff4800000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Still, I couldn't find the exact reason as to why it should crash. OpenCL, OpenGL and SDL all work as expected before the crash.
So, does anyone know what could possibly cause this kind of crashes with OpenCL?
I have written my code on Windows VS platform and when I compile it there is no error. But when I try compiling it on linux with g++ compiler I get the error indicated below:
[user#ssh ~]$ g++ main.cpp -o main
[user#ssh ~]$ ./main "data1_h1.txt" "data1_r1.txt" 3 "output1_S1"
*** glibc detected *** ./main: free(): invalid pointer: 0x00007fff795578b4 ***
======= Backtrace: =========
/lib64/libc.so.6[0x320ec716af]
/lib64/libc.so.6(cfree+0x4b)[0x320ec758db]
./main(__gxx_personality_v0+0x3b2)[0x4013da]
./main[0x401d4b]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x320ec1d9c4]
./main(__gxx_personality_v0+0x71)[0x401099]
======= Memory map: ========
00400000-00405000 r-xp 00000000 00:16 18302619 /users/lnxsrv1/ee/user/main
00604000-00605000 rw-p 00004000 00:16 18302619 /users/lnxsrv1/ee/user/main
11159000-1117a000 rw-p 11159000 00:00 0
320e800000-320e81c000 r-xp 00000000 fd:00 1585318 /lib64/ld-2.5.so
320ea1c000-320ea1d000 r--p 0001c000 fd:00 1585318 /lib64/ld-2.5.so
320ea1d000-320ea1e000 rw-p 0001d000 fd:00 1585318 /lib64/ld-2.5.so
320ec00000-320ed4f000 r-xp 00000000 fd:00 1585379 /lib64/libc-2.5.so
320ed4f000-320ef4f000 ---p 0014f000 fd:00 1585379 /lib64/libc-2.5.so
320ef4f000-320ef53000 r--p 0014f000 fd:00 1585379 /lib64/libc-2.5.so
320ef53000-320ef54000 rw-p 00153000 fd:00 1585379 /lib64/libc-2.5.so
320ef54000-320ef59000 rw-p 320ef54000 00:00 0
320f000000-320f082000 r-xp 00000000 fd:00 1585438 /lib64/libm-2.5.so
320f082000-320f281000 ---p 00082000 fd:00 1585438 /lib64/libm-2.5.so
320f281000-320f282000 r--p 00081000 fd:00 1585438 /lib64/libm-2.5.so
320f282000-320f283000 rw-p 00082000 fd:00 1585438 /lib64/libm-2.5.so
3212800000-321280d000 r-xp 00000000 fd:00 1585420 /lib64/libgcc_s-4.1.2-20080825.so.1
321280d000-3212a0d000 ---p 0000d000 fd:00 1585420 /lib64/libgcc_s-4.1.2-20080825.so.1
3212a0d000-3212a0e000 rw-p 0000d000 fd:00 1585420 /lib64/libgcc_s-4.1.2-20080825.so.1
3217000000-32170e6000 r-xp 00000000 fd:00 782090 /usr/lib64/libstdc++.so.6.0.8
32170e6000-32172e5000 ---p 000e6000 fd:00 782090 /usr/lib64/libstdc++.so.6.0.8
32172e5000-32172eb000 r--p 000e5000 fd:00 782090 /usr/lib64/libstdc++.so.6.0.8
32172eb000-32172ee000 rw-p 000eb000 fd:00 782090 /usr/lib64/libstdc++.so.6.0.8
32172ee000-3217300000 rw-p 32172ee000 00:00 0
2b43d24f0000-2b43d24f2000 rw-p 2b43d24f0000 00:00 0
2b43d2508000-2b43d250a000 rw-p 2b43d2508000 00:00 0
7fff79543000-7fff79558000 rw-p 7ffffffe9000 00:00 0 [stack]
7fff795fd000-7fff79600000 r-xp 7fff795fd000 00:00 0 [vdso]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall]
Aborted
How can I fix that error? Thanks...
You are freeing memory that you didn't allocate. The first such example is residentData.
You assign it in main to be argv[1] and latter call delete[] on it, although you did not allocate it. (Technically, you did allocate it. you just replaced it with argv[1] later).
As suggested by #Basile Starynkevitch, you probably want to run your code under valgrind. It'll pinpoint many memory errors.
You don't get the error at compile time, but at run time.
I suggest compiling with g++ -Wall -g (and improve your code till no warnings are obtained) then debugging the memory leaks with valgrind and of course the usual gdb debugger.
While running a binary on linux62, the binary took heavy amount of memory.
This particularly happening after it loads java. The same thing is running fine with less memory on earlier versions of Linux.
So i want to know, is there any tools that can list the loaded libraries and their memory size, of a running binary.
I didn't get any utilities to do this, on a binary that is currently running.
ldd and objdump are taken the details only from the object, not from the process that is running.
Since the java library is loaded only after my program is up and running(loading java is optional), i need a tool to list out the set of libraries with their memory details from the running binary. So that i can understand which library takes more memory and i can debug further.
Thanks
Thanga
# pidof init
1
# cat /proc/1/maps
00400000-004d2000 r-xp 00000000 fd:02 9790 /bin/systemd
006d2000-006df000 r--p 000d2000 fd:02 9790 /bin/systemd
006df000-006e0000 rw-p 000df000 fd:02 9790 /bin/systemd
006e0000-006e1000 rw-p 00000000 00:00 0
008df000-008e2000 rw-p 000df000 fd:02 9790 /bin/systemd
0203d000-036b1000 rw-p 00000000 00:00 0 [heap]
3c0c200000-3c0c222000 r-xp 00000000 fd:02 11536 /lib64/ld-2.14.90.so
3c0c421000-3c0c422000 r--p 00021000 fd:02 11536 /lib64/ld-2.14.90.so
3c0c422000-3c0c423000 rw-p 00022000 fd:02 11536 /lib64/ld-2.14.90.so
3c0c423000-3c0c424000 rw-p 00000000 00:00 0
3c0c600000-3c0c7ad000 r-xp 00000000 fd:02 12080 /lib64/libc-2.14.90.so
3c0c7ad000-3c0c9ad000 ---p 001ad000 fd:02 12080 /lib64/libc-2.14.90.so
3c0c9ad000-3c0c9b1000 r--p 001ad000 fd:02 12080 /lib64/libc-2.14.90.so
3c0c9b1000-3c0c9b3000 rw-p 001b1000 fd:02 12080 /lib64/libc-2.14.90.so
3c0c9b3000-3c0c9b8000 rw-p 00000000 00:00 0
3c0ce00000-3c0ce02000 r-xp 00000000 fd:02 10569 /lib64/libdl-2.14.90.so
3c0ce02000-3c0d002000 ---p 00002000 fd:02 10569 /lib64/libdl-2.14.90.so
3c0d002000-3c0d003000 r--p 00002000 fd:02 10569 /lib64/libdl-2.14.90.so
3c0d003000-3c0d004000 rw-p 00003000 fd:02 10569 /lib64/libdl-2.14.90.so
3c0d200000-3c0d217000 r-xp 00000000 fd:02 6336 /lib64/libpthread-2.14.90.so
3c0d217000-3c0d416000 ---p 00017000 fd:02 6336 /lib64/libpthread-2.14.90.so
3c0d416000-3c0d417000 r--p 00016000 fd:02 6336 /lib64/libpthread-2.14.90.so
3c0d417000-3c0d418000 rw-p 00017000 fd:02 6336 /lib64/libpthread-2.14.90.so
3c0d418000-3c0d41c000 rw-p 00000000 00:00 0
3c0da00000-3c0da07000 r-xp 00000000 fd:02 22071 /lib64/librt-2.14.90.so
3c0da07000-3c0dc06000 ---p 00007000 fd:02 22071 /lib64/librt-2.14.90.so
3c0dc06000-3c0dc07000 r--p 00006000 fd:02 22071 /lib64/librt-2.14.90.so
3c0dc07000-3c0dc08000 rw-p 00007000 fd:02 22071 /lib64/librt-2.14.90.so
3c0de00000-3c0de15000 r-xp 00000000 fd:02 16692 /lib64/libgcc_s-4.6.3-20120306.so.1
3c0de15000-3c0e014000 ---p 00015000 fd:02 16692 /lib64/libgcc_s-4.6.3-20120306.so.1
3c0e014000-3c0e015000 rw-p 00014000 fd:02 16692 /lib64/libgcc_s-4.6.3-20120306.so.1
3c0e200000-3c0e21d000 r-xp 00000000 fd:02 28104 /lib64/libselinux.so.1
3c0e21d000-3c0e41d000 ---p 0001d000 fd:02 28104 /lib64/libselinux.so.1
3c0e41d000-3c0e41e000 r--p 0001d000 fd:02 28104 /lib64/libselinux.so.1
3c0e41e000-3c0e41f000 rw-p 0001e000 fd:02 28104 /lib64/libselinux.so.1
3c0e41f000-3c0e420000 rw-p 00000000 00:00 0
3c0ee00000-3c0ee04000 r-xp 00000000 fd:02 63328 /lib64/libcap.so.2.22
3c0ee04000-3c0f003000 ---p 00004000 fd:02 63328 /lib64/libcap.so.2.22
3c0f003000-3c0f004000 rw-p 00003000 fd:02 63328 /lib64/libcap.so.2.22
3c12600000-3c12643000 r-xp 00000000 fd:02 52994 /lib64/libdbus-1.so.3.5.6
3c12643000-3c12842000 ---p 00043000 fd:02 52994 /lib64/libdbus-1.so.3.5.6
3c12842000-3c12843000 r--p 00042000 fd:02 52994 /lib64/libdbus-1.so.3.5.6
3c12843000-3c12844000 rw-p 00043000 fd:02 52994 /lib64/libdbus-1.so.3.5.6
3c1be00000-3c1be17000 r-xp 00000000 fd:02 57102 /lib64/libaudit.so.1.0.0
3c1be17000-3c1c017000 ---p 00017000 fd:02 57102 /lib64/libaudit.so.1.0.0
3c1c017000-3c1c018000 r--p 00017000 fd:02 57102 /lib64/libaudit.so.1.0.0
3c1c018000-3c1c019000 rw-p 00018000 fd:02 57102 /lib64/libaudit.so.1.0.0
3c1c019000-3c1c01d000 rw-p 00000000 00:00 0
3c1c600000-3c1c604000 r-xp 00000000 fd:02 13766 /lib64/libattr.so.1.1.0
3c1c604000-3c1c803000 ---p 00004000 fd:02 13766 /lib64/libattr.so.1.1.0
3c1c803000-3c1c804000 rw-p 00003000 fd:02 13766 /lib64/libattr.so.1.1.0
3c1d200000-3c1d20d000 r-xp 00000000 fd:02 76182 /lib64/libpam.so.0.83.1
3c1d20d000-3c1d40c000 ---p 0000d000 fd:02 76182 /lib64/libpam.so.0.83.1
3c1d40c000-3c1d40d000 r--p 0000c000 fd:02 76182 /lib64/libpam.so.0.83.1
3c1d40d000-3c1d40e000 rw-p 0000d000 fd:02 76182 /lib64/libpam.so.0.83.1
3c1d600000-3c1d617000 r-xp 00000000 fd:02 18152 /lib64/libnsl-2.14.90.so
3c1d617000-3c1d816000 ---p 00017000 fd:02 18152 /lib64/libnsl-2.14.90.so
3c1d816000-3c1d817000 r--p 00016000 fd:02 18152 /lib64/libnsl-2.14.90.so
3c1d817000-3c1d818000 rw-p 00017000 fd:02 18152 /lib64/libnsl-2.14.90.so
3c1d818000-3c1d81a000 rw-p 00000000 00:00 0
3c1ea00000-3c1ea0e000 r-xp 00000000 fd:02 14124 /lib64/libudev.so.0.12.0
3c1ea0e000-3c1ec0e000 ---p 0000e000 fd:02 14124 /lib64/libudev.so.0.12.0
3c1ec0e000-3c1ec0f000 r--p 0000e000 fd:02 14124 /lib64/libudev.so.0.12.0
3c1ec0f000-3c1ec10000 rw-p 0000f000 fd:02 14124 /lib64/libudev.so.0.12.0
3c27000000-3c27008000 r-xp 00000000 fd:02 76173 /lib64/libwrap.so.0.7.6
3c27008000-3c27208000 ---p 00008000 fd:02 76173 /lib64/libwrap.so.0.7.6
3c27208000-3c27209000 rw-p 00008000 fd:02 76173 /lib64/libwrap.so.0.7.6
3c27209000-3c2720a000 rw-p 00000000 00:00 0
7febd3c96000-7febd3ca2000 r-xp 00000000 fd:02 45355 /lib64/libnss_files-2.14.90.so
7febd3ca2000-7febd3ea1000 ---p 0000c000 fd:02 45355 /lib64/libnss_files-2.14.90.so
7febd3ea1000-7febd3ea2000 r--p 0000b000 fd:02 45355 /lib64/libnss_files-2.14.90.so
7febd3ea2000-7febd3ea3000 rw-p 0000c000 fd:02 45355 /lib64/libnss_files-2.14.90.so
7febd3ea3000-7febd403c000 rw-p 00000000 00:00 0
7febd40ca000-7febd40d2000 rw-p 00000000 00:00 0
7febd40f9000-7febd40fc000 rw-p 00000000 00:00 0
7fffce1cd000-7fffce1ee000 rw-p 00000000 00:00 0 [stack]
7fffce1ff000-7fffce200000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]