<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sybase数据库技术，数据库恢复专家 &#187; glibc</title>
	<atom:link href="http://www.dbainfo.net/tag/glibc/feed" rel="self" type="application/rss+xml" />
	<link>https://www.dbainfo.net</link>
	<description>提供Sybase ASE及Sybase SQL Anywhere数据库修复服务，电话：13811580958(微信)，QQ：289965371！We have many years of experience in recovering data from damanged Sybase devices. Contact us by Phone: +86 13811580958 Wechat: 13811580958 Email: 289965371@qq.com</description>
	<lastBuildDate>Sat, 14 Jun 2025 16:28:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>安装ASE15.7时出现glibc detected *** srvbuildres: free(): invalid pointer问题的解决</title>
		<link>https://www.dbainfo.net/install-ase15-7-glibc-detected-srvbuildres-free-invalid-pointer.htm</link>
		<comments>https://www.dbainfo.net/install-ase15-7-glibc-detected-srvbuildres-free-invalid-pointer.htm#comments</comments>
		<pubDate>Wed, 19 Oct 2011 07:28:27 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[ASE V15.7]]></category>
		<category><![CDATA[glibc]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=1208</guid>
		<description><![CDATA[Sybase ASE V15.7于9月下旬发布，10月上旬才提供开发版下载地址。先在Linux x86_64上体验并测试一把。ASE V15.7已不支持Linux x86和Solaris x86，但是仍然可以用win x86做开发测试用途。 操作系统环境为：CentOS 5.5，内核版本：2.6.18-194.el5 x86_64 一开始使用安装向导创建服务的时候，报错！所有服务均创建失败！ 修改安装向导生成的资源文件，已备后面利用srvbuildres创建服务。 首先设置一个能够解决Linux下Segmentation fault错误的环境变量： LD_POINTER_GUARD=0 在sybase用户环境下，执行下面的命令创建主服务时， [sybase@centos5 ASE-15_0]$ srvbuildres -r ./sqlsrv.res 报错： Warning: You have selected &#39;8k&#39; as the logical page size for the Adaptive Server. If you plan to load dump from another database, make sure this logical page size matches the size [...]]]></description>
			<content:encoded><![CDATA[<p>Sybase ASE V15.7于9月下旬发布，10月上旬才提供开发版下载地址。先在Linux x86_64上体验并测试一把。ASE V15.7已不支持Linux x86和Solaris x86，但是仍然可以用win x86做开发测试用途。</p>
<p>操作系统环境为：CentOS 5.5，内核版本：2.6.18-194.el5 x86_64</p>
<p>一开始使用安装向导创建服务的时候，报错！所有服务均创建失败！</p>
<p>修改安装向导生成的资源文件，已备后面利用srvbuildres创建服务。</p>
<p>首先设置一个能够解决Linux下Segmentation fault错误的环境变量：<strong><span style="color:#f00;"><span style="font-size: 14px;"> LD_POINTER_GUARD=0</span></span></strong></p>
<p>在sybase用户环境下，执行下面的命令创建主服务时，</p>
<pre>[sybase@centos5 ASE-15_0]$ <strong><span style="font-size:16px;">srvbuildres -r ./sqlsrv.res </span></strong></pre>
<p><span id="more-1208"></span></p>
<p>报错：</p>
<pre>Warning: You have selected &#39;8k&#39; as the logical page size for the Adaptive
Server. If you plan to load dump from another database, make sure this logical
page size matches the size of the source database. The default logical page
size in previous Adaptive Server versions was 2KB.
Port number &#39;5000&#39; is being reserved or currently in use by a running server.
Building Adaptive Server &#39;CENTOS5&#39;:
Writing entry into directory services...
<span style="color:#f00;"><span style="font-size: 16px;">*** glibc detected *** srvbuildres: free(): invalid pointer: 0x00000000183f8160 ***</span></span>
======= Backtrace: =========
/lib64/libc.so.6[0x3d9f07230f]
/lib64/libc.so.6(cfree+0x4b)[0x3d9f07276b]
srvbuildres(intl_iocsfclose+0x1d)[0x518b3d]
srvbuildres(dict_unload+0x553)[0x4b4573]
srvbuildres(iface_close+0x9)[0x4b0109]
srvbuildres(drv_close+0x54)[0x4ad494]
srvbuildres(dcl__sess_drop+0x24)[0x4ade34]
srvbuildres(dscp_sess_close+0x7f)[0x43eb3c]
srvbuildres(add_ifile_entry+0x152)[0x43fb3e]
srvbuildres[0x42e2be]
srvbuildres(build_server+0x19a)[0x42f5a8]
srvbuildres(process_resource_file+0x1438)[0x42aafc]
srvbuildres(main+0x2ab)[0x429583]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x3d9f01d994]
srvbuildres[0x429229]
======= Memory map: ========
00400000-0056b000 r-xp 00000000 fd:01 7005567                            /home/sybase/ASE-15_0/bin/srvbuildres
0076a000-007a4000 rw-p 0016a000 fd:01 7005567                            /home/sybase/ASE-15_0/bin/srvbuildres
007a4000-007b1000 rw-p 007a4000 00:00 0
183b8000-1845a000 rw-p 183b8000 00:00 0                                  [heap]
3d9ec00000-3d9ec1c000 r-xp 00000000 fd:00 1637126                        /lib64/ld-2.5.so
3d9ee1b000-3d9ee1c000 r--p 0001b000 fd:00 1637126                        /lib64/ld-2.5.so
3d9ee1c000-3d9ee1d000 rw-p 0001c000 fd:00 1637126                        /lib64/ld-2.5.so
3d9f000000-3d9f14e000 r-xp 00000000 fd:00 1637127                        /lib64/libc-2.5.so
3d9f14e000-3d9f34d000 ---p 0014e000 fd:00 1637127                        /lib64/libc-2.5.so
3d9f34d000-3d9f351000 r--p 0014d000 fd:00 1637127                        /lib64/libc-2.5.so
3d9f351000-3d9f352000 rw-p 00151000 fd:00 1637127                        /lib64/libc-2.5.so
3d9f352000-3d9f357000 rw-p 3d9f352000 00:00 0
3d9f400000-3d9f482000 r-xp 00000000 fd:00 1637132                        /lib64/libm-2.5.so
3d9f482000-3d9f681000 ---p 00082000 fd:00 1637132                        /lib64/libm-2.5.so
3d9f681000-3d9f682000 r--p 00081000 fd:00 1637132                        /lib64/libm-2.5.so
3d9f682000-3d9f683000 rw-p 00082000 fd:00 1637132                        /lib64/libm-2.5.so
3d9f800000-3d9f802000 r-xp 00000000 fd:00 1637133                        /lib64/libdl-2.5.so
3d9f802000-3d9fa02000 ---p 00002000 fd:00 1637133                        /lib64/libdl-2.5.so
3d9fa02000-3d9fa03000 r--p 00002000 fd:00 1637133                        /lib64/libdl-2.5.so
3d9fa03000-3d9fa04000 rw-p 00003000 fd:00 1637133                        /lib64/libdl-2.5.so
3daf600000-3daf60d000 r-xp 00000000 fd:00 1637143                        /lib64/libgcc_s-4.1.2-20080825.so.1
3daf60d000-3daf80d000 ---p 0000d000 fd:00 1637143                        /lib64/libgcc_s-4.1.2-20080825.so.1
3daf80d000-3daf80e000 rw-p 0000d000 fd:00 1637143                        /lib64/libgcc_s-4.1.2-20080825.so.1
2ae8d39bf000-2ae8d39c1000 rw-p 2ae8d39bf000 00:00 0
2ae8d39d7000-2ae8d39da000 rw-p 2ae8d39d7000 00:00 0
2ae8d39f1000-2ae8d39fb000 r-xp 00000000 fd:00 1636827                    /lib64/libnss_files-2.5.so
2ae8d39fb000-2ae8d3bfa000 ---p 0000a000 fd:00 1636827                    /lib64/libnss_files-2.5.so
2ae8d3bfa000-2ae8d3bfb000 r--p 00009000 fd:00 1636827                    /lib64/libnss_files-2.5.so
2ae8d3bfb000-2ae8d3bfc000 rw-p 0000a000 fd:00 1636827                    /lib64/libnss_files-2.5.so
7fff80ded000-7fff80e15000 rw-p 7ffffffd7000 00:00 0                      [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
Aborted</pre>
<p>主要是这句错误：<span style="color:#f00;">*** glibc detected *** srvbuildres: free(): invalid pointer: 0x00000000183f8160 ***</span></p>
<p>原因可能有：重新释放已经释放的存储空间等。</p>
<p><span style="font-size:16px;"><strong>解决方法：<br />
	</strong></span></p>
<p>设置环境变量MALLOC_CHECK_=1以使得glibc跳过检查冲突时遇到的错误。可以参考linux的man malloc结果中NOTES部分的信息。</p>
<p>关于环境变量MALLOC_CHECK_，不同的值代表的含义：</p>
<p>0 -- Do not generate an error message, and do not kill the program<br />
	1 -- Generate an error message, but do not kill the program<br />
	2 -- Do not generate an error message, but kill the program<br />
	3 -- Generate an error message and kill the program</p>
<p>命令如下：</p>
<p><span style="font-size:16px;"><strong>MALLOC_CHECK_=1 srvbuildres -r ./sqlsrv.res <br />
	</strong></span></p>
<pre>[sybase@centos5 ASE-15_0]$ MALLOC_CHECK_=1 srvbuildres -r ./sqlsrv.res
<span style="color:#f00;">malloc: using debugging hooks</span>
Warning: You have selected &#39;8k&#39; as the logical page size for the Adaptive
Server. If you plan to load dump from another database, make sure this logical
page size matches the size of the source database. The default logical page
size in previous Adaptive Server versions was 2KB.
Building Adaptive Server &#39;CENTOS5&#39;:
Writing entry into directory services...
<span style="color:#f00;">*** glibc detected *** srvbuildres: free(): invalid pointer: 0x000000000b022f50 ***</span>
Directory services entry complete.
Building master device...
<span style="color:#f00;">malloc: using debugging hooks
malloc: using debugging hooks</span>
Master device complete.
Writing RUN_CENTOS5 file...
RUN_CENTOS5 file complete.
Starting server...
malloc: using debugging hooks
malloc: using debugging hooks
Server started.
Building sysprocs device and sybsystemprocs database...
sysprocs device and sybsystemprocs database created.
Running installmaster script to install system stored procedures...
installmaster: 10% complete.
installmaster: 20% complete.
installmaster: 30% complete.
installmaster: 40% complete.
installmaster: 50% complete.
installmaster: 60% complete.
installmaster: 70% complete.
installmaster: 80% complete.
installmaster: 90% complete.
installmaster: 100% complete.
installmaster script complete.
Creating two-phase commit database...
Two phase commit database complete.
Extending tempdb database ...
Extending tempdb database complete.
Installing common character sets (Code Page 437, Code Page 850, ISO Latin-1,
Macintosh and HP Roman-8)...
Character sets installed.
Setting server name in Adaptive Server...
malloc: using debugging hooks
malloc: using debugging hooks
Server name added.
Server &#39;CENTOS5&#39; was successfully created.
</pre>
<p>创建备份、XP、JS服务时，类似的命令为：</p>
<pre>MALLOC_CHECK_=1 srvbuildres -r ./bsrv.res

MALLOC_CHECK_=1 srvbuildres -r ./xp.res

MALLOC_CHECK_=1 srvbuildres -r ./js.res</pre>
<p>使用MALLOC_CHECK_=1后虽然还会报glibc invalid pointer的错误，但是最终成功创建了Sybase服务。测试ASE15.7的时候没有遇到类似的错误。</p>
<p><strong>参考：</strong><a href="http://forums.gentoo.org/viewtopic-t-316912-start-0-postdays-0-postorder-asc-highlight-***+glibc+detected+***+free+invalid+pointer+0x1003e590+***.html" target="_blank">glibc detected free(): invalid pointer</a></p>
<p>关于变量MALLOC_CHECK_的取值：</p>
<p><span class="postbody">0 -- Do not generate an error message, and do not kill the program <br />
	1 -- Generate an error message, but do not kill the program <br />
	2 -- Do not generate an error message, but kill the program <br />
	3 -- Generate an error message and kill the program </span></p>
<p>另外，也可以在终端像设置其它环境变量一样设置： export MALLOC_CHECK_=1 或者 setenv MALLOC_CHECK_ 1</p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/install-ase15-7-glibc-detected-srvbuildres-free-invalid-pointer.htm">https://www.dbainfo.net/install-ase15-7-glibc-detected-srvbuildres-free-invalid-pointer.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/install-ase15-7-glibc-detected-srvbuildres-free-invalid-pointer.htm">安装ASE15.7时出现glibc detected *** srvbuildres: free(): invalid pointer问题的解决</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2014-11-29 -- <a href="https://www.dbainfo.net/ase-15-7-silent-install.htm" title="Sybase ASE 15.7静默方式安装并创建服务器">Sybase ASE 15.7静默方式安装并创建服务器</a> (0)</li><li>2014-10-10 -- <a href="https://www.dbainfo.net/ase-object-name-length-limit.htm" title="ASE对象名称长度限制">ASE对象名称长度限制</a> (0)</li><li>2014-06-09 -- <a href="https://www.dbainfo.net/count_all_tables_rowcount.htm" title="统计用户数据库内所有表的行数">统计用户数据库内所有表的行数</a> (0)</li><li>2014-05-26 -- <a href="https://www.dbainfo.net/isql_client_password_encryption_fails.htm" title="isql登录ASE报Client password encryption fails问题解决">isql登录ASE报Client password encryption fails问题解决</a> (0)</li><li>2013-11-19 -- <a href="https://www.dbainfo.net/showplan_html_format.htm" title="以HTML格式显示ASE查询计划">以HTML格式显示ASE查询计划</a> (0)</li><li>2013-10-15 -- <a href="https://www.dbainfo.net/ase-xml-introduction.htm" title="ASE中xml服务使用方法简介">ASE中xml服务使用方法简介</a> (0)</li><li>2013-09-16 -- <a href="https://www.dbainfo.net/select-random-rows-from-table.htm" title="ASE从表中随机选择数据的三种方法">ASE从表中随机选择数据的三种方法</a> (0)</li><li>2013-09-08 -- <a href="https://www.dbainfo.net/get-current-running-sql.htm" title="查看ASE v15正在执行的SQL语句内容">查看ASE v15正在执行的SQL语句内容</a> (0)</li><li>2013-07-18 -- <a href="https://www.dbainfo.net/create-ase-server-by-manual.htm" title="手动创建ASE服务器">手动创建ASE服务器</a> (0)</li><li>2011-10-08 -- <a href="https://www.dbainfo.net/ase-v15-7-download-page.htm" title="Sybase ASE V15.7下载地址">Sybase ASE V15.7下载地址</a> (1)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/install-ase15-7-glibc-detected-srvbuildres-free-invalid-pointer.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
