Invisible character on env file, cause programe abort abnormally


最近做的项目出现了一个特别奇怪的问题, 就是在PQA 环境上Solaris Sun 10程序突然就莫名其妙的退出,而且不报任何错,也不coredump,就那么悄无声息的退出了。

开始怀疑是某些LIB 没有重新rebuild,但是验证之后发现不是,该rebuild的都rebuild了,env设置从表面上看没什么问题,但是仔细一看发现 LD_LIBRARY_PATH 有一个目录看着好像不对。


/coblib:/app/quantum/3.2_64/lib:/opt/cobol-se/4.0sp2/lib:/home/tss/cblv12tax/3p/xerces/lib:/home/tss/cblv12tax/3p/xalan/lib:/home/tss/cblv12tax/3p/rosette/lib:/home/tss/cblv12tax/3p/ACE_wrappers/bin:/home/tss/cblv12tax/ordering_site/lib:/home/tss/cblv12tax/configurator_fx_site/lib:/home/tss/cblv12tax/bsdm_site/lib:/home/tss/cblv12tax/site_specific/lib:/opt/app/oracle/product/10.2.0.3/lib:/home/tcs/cblv12/3p/rosette/lib:/home/tcs/cblv12/3p/ACE_wrappers/bin:/home/tcs/cblv12/3p/python/lib:/home/tcs/cblv12/3p/perl/lib:/home/tcs/cblv12/3p/xerces/lib:/home/tcs/cblv12/3p/xalan/lib:/app/tuxedo/9.0_64/lib:/home/tcs/cblv12/configurator_fx_site/lib:/home/tcs/cblv12/ordering_site/lib:/home/tcs/cblv12/bsdm_site/lib:/home/tcs/cblv12/site_specific/lib:/home/tcs/cblv12/arm_site/lib:/app/java/jdk1.5.0_06/jre/lib/sparcv9/server:/app/java/jdk1.5.0_06/jre/lib/sparcv9/server/..:/lib:/home/tcs/cblv12/3p/pgsql/lib:/home/tcs/cblv12/opcntr/agent/libs:/home/tcs/cblv12/opcntr/tools/apache/modules:/home/tcs/cblv12/opcntr/cc/libs:/home/tcs/cblv12/3p/apache/lib:/home/tcs/cblv12/3p/openssl/lib:/home/tcs/cblv12/DataBlitz/lib:/lib:/usr/lib:/opt/app/oracle/product/10.2.0.3/lib:/opt/cobol-se/coblib



然后我赶快查看了一下PQA 的env 文件,发现每一行后面都有个不可见字符^M,这个导致环境变量LD_LIBRARY_PATH 没有被正确的set。


setenv INCLUDE_TAXPKG_COMM comm^M
setenv COBDIR /opt/cobol-se/4.0sp2/^M
setenv PATH $COBDIR/bin:$PATH^M
setenv LD_LIBRARY_PATH $COBDIR/lib:$COBDIR/coblib:$LD_LIBRARY_PATH^M
setenv COBOPT -VP^M
setenv COBMODE 64^M
setenv DD_COMMTDIR /home/tss/cblv12tax/CTL/DataFiles^M
setenv GEODATA /home/tss/cblv12tax/CTL/DataFiles^M
setenv COMMFTOS $ARBORLOG/ctl.log^M


After I remove them all, and rerun BIP, BIP not aborted. This is env issue, that invisible character cause BIP couldn’t find COBOL lib and abort it.


For avoid such issue occurred, please don’t edit file on Windows, it’s difficult to identify the root cause.

你可能感兴趣的:(Project,Experience)