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: "Frederick Yawe" <fred dot yawe at worldnet dot att dot net>
Subject: Re: Memory read errors while using BCP
Date: Feb 2 1998 7:44PM

Michael,

I made a few changes and my script seems to run OK using DBlib.
I will use DBlib for now.

Thanks.

Fred.

This is a more detailed debug output (Using CTlib)
====================================
main::DBload(CAdbload.pl:147):             if ($BCP->bcp_sendrow(@my_rows)
== FAIL)
main::DBload(CAdbload.pl:148):                {
Sybase::DBlib::FAIL((eval 22):1):
main::DBload(CAdbload.pl:154):             ++$count;
main::DBload(CAdbload.pl:155):             if (($count % 10000) == 0)
main::DBload(CAdbload.pl:156):                {
Sybase::CTlib::CS_SUCCEED((eval 16):1):
1:
main::DBload(CAdbload.pl:127):      print "\n In $restype";

 In 4046main::DBload(CAdbload.pl:128):      next
if(!$dbh->ct_fetchable($restype));
Sybase::CTlib::ct_fetchable(c:\perl\lib\site/Sybase/CTlib.pm:865):
865:        $fetchable{$_[1]};
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:73):
73:         my $error = join '', @_;
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:74):
74:         my $mess = "";
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:75):
75:         my $i = 1 + $CarpLevel;
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:76):
76:         my ($pack,$file,$line,$sub,$hargs,$eval,$require);
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:77):
77:         my (@a);
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:78):
78:         while (do { { package DB; @a = caller($i++) } } ) {
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:78):
78:         while (do { { package DB; @a = caller($i++) } } ) {
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:125):
125:        my $msg = \($mess || $error);
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:126):
126:        $$msg =~ tr/\0//d;
Sybase::CTlib::ct_results(c:\perl\lib/Carp.pm:127):
127:        $$msg;
Signal SEGV: Invalid argument

----------
> From: Michael Peppler 
> To: SYBPERL-L@trln.lib.unc.edu
> Subject: Re: Memory read errors while using BCP
> Date: Saturday, January 31, 1998 12:51 AM
> 
> Frederick Yawe wrote:
> > 
> > Cousins,  Help!!!!!!!!!!!!!!!!!!!!!
> > 
> > I have a script that I wrote using Sybperl 2.09 (Windows NT) that gives
me
> > a SEGV error in
> > debug or a windows NT pop up screen "memory at location .... could not
be
> > read"
> > immediately after BCPing the second table (my main loop and a partial
debug
> > output is
> > attached).
> > 
> > What is bothering me is that it fails after the second or third table
but
> > works OK for the
> > first 2 tables. It can not be an insufficient memory issue because I
have
> > lots of memory on this
> > machine and I have tried to limit the # of rows returned to 10 (using
set
> > rowcount 10)
> > but I still get the same problem.
> > 
> > I have tried to run the same script on a different machine (with same
> > sybperl software) and
> > I still get the same error.
> > 
> > I am not doing anything revolutionary, all I am doing is this
> > 1. run a stored procedures on different servers (using ct_execute)
> > 2. apply business rules to each row
> > 3. Use BCP api to load data to a central sql server.
> 
> What you are doing is mixing a little bit of everything in your
> script. This should still work, but you're using CTlib to retrieve
> the data, then you create a Sybase::BCP object, but use the
> straight bcp calls from DBlib instead.
> 
> All of this *should* work, but I suspect that there is a problem
> buried down there somewhere.
> 
> Could you try to only use the Sybase::DBlib module and see if that
> fixes the problem (ie also use the DBlib module for the select
> side of things)?
> 
> I'm starting to suspect a memory access bug in Sybase::CTlib, but
> I don't have any specifics yet.
> 
> Michael
> -- 
> Michael Peppler       -||-  Data Migrations Inc.
> mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler