Skip Menu |

This queue is for tickets about the DBD-DB2 CPAN distribution.

Report information
The Basics
Id: 44505
Status: resolved
Priority: 0/
Queue: DBD-DB2

People
Owner: opendev [...] us.ibm.com
Requestors: aff [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.61
  • 1.7
Fixed in: (no value)



Subject: Segmentation fault unless db2profile is sourced
Segmentation fault unless db2profile is sourced with DB2/LINUX 9.1.0 Summary: For DBD::DB2 1.3 and prior, attempts to connect without having the environment sourced resulted in an error "Total Environment allocation failure". Similar attempts using DBD::DB2 later than 1.3 results in segmentation fault. Environment: Linux 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux perl, v5.8.8 built for i486-linux-gnu-thread-multi DBI 1.601 Database server = DB2/LINUX 9.1.0 Steps to reproduce: Run the single line below as a user that has *not* sourced db2profile like this . /home/db2inst1/sqllib/db2profile # install DBD-DB2-1.3 $ perl -wle 'use DBD::DB2; print $DBI::VERSION; print $DBD::DB2::VERSION; DBI->connect()' 1.601 1.3 DBI connect('test','db2inst1',...) failed: Total Environment allocation failure! Did you set up your DB2 client environment? at -e line 1 # install DBD-DB2-1.61 $ perl -wle 'use DBD::DB2; print $DBI::VERSION; print $DBD::DB2::VERSION; DBI->connect()' 1.601 1.61 Segmentation fault # install DBD-DB2-1.7 $ perl -wle 'use DBD::DB2; print $DBI::VERSION; print $DBD::DB2::VERSION; DBI->connect()' 1.601 1.7 Segmentation fault $ All 3 driver versions above work as expected if 'db2profile' is sourced as expected: . /home/db2inst1/sqllib/db2profile --
RT-Send-CC: opendev [...] us.ibm.com
Hi Andreas In DBD-DB2 1.6 we had changed the error handling completely. Also, it included warning handling to have a better tracing facility. I appreciate you raising the bug and providing us such usecase. I have rectified the problem and would make a release 1.71 in a day or two. I am attaching the modified dbdimp.c with this one. Please verify that it works correctly in your environment. -- Thanks Tarun Pasrija IBM OpenSource Application Development Team India Software Labs, Bangalore (India)

Message body is not shown because it is too large.

From: aff [...] cpan.org
On Wed Mar 25 13:07:44 2009, IBMTORDB2 wrote: Show quoted text
> I am attaching the modified dbdimp.c with this one. Please verify > that it works correctly in your environment.
Hi Tarun, Your updated dbdimp.c resolved the issue. Thanks. $ perl -wle 'use DBD::DB2; print $DBI::VERSION; print $DBD::DB2::VERSION; DBI->connect()' 1.601 1.7.44505 DBI connect('test','db2inst1',...) failed: Total Environment allocation failure! Did you set up your DB2 client environment? at -e line 1 Best regards, Andreas --
RT-Send-CC: opendev [...] us.ibm.com
Thanks Andreas Closing this issue. -- Thanks Tarun Pasrija IBM OpenSource Application Development Team India Software Labs, Bangalore (India)