`
iihero
  • 浏览: 259636 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Linux下安装Sybase ASE时的环境变量LD_POINTER_GUARD的含义

阅读更多

去年就听说,这个环境变量可以不用设置了,是从15.0.3或者以上版本开始。但我还是将信将疑。

LD_POINTER_GUARD这个环境变量,作用是什么呢?

ASE在linux下,遇到glibc2.4以及更新版本的glibc库时,碰到了问题,结果通过设置这个环境变量为0或者1,得到一个workround,去绕过这个问题。到底是什么问题呢?

有一个CR#CR 479363,专门解决这个问题。15.0.2 ESD #4 and 15.0.1 Cluster Edition ESD #2.

是什么导致这个问题呢?

ASE实现了自己的内部使用的线程库,从一个线程切换到另一个线程(在Linux上),我们常常用到标准的跳转调用setjmp/logjmp。setjmp实际上只是获取当前上下文的一个快照,这个快照(jump缓冲)后来会被传递给longjmp,以用于跳转回到以前的上下文。这个小技巧可以让线程能够获取在共享内存里的相关栈数据,允许这些线程在多个操作系统进程之间调度。当创建一个新线程,但是没有合适的jump缓冲去跳转时,需要手动创建一个,并将栈指针放到共享内存里,这就是问题所在。

在glibc2.4里,有一个变化是把栈指针放到了jump缓冲里。setjmp会把当前的栈指针放到jump缓冲里,然后longjmp会取出栈指针,由于初始的栈指针是人为创建的,因此初始的jump缓冲保存的是一个未经修改的栈指针,当longjmp获取这个栈指针时,则会导致crash。

If you are going to be using ASE 12.5 or ASE 15 with the upcoming Red Hat Enterprise Linux 5.0, there are two CRs that you need to know about:

  1. CR 450004 – XP Server and Backupserver (64bit)
  2. CR 432482 – ASE 15

The problem is the result of using the jmp() and longjmp() functions in the GNU C Library version 2.4 (glibc 2.4).

setjmp() and longjmp() are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. setjmp() saves the stack context/environment in env for later use by longjmp(). The stack context will be invalidated if the function which called setjmp() returns.

Starting in glibc 2.4, the jmpbuf is unavailable due to a security exploit known for several years. Restricting access to the jmpbuf was an effort by the glibc maintainers to ‘close this hole’ by forcing the application writers to use the sigsetjmp() and siglongjmp() instead.

The problem with using sigsetjmp() and siglongjmp() is that they aren’t thread safe. This is supposed to be fixed in glibc 2.6 according to a contact at Sybase but Sybase *does* have a workaround for this issue and will be putting it into the ASE v15 codeline when they perform the RHEL 5 certification sometime next year.

I wasn’t able to find much information the supposed exploit . I only found a few newsgroup posts that didn’t provide any details.

Michael Peppler maintains the ASE on Linux FAQ . It contains a workaround for various distributions of Linux:

Installing/Running ASE on systems with glibc 2.4.x (Fedora Core 5, etc)

ASE (12.5.x, 15.x) will not run on a system with glibc 2.4.x (that’s Fedora Core 5 and later, among others). Here is a work-around, supplied by “Chris” in sybase.public.ase.linux:

Symptoms of the problem are ASE’s failing to build when you run the installer, or “Segmentation Fault” when trying to start an ASE instance. The Seg Fault happens right after Engine ) is brought online in the error log.
If you are running Fedora Core 5 or 6
You will need to set the environment variable LD_POINTER_GUARD to 0, in your sybase .profile, as follows:

export LD_POINTER_GUARD=0  (Fedora, Redhat系列)

Alternatively, just export this from the shell. If you haven’t built any ASE’s yet, you’ll need to export this before running the installer, otherwise ASE will fail to build. If you are trying to boot an already installed ASE, then put it in your .profile / .bash_profile or export it as an environment variable before starting ASE.
If you are running Ubuntu / Kubuntu “Edgy”
You will need to set the environment variable LD_POINTER_GUARD to 1 in your sybase .profile, as follows:

export LD_POINTER_GUARD=1 (Ubuntu系列,现在似乎可以不要这个参数了)

I googled around a bit trying to find out what the LD_POINTER_GUARD thingie did and ran across a posting / blog where it talked about insome glibc versions it’s backwards … RedHat just made a change I guess and that’s why you have to set it to “0″ for Fedora and “1″ for Ubuntu / Kubuntu / Debian (glibc 2.4). Same info applies if you are building a new ASE.
If you are running Suse 10.1 You will need to set the environment variable LD_POINTER_GUARD to 1 in your sybase .profile, as follows:

export LD_POINTER_GUARD=1 (SuSE系列)

Same discussion as for Ubuntu.
I’ve tried all of the above they all work with the workaround listed. Happy ASE-ing! I’ve tested all of the above distros (sorry it took me so long, was on the road a lot over the last several weeks) and they allow ASE to boot; the workaround should be valid for ASE 15.x and 12.x (prolly even for 11.x if you wanted to try).

UPDATE: Workaround for all current versions of ASE at http://froebe.net/blog/2008/06/26/how-to-install-and-run-sybase-adaptive-server-enterprise-1254-and-150x-on-ubuntu-linux-804-jeos-hardy-heron-using-chroot-environment/

分享到:
评论

相关推荐

    D:\sybase-ase-11_0_3_3-6_i386.part2

    D:\sybase-ase-11_0_3_3-6_i386.part2D:\sybase-ase-11_0_3_3-6_i386.part2D:\sybase-ase-11_0_3_3-6_i386.part2D:\sybase-ase-11_0_3_3-6_i386.part2D:\sybase-ase-11_0_3_3-6_i386.part2

    sybase-ase-11_0_3_3-6_i386.part1

    sybase-ase-11_0_3_3-6_i386.part1sybase-ase-11_0_3_3-6_i386.part1sybase-ase-11_0_3_3-6_i386.part1sybase-ase-11_0_3_3-6_i386.part1sybase-ase-11_0_3_3-6_i386.part1

    sybase ase for linux 12.5安装

    Sybase ASE for Linux 12.5 安装指南 本文档旨在指导用户如何在 RedHat AS 5 上安装 Sybase ASE for Linux 12.5。 installation process covers the creation of a Sybase directory, setting up the user and ...

    sybase ASE12.5.4 for SUSElinux10安装手册

    - 添加以下行来设置 `LANG` 和 `LD_POINTER_GUARD` 环境变量,以防后续操作中出现 `segmentation fault` 错误。 ```bash LANG=C export LD_POINTER_GUARD=1 ``` 9. **重启服务器**: - 重启服务器使所有设置...

    Sybase_ASE157_Client_Win64_Unofficial.txt

    此安装包的下载有效日期至:2020.12.31 ...Sybase ASE 这个仅仅是安装文件包,不包括EE及SBE的授权,如需要EE、SBE的授权请联系sybase,安装包的DE、XE用于学习是可以的,下载此包前,请先确认你的系统支持安装此ASE。

    在LINUX下安装 Sybase ASE 11.0.3.3

    在Linux环境下安装Sybase Adaptive Server Enterprise (ASE) 11.0.3.3是一个涉及多个步骤和技术细节的过程。Sybase ASE是Sybase公司推出的一款高性能的企业级数据库管理系统,其版本11.0.3.3是Sybase ASE 11系列中的...

    Sybase ASE 15.0简体中文技术参考手册.7z

    SybaseASE15.0 快速安装指南_Linux.pdf SybaseASE15.0 快速安装指南_Win.pdf SybaseASE15.0 查询处理器.pdf SybaseASE15.0 的新增功能.pdf SybaseASE15.0 系统管理指南_第1券.pdf SybaseASE15.0 系统管理指南_第2券....

    Sybase_ASE1502_linx86_32.7z

    Sybase Adaptive Server Enterprise For Linux 32bit 这个仅仅是安装文件包,不包括EE及SBE的授权,如需要EE、SBE的授权请联系sybase,安装包的DE...下载此包前,请先参考 ASE安装指南,避免你的系统无法安装此sybase。

    Centos 6.2下安装Sybase ASE-15_0

    在本文中,我们将深入探讨如何在CentOS 6.2操作系统上安装Sybase ASE-15_0。Sybase ASE(Adaptive Server Enterprise)是一款高效的企业级关系型数据库管理系统,常用于大型企业环境,提供高性能的数据存储和处理...

    Centos 安装sybase ASE-15 详细操作步骤

    在本教程中,我们将深入探讨如何在CentOS操作系统上安装Sybase Adaptive Server Enterprise(ASE)15,这是一个高性能的企业级数据库管理系统。以下是安装过程的详细步骤,以及可能遇到的问题和解决方案,以及所需的...

    SybaseASE12.5.2安装参考手册.doc

    Sybase ASE 12.5.2 安装参考手册 本手册旨在以图文方式,step by step 地描述在 Linux...本手册为 Sybase ASE 12.5.2 安装提供了详细的指导,涵盖了 Linux 安装、Sybase ASE 安装、基本配置和用户数据库的建立等方面。

    x64_linux下Sybase ASE15.7(4之1)

    Sybase ASE数据库最新版15.7, 64位linux版,可装于SuSE11, RedhatELS5.5, Ubuntu10.0.4 共4个包,这是第一个包。需要用7zip解压。

    Sybase_ASE_12.5_for_Windows安装手册

    Sybase ASE 12.5 for Windows安装手册

    Sybase ASE ODBC Driver 下载

    **Sybase ASE ODBC Driver 下载** Sybase ASE(Adaptive Server Enterprise)ODBC(Open Database Connectivity)驱动程序是连接到Sybase ASE数据库的关键组件,它允许应用程序通过标准的ODBC接口与Sybase数据库...

    Sybase_ASE_12.5.0_for_Windows安装手册

    - 在Windows NT环境下,Sybase ASE 可以直接安装。 - 在Windows 2000环境下,需要按照以下步骤准备: - 创建一个临时目录(例如:`c:\asa125_install`),并将所有安装文件复制到此目录。 - 修改`shared-1_0\jre...

    Sybase ASE for Linux安装过程及安全配置讲解

    这篇文章详细介绍了Sybase ASE for Linux的安装过程及安全配置方法,更多内容请参考下文: 在各种操作系统中,Linux已经流行。因此,越来越多的主流数据库厂商将它们的产品移植到Linux操作系统平台,例如Sybase、...

    Spotlight_on_Sybase_ASE_keygen.

    Spotlight_on_Sybase_ASE_keygen.Spotlight_on_Sybase_ASE_keygen.Spotlight_on_Sybase_ASE_keygen.Spotlight_on_Sybase_ASE_keygen.Spotlight_on_Sybase_ASE_keygen.Spotlight_on_Sybase_ASE_keygen.Spotlight_on_...

    SYBASE_ASE12.5_for_Solaris.doc

    SYBASE_ASE12.5_for_Solaris

    sybase11.92和12.5的资料

    里面有几本sybase的书籍,喜欢的朋友可以下载 ase12.5.pdf dtm.pdf sybase11.9.2.pdf 第一卷T-SQL块.pdf 第二卷命令.pdf 第三卷sybase系统过程.pdf 第四卷系统表.pdf

Global site tag (gtag.js) - Google Analytics