Home » Databases » Sybase » ASE » ASE 12.5.x (64bit) and ASE 15 fail to start using GLIBC

ASE 12.5.x (64bit) and ASE 15 fail to start using GLIBC

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

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

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

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/

Share Button

Comments

  1. MarcC says:

    Thanks for the tip, Jason! This worked for me for 11.0.3.3 on SUSE 10.1 !

    Unfortunately, I didn’t get it to work with the 15.0 installer (the java installer seems to ignore my environment variables and dataserver segfaults as usual…). When I run the same command directly on the cmdline (with env. vars set) it works correctly and builds the master database. Tried setting the env. var in the .profile too, but that didn’t help.

    Oh well, at least good’old 11.0 works 🙂

  2. sergeil says:

    Hello, Jason
    Thanks a lot for good solution.

    It work for FC6, CentOS-5… But now I try to up ASE-12.5.3 Express Edition on Fedora 7. Server is installed and work correct under Fedora Core 6 (with LD_POINTER_GUARD=0), but crash every time under Fedora 7. Maybe there are any solution…

    Some strace log…

    [sergeil@homedesk install]$ cat F7-ASE.trace
    vsnprintf(“Either the config parameter ‘use”…, 466, “Either the config paramet
    er ‘use”…, 0xbfc16e7c) = 245
    write(1, “00:00000:00000:2007/06/23 17:29:”…, 29200:00000:00000:2007/06/23 17:
    29:49.33 kernel Either the config parameter ‘use security services’ is set to 0
    , or ASE does not support use of external security mechanisms on this platform.
    The Security Control Layer will not be initialized. No external security mechani
    sms will be supported.) = 292
    write(3, “00:00000:00000:2007/06/23 17:29:”…, 292) = 292


    memmove(0xbfc16c6f, 0xbfc16adc, 22, 0x935ed10, 0xbfc16c3c) = 0xbfc16c6f
    strcpy(0xbfc16c86, “kernel”) = 0xbfc16c86
    strcat(“kernel”, ” “) = “kernel ”
    vsnprintf(“engine 0, os pid 5463 online\n”, 466, “%sengine %d, os pid %d %s onl ine”…, 0xbfc16e6c) = 30
    write(1, “00:00000:00000:2007/06/23 17:29:”…, 7600:00000:00000:2007/06/23 17:2 9:49.40 kernel engine 0, os pid 5463 online
    ) = 76
    write(3, “00:00000:00000:2007/06/23 17:29:”…, 76) = 76
    gettimeofday(0xbfc16dc8, NULL) = 0
    longjmp(0xb6578a38, 1, 0x935ed10, 0xbfc16e60, 0x8842457
    — SIGSEGV (Segmentation fault) —
    — SIGSEGV (Segmentation fault) —
    +++ killed by SIGSEGV +++

  3. I believe for Fedora Core 6 the LD_POINTER_GUARD needs to be “1”. It is a distribution issue that none of them are consistent. Keep in mind that the Installshield based setup program undefines the LD_POINTER_GUARD so do tell it to build the servers, which will fail but the resource files will be in your $SYBASE/$SYBASE_ASE directory. You can then create the servers with srvbuildres -r (filename).res

    When “1” doesn’t work try “0”.  Hope this helps 🙂

  4. mj says:

    I just hit this problem with sybase ASE 15.0/EBF 13447 ESD#2 on ubuntu 7.04 Feisty Fawn

    Your advice to build/start server with:
    export LD_POINTER_GUARD=0
    helped.

    thx

    –mj

  5. Jim says:

    Many thanks for this tip. Installing Sybase ASE 15.0.2 on CentOS 5.0 gave persistent segmentation faults. Adding LD_POINTER_GUARD=0 to the environment made it work!

    -Jim

  6. Indrajit says:

    @Jim, i tried with ASE 15.0.2 and CentOS 5.0, Added LD_POINTER_GUARD=0 to the environment, still i’m getting segmentation fault. I required to download and install the following packages. compat-libstdc++-296-2.96-132.7.2.i386.rpm
    compat-libstdc++-33-3.2.3-47.3.i386.rpm
    Help Please. TIA.

  7. Bernd says:

    Thank you very much Jason – I got ASE 15 running on OpenSuse 10.1 running srvbuildres.

    LD_POINTER_GUARD=1 for Suse

    Cheers, Bernd

  8. hexes says:

    Hello, i’v try to install ASE 12.5.4 2159 (EBF 16800 ESD#10) x86_64 (64-bit) on Gentoo linux, and LD_POINTER_GUARD doesn’t help me.
    When i try to create backupserver it crash with seg fault.
    Any ideas?
    I use gcc-4.3.4, glibc-2.10.1-r1, kernel 2.6.31-gentoo-r6 x86_64

  9. jetbright says:

    Hi,

    I need to run sybase-11.0.3.3 or 11.9.2 on centos5.

    Because the glibc-2.5-24 of centos5 is too newer for sybase-11 and the known “seg fault” problem, I make a plan to install and run sybase11 in a chroot jail on centos5.

    And in the chroot jail, there is a glibc-2.2.93 from Redhat8.0.

    I’ve get success once (sybase11.0.3.3 running ok ), I deleted the virtual machine since I thought all things were ok.

    But after that, I’ve never succeeded and I still got the “segmentation fault” when booting the sybase server.

    I think that something detail was important in that success, but I didn’t notice it.

    Any help would be greatly appreciated.

    Here’s my steps:

    >>>On Redhat8.0:

    (1)Install and run a sybase-11.0.3.3 instance. All things are ok.
    # ldd $SYBASE/bin/dataserver
    /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40013000)
    libm.so.6 => /lib/i686/libm.so.6 (0x4001a000)
    libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

    >>>On CentOS5:
    (2)Make a chroot jail:/home/dbroot. In the jail, there are these dirs:
    /bin, /lib, /sbin, /var/lib/rpm, /usr/lib, /usr/bin, /dev, /proc, /sys, /tmp
    mount -o bind /proc /home/dbroot/proc
    mount -o bind /dev /home/dbroot/dev
    mount -o bind /sys /home/dbroot/sys

    (3)Move these dirs with all their subdirs & files from Redhat8.0 to CentOS jail(/home/dbroot):
    /bin, /lib, /sbin, /var/lib/rpm, /usr/lib, /usr/bin

    (4)Configure /etc/chroot.conf and /etc/pam.d/login to make sybase loginning into jail.

    (5)In the jail, install sybase11
    # chroot /home/dbroot
    # ldconfig
    # rpm -ivh sybase-11.0.3.3.rpm
    # ldd /opt/sybase/bin/dataserver
    /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x006a4000)
    libm.so.6 => /lib/i686/libm.so.6 (0x00446000)
    libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x005d3000)

    All seems to be right, the dataserver is based on just the same libraries as those on Redhat8.0.

    (6)Login as sybase, of cause it’s into $jail/opt/sybase(/home/dbroot/opt/sybase) now.

    $ export LD_POINTER_GUARD=0 (LD_POINTER_GUARD=1 is tried also, no help)
    $ sybinit

    I still get the “segmentation fault” when trying to boot the server.

    It’s so unreasonable!
    Login this jail, the /lib that sybase can find only is in jail($jail/lib).
    And the only glibc that sybase can base on is the glibc-2.2.93 in $jail/lib.
    It’s impossible for sybase to find glibc-2.5-24 of CentOS5 out of the jail.

    Then, what’s wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect