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
--