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:
- CR 450004 - XP Server and Backupserver (64bit)
- 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/





January 9th, 2007 at 11:23 pm
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
June 25th, 2007 at 2:06 pm
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, 0×935ed10, 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, 0×935ed10, 0xbfc16e60, 0×8842457
— SIGSEGV (Segmentation fault) —
— SIGSEGV (Segmentation fault) —
+++ killed by SIGSEGV +++
June 25th, 2007 at 7:58 pm
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
August 2nd, 2007 at 10:26 am
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
November 14th, 2007 at 6:27 pm
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
December 14th, 2007 at 1:36 am
@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.
April 12th, 2008 at 6:09 am
Thank you very much Jason - I got ASE 15 running on OpenSuse 10.1 running srvbuildres.
LD_POINTER_GUARD=1 for Suse
Cheers, Bernd