PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Gregory Riggs <greg at nmia dot com>
Subject: Segfault problem with DBD::Sybase and Apache::ASP
Date: Mar 23 1999 2:34PM

Hello,

  I was just curious if anyone else has tried to use DBD::Sybase within a
perl script that is being run by an Apache Server with mod_perl via the
Apache::ASP or HTML::Embperl perl modules? 

  I'm working on web development using the Sybase Adaptive Server for
Linux and ASP (Active Server Pages) using an Apache web server on a Redhat
Linux platform. 

  However, when I try to use DBD::Sybase, it causes the Apache http server
to crash with a segfault. 

  If I use DBD::Sybase from a command line perl script, it works fine with
no problems.  If I use Sybase::CTlib from within an Apache::ASP perl
script web page, it works fine also, so for now I plan to use
Sybase::CTlib. 

  I built DBD::Sybase and sybperl as shared dynamic link loading modules. 
I was careful to build both the perl executable and the apache executable
without linking in -ldb or -lndbm libraries because of the library
conflict problem.  Also, I did link in -linsck when building the sybperl
and DBD::Sybase modules. 

  Please see below for the versions of the software I am using, my simple
test program, and a stack dump of what happens when I try to run it.

Thanks,
Greg Riggs
greg@nmia.com

------------ software versions -------------------------------------------

Redhat Linux 5.2, Linux Kernel 2.2.3
Server: Apache/1.3.4 (Unix) ApacheJServ/1.0b3 PHP/3.0.7 mod_perl/1.18
mod_ssl/2.2.5 SSLeay/0.9.0b
Perl Version 5.005_02, Apache-ASP-0.08, HTML-Embperl-1.2b4
DBI-1.06, DBD-Sybase-0.13, sybperl-2.10
sybase-ase-11.0.3.3-1.i386.rpm

-------- sample Apache::ASP web page / perl script -----------------------


DBD::Sybase Test

DBD::Sybase Test

<% use strict; use DBI; my $user = "sa"; my $passwd = ""; my $server = "iron"; my $dbh = DBI->connect("dbi:Sybase:server=$server", $user, $passwd); $dbh->disconnect(); %> ----- stack trace ------ cut here ------------------------------------- [root@iron bin]# gdb httpd GNU gdb 4.17.0.4 with Linux/x86 hardware watchpoint and FPU support Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... (no debugging symbols found)... (gdb) run -X Starting program: /usr1/local/apache/bin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x816cb0b in net_close () (gdb) where #0 0x816cb0b in net_close () #1 0x4053c557 in np_io_close () #2 0x40545327 in ct__tds_closeconn () #3 0x405453bd in ct_tds_close () #4 0x4054f283 in ct__chkpt_close () #5 0x4054ccdb in ct__api_async_force_close () #6 0x4054f2d4 in ct__api_close () #7 0x4054f3d1 in ct_close () #8 0x40524a2c in syb_db_disconnect () #9 0x405218e7 in XS_DBD__Sybase__db_disconnect () #10 0x40518345 in XS_DBI_dispatch () #11 0x820c92a in Perl_pp_entersub () #12 0x82363da in Perl_runops_standard () #13 0x81ddbad in perl_call_sv () #14 0x80865aa in perl_call_handler () #15 0x8085fbd in perl_run_stacked_handlers () #16 0x8084f5d in perl_handler () #17 0x8129d2f in ap_invoke_handler () #18 0x813ca15 in ap_some_auth_required () #19 0x813ca74 in ap_process_request () #20 0x81348d9 in ap_child_terminate () #21 0x8134a7c in ap_child_terminate () #22 0x8134bd7 in ap_child_terminate () #23 0x81351b4 in ap_child_terminate () #24 0x81359e7 in main () (gdb) ----------------- cut here -------------------------------