[unixODBC-support] Spurious SEGV w/ DBD::ODBC/MSSQL/Perl

Martin J. Evans bohica at ntlworld.com
Fri Jul 1 21:41:25 BST 2011


On 01/07/2011 21:24, eric.berg at barclayscapital.com wrote:
> Hi again. O boy, no end to the fun migrating from Sybase over here.
>
> We’re using Perl 5.12.3/EasySoft on Linux.
>
> Suddenly, some – but definitely not all – jobs of ours that attempt some
> very simple tasks are failing with SIGSEGV errors.
>
> In response to “USE cachedb” we are seeing the folowing errors:
>
> [unixODBC]Changed database context to 'cachedb'.
>
> Caught a SIGSEGV at /usr/lib/perl5/x86_64-linux/DBD/ODBC.pm line 398
>
> $ = eval {...} called from file
> `/usr/lib/perl5/x86_64-linux/DBD/ODBC.pm' line 398
>
> $ = DBD::ODBC::db::ExecDirect('POINT::POINTDBI::db=HASH(0x4c8c280)',
> 'USE cachedb') called from file
> `/usr/lib/perl5/x86_64-linux/DBD/ODBC.pm' line 377
>
> SV = PVMG(0x1491e50) at 0x486c170
>
> REFCNT = 1
>
> FLAGS = (PADMY,SMG,POK,pPOK)
>
> IV = 0
>
> NV = 0
>
> PV = 0x484ead0 "'POINT::POINTDBI::db=HASH(0x4c8c280)'"\0
>
> CUR = 37
>
> LEN = 40
>
> MAGIC = 0x4853af0
>
> MG_VIRTUAL = &PL_vtbl_mglob
>
> MG_TYPE = PERL_MAGIC_regex_global(g)
>
> MG_LEN = -1
>
> And here’s the relevant info from a stack trace.
>
> sigtrap::handler_traceback('SEGV') called at
> /usr/lib/perl5/x86_64-linux/DBD/ODBC.pm line 398

That line number might be useful if we knew which version of DBD::ODBC 
you were using?

> eval {...} called at /usr/lib/perl5/x86_64-linux/DBD/ODBC.pm line 398
>
> DBD::ODBC::db::ExecDirect('\'POINT::POINTDBI::db=HASH(0x1eea5728)\'',
> '\'USE cachedb\'') called at /usr/lib/perl5/x86_64-linux/DBD/ODBC.pm
> line 377
>
> DBD::ODBC::db::do('\'POINT::POINTDBI::db=HASH(0x1eea5728)\'', 'USE
> cachedb') called at /home/batch/lib/site_perl/DEV/CopyClient.pm line 1181
>
> There are plenty of other instances of “USE cachedb” in our batch code
> that executed just fine, but for some reason this one is having issues.
>
> Anything jumpt out at any of you good people?
>
> Thanks for taking a look at this.
>
> Eric

Can you make this happen at will? If so, set DBI_TRACE=15=x.log and 
export it and send the contents of x.log after it happens.

A unixODBC trace might also be useful.

Martin
-- 
Martin J. Evans
Wetherby, UK


More information about the unixODBC-support mailing list