Skip Menu |

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

Report information
The Basics
Id: 20268
Status: resolved
Priority: 0/
Queue: DBD-Unify

People
Owner: Nobody in particular
Requestors: alan [...] okeefeconsulting.com.au
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.31
  • 0.42
  • 0.50
  • 0.60
Fixed in: (no value)



Subject: DBD::Unify won't attach to database on AIX 5.3 platform
I am attempting to get DBD::Unify working under perl 5.8.8 on AIX 5.3 with Unify DS 7.2 and DBI 1.51 DBD::Unify compiles without error, however, if I attempt to connect to the database, I get the error: -59 Could not attach to shared memory at required address This occurs in both the test scripts and in a small script I wrote, which works on our HP platform. I have tried changing the SHMOFFSET values as suggested in the Unify error manual, but nothing changes.
From: H.Merijn Brand
On Mon Jul 03 23:47:45 2006, guest wrote: Show quoted text
> I am attempting to get DBD::Unify working under perl 5.8.8 on AIX 5.3 > with Unify DS 7.2 and DBI 1.51 > DBD::Unify compiles without error, however, if I attempt to connect to > the database, I get the error: > > -59 Could not attach to shared memory at required address > > This occurs in both the test scripts and in a small script I wrote, > which works on our HP platform. > > I have tried changing the SHMOFFSET values as suggested in the Unify > error manual, but nothing changes.
I don't think that this is or would be a DBD::Unify problem, as the connection is pure E/SQL. It's not SHMOFFSET that should be checked, but SHMID. Then try to use DBI's trace functionality, which is also used by DBD::Unify --8<--- #!/usr/bin/perl use strict; use warnings; use DBI; DBI->trace (9); my $dbh = DBI->connect ("DBI:Unify:", "", "PUBLIC", { uni_verbose => 99 }) or die "Cannot connect: ". $DBI->errstr; -->8--- As the documentation states: The connect call will result in statements like: CONNECT; SET CURRENT SCHEMA TO PUBLIC; -- if auth = "PUBLIC" SET TRANSACTION SCAN LEVEL 7; -- if attr has { uni_scanlevel => 7 } You could try to create yourself a test.ec that executes these statements and see where that goes wrong. I don't have any DS-7.x databases anymore. Only DS-8. So I cannot test myself. I currently have several versions of DB-8 on HP-UX (11.00, 11iv1, 11iv2) and AIX (4.3.3, 5.2.0) in both 32bit and 64bit ports, and the 64bit build on AIX 5.2 has no serious problem: # perl Makefile.PL Configuring DBD::Unify ... Link (L)ocal-only, (R)emote-only, or (B)oth? [L/r/b] > L System: perl5.008008 aix UNIFY: /pro/asql/v83KAB Database Version: 38 Revision: 8.3K Nap Option: SELECT Operating System: AIX 2 5 0006038C4C00 Using DBI 1.51 (for perl 5.008008 on aix-64all) installed in /pro/lib/ perl5/site_perl/5.8.8/aix-64all/auto/DBI/ Writing Makefile for DBD::Unify # make : : ld -b64 -bhalt:4 -bexpall -G -bnoentry -lc -L/usr/local/ppc64/lib64 - L/pro/local/lib Unify.o dbdimp.o ulib/ACCELL.a ulib/libuse.a ulib/ libudsul.a ulib/libusul.a -L/pro/asql/v83KAB/nlib -lm -lgcc -o blib/ arch/auto/DBD/Unify/Unify.so \ \ ld: 0711-224 WARNING: Duplicate symbol: SQLCODE ld: 0711-224 WARNING: Duplicate symbol: sql_lastsig ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. chmod 755 blib/arch/auto/DBD/Unify/Unify.so cp Unify.bs blib/arch/auto/DBD/Unify/Unify.bs chmod 644 blib/arch/auto/DBD/Unify/Unify.bs Manifying blib/man3/DBD::Unify.3 # make test PERL_DL_NONLAZY=1 /pro/bin/perl "-MExtUtils::Command::MM" "- e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-pod..........ok t/00-podc.........ok t/01-base.........ok t/02-connect......ok t/03-general......ok t/04-long.........skipped all skipped: DBD::Unify does not (yet) support binary/text t/05-reauth.......skipped all skipped: No tests here yet. Please investigate t/10-dbi-drv......ok t/11-dbi-dbh......ok 2/21 unexpectedly succeeded TODO PASSED tests 14-15 t/12-dbi-sth......ok t/20-uni-basic....ok t/21-uni-regex....ok t/27-uni-max......To disable future max tests: setenv DBD_UNIFY_SKIP_27 1 t/27-uni-max......ok t/30-reconnect....ok t/40-info.........ok t/99-done.........ok All tests successful (2 subtests UNEXPECTEDLY SUCCEEDED), 2 tests skipped. Passed TODO Stat Wstat TODOs Pass List of Passed ------------------------------------------------------------------------ ------- t/11-dbi-dbh.t 2 2 14-15 Files=16, Tests=2700, 15 wallclock secs ( 5.39 cusr + 0.91 csys = 6.30 CPU) #
From: Alan O'Keefe
Thanks for the reply. I have attached my little test perl program with it's trace output. Apart from the database returning a -59 error on connect, everything else appears to be OK. I have also written a little E/SQL program as you suggested, and it works correctly, (I have attached this as well "aok.ec"). Could this be caused by me using gcc instead of the IBM compiler for perl and DBD::Unify ? Regards Alan
Download aok.ec
application/octet-stream 529b

Message body not shown because it is not plain text.

Download aok1.err
application/octet-stream 5.3k

Message body not shown because it is not plain text.

#!/usr/local/bin/perl use strict; use warnings; use DBI; DBI->trace (9); my $dbh = DBI->connect ("DBI:Unify:", "", "PUBLIC", { uni_verbose => 99 }) or die "Cannot connect: ". DBI->errstr;
Subject: Re: [rt.cpan.org #20268] DBD::Unify won't attach to database on AIX 5.3 platform
Date: Tue, 4 Jul 2006 16:59:49 +0200
To: bug-DBD-Unify [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Tue, 4 Jul 2006 09:23:45 -0400 (EDT), "Guest via RT" <bug-DBD-Unify@rt.cpan.org> wrote: Show quoted text
> I have attached my little test perl program with it's trace output. > Apart from the database returning a -59 error on connect, everything > else appears to be OK. > > I have also written a little E/SQL program as you suggested, and it > works correctly, (I have attached this as well "aok.ec").
How 'bout this: --8<--- #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <include/rhlierr.h> int main (int argc, char *argv[]) { USTATUS status; (void)fprintf (stderr, "DBPATH = '%s'\n", getenv ("DBPATH")); EXEC SQL CONNECT; (void)fprintf (stderr, "After connect, sqlcode = %d\n", SQLCODE); /* Problem number 22960: 2nd Connect to same database fails */ if (SQLCODE == -254) SQLCODE = UENORM; if (SQLCODE == UENORM) printf ("Connected to database\n"); else printf ("(%d) %s\n", SQLCODE, ufchmsg (SQLCODE, &status)); return (0); } /* main */ -->8--- That is the smallest and closest to what I can get to the real code Is $DBPATH set? is it set to where file.db resides? Show quoted text
> Could this be caused by me using gcc instead of the IBM compiler for > perl and DBD::Unify ?
Unlikely I think. -- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11, & 11.23, SuSE 10.0, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org http://mirrors.develooper.com/hpux/ http://www.test-smoke.org http://www.goldmark.org/jeff/stupid-disclaimers/
From: Alan O'Keefe
No luck; 13 [obelix] prod % ./aok1 DBPATH = '/db' After connect, sqlcode = 0 Connected to database 14 [obelix] prod % Yep, DBPATH is set, I'm wondering if it is an AIX 5.3 issue. Here is the output when I create the Makefile; 10 [obelix] prod % perl Makefile.PL Configuring DBD::Unify ... Link (L)ocal-only, (R)emote-only, or (B)oth? [L/r/b] > L System: perl5.008008 aix UNIFY: /apps/unify/ds72ac Database Version: 38 Revision: 7.2A Nap Option: SELECT Machine: IBM Risc/System 6000 Operating System: AIX 1 5 005370A14C00 Checking if your kit is complete... Looks good Using DBI 1.51 (for perl 5.008008 on aix) installed in /usr/local/lib/perl5/site_perl/5.8.8/aix/auto/DBI/ Writing Makefile for DBD::Unify 11 [obelix] prod % I will also attach the build and test output. Regards Alan On Tue Jul 04 11:05:26 2006, h.m.brand@xs4all.nl wrote: Show quoted text
> On Tue, 4 Jul 2006 09:23:45 -0400 (EDT), "Guest via RT" > <bug-DBD-Unify@rt.cpan.org> wrote: >
> > I have attached my little test perl program with it's trace output. > > Apart from the database returning a -59 error on connect, everything > > else appears to be OK. > > > > I have also written a little E/SQL program as you suggested, and it > > works correctly, (I have attached this as well "aok.ec").
> > How 'bout this: > --8<--- > #include <unistd.h> > #include <stdlib.h> > #include <stdio.h> > #include <ctype.h> > #include <string.h> > > #include <include/rhlierr.h> > > int main (int argc, char *argv[]) > { > USTATUS status; > > (void)fprintf (stderr, "DBPATH = '%s'\n", getenv ("DBPATH")); > > EXEC SQL > CONNECT; > > (void)fprintf (stderr, "After connect, sqlcode = %d\n", SQLCODE); > /* Problem number 22960: 2nd Connect to same database fails */ > if (SQLCODE == -254) SQLCODE = UENORM; > > if (SQLCODE == UENORM) > printf ("Connected to database\n"); > else > printf ("(%d) %s\n", SQLCODE, ufchmsg (SQLCODE, &status)); > > return (0); > } /* main */ > -->8--- > > That is the smallest and closest to what I can get to the real code > Is $DBPATH set? is it set to where file.db resides? >
> > Could this be caused by me using gcc instead of the IBM compiler for > > perl and DBD::Unify ?
> > Unlikely I think. >
Download DBD-build
application/octet-stream 18.2k

Message body not shown because it is not plain text.

From: Alan O'Keefe
Hi there I think that this problem is actually related to linking DBD::Unify, the default SHMOFFSET for AIX is 512M, it appears that the program data area goes past the 512M offset, and it states in the gcc documentation that you can't attach shared memory at an address already marked as data area. Having said that, I have tried increasing the SHMOFFSET and quite a few different linker options, with no luck so far. Do you know anything about the values set in LDDLFLAGS in the Makefile ? These values appear to come from the Perl Config.pm. Anyway, I'll keep plugging away. Regards Alan On Tue Jul 04 11:05:26 2006, h.m.brand@xs4all.nl wrote: Show quoted text
> On Tue, 4 Jul 2006 09:23:45 -0400 (EDT), "Guest via RT" > <bug-DBD-Unify@rt.cpan.org> wrote: >
> > I have attached my little test perl program with it's trace output. > > Apart from the database returning a -59 error on connect, everything > > else appears to be OK. > > > > I have also written a little E/SQL program as you suggested, and it > > works correctly, (I have attached this as well "aok.ec").
> > How 'bout this: > --8<--- > #include <unistd.h> > #include <stdlib.h> > #include <stdio.h> > #include <ctype.h> > #include <string.h> > > #include <include/rhlierr.h> > > int main (int argc, char *argv[]) > { > USTATUS status; > > (void)fprintf (stderr, "DBPATH = '%s'\n", getenv ("DBPATH")); > > EXEC SQL > CONNECT; > > (void)fprintf (stderr, "After connect, sqlcode = %d\n", SQLCODE); > /* Problem number 22960: 2nd Connect to same database fails */ > if (SQLCODE == -254) SQLCODE = UENORM; > > if (SQLCODE == UENORM) > printf ("Connected to database\n"); > else > printf ("(%d) %s\n", SQLCODE, ufchmsg (SQLCODE, &status)); > > return (0); > } /* main */ > -->8--- > > That is the smallest and closest to what I can get to the real code > Is $DBPATH set? is it set to where file.db resides? >
> > Could this be caused by me using gcc instead of the IBM compiler for > > perl and DBD::Unify ?
> > Unlikely I think. >
Subject: Re: [rt.cpan.org #20268] DBD::Unify won't attach to database on AIX 5.3 platform
Date: Mon, 10 Jul 2006 10:57:23 +0200
To: bug-DBD-Unify [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Mon, 10 Jul 2006 01:47:46 -0400 (EDT), "Guest via RT" <bug-DBD-Unify@rt.cpan.org> wrote: Show quoted text
> > Queue: DBD-Unify > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=20268 > > > Hi there > > I think that this problem is actually related to linking DBD::Unify, the > default SHMOFFSET for AIX is 512M, it appears that the program data area > goes past the 512M offset, and it states in the gcc documentation that > you can't attach shared memory at an address already marked as data area. > > Having said that, I have tried increasing the SHMOFFSET and quite a few > different linker options, with no luck so far.
I'm just using it with IBM's vac/xlc, and never tried with gcc. Show quoted text
> Do you know anything about the values set in LDDLFLAGS in the Makefile ?
I know about these flags, but I have no thoughts about how they would relate to using gcc with shared mamory Show quoted text
> These values appear to come from the Perl Config.pm. > > Anyway, I'll keep plugging away.
-- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11, & 11.23, SuSE 10.0, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org http://mirrors.develooper.com/hpux/ http://www.test-smoke.org http://www.goldmark.org/jeff/stupid-disclaimers/
From: Alan O'Keefe
Hi there I have finally figured it out, I need to have perl load using the "Very Large Address Space" Model, proof of this is if I set the environment variable: LDR_CNTRL=0x080000000/dsa The dbi program can connect to the database. I am in the process of re-compiling perl itself with this flag, so I don't have to use the environment variable and run ALL programs in this model. Thanks for your assistance. Regards Alan On Mon Jul 10 04:57:50 2006, h.m.brand@xs4all.nl wrote: Show quoted text
> On Mon, 10 Jul 2006 01:47:46 -0400 (EDT), "Guest via RT" > <bug-DBD-Unify@rt.cpan.org> wrote: >
> > > > Queue: DBD-Unify > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=20268 > > > > > Hi there > > > > I think that this problem is actually related to linking DBD::Unify, the > > default SHMOFFSET for AIX is 512M, it appears that the program data area > > goes past the 512M offset, and it states in the gcc documentation that > > you can't attach shared memory at an address already marked as data
area. Show quoted text
> > > > Having said that, I have tried increasing the SHMOFFSET and quite a few > > different linker options, with no luck so far.
> > I'm just using it with IBM's vac/xlc, and never tried with gcc. >
> > Do you know anything about the values set in LDDLFLAGS in the Makefile ?
> > I know about these flags, but I have no thoughts about how they would
relate Show quoted text
> to using gcc with shared mamory >
> > These values appear to come from the Perl Config.pm. > > > > Anyway, I'll keep plugging away.
>
Subject: Re: [rt.cpan.org #20268] DBD::Unify won't attach to database on AIX 5.3 platform
Date: Tue, 11 Jul 2006 11:02:34 +0200
To: bug-DBD-Unify [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Mon, 10 Jul 2006 21:53:47 -0400 (EDT), "Guest via RT" <bug-DBD-Unify@rt.cpan.org> wrote: Show quoted text
> > Queue: DBD-Unify > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=20268 > > > Hi there > > I have finally figured it out, I need to have perl load using the "Very > Large Address Space" Model, proof of this is if I set the environment > variable: > LDR_CNTRL=0x080000000/dsa > The dbi program can connect to the database.
Great to hear. Would you be able to create a patch for the perl distribution to README.aix? I will apply it to the development branch, which will then integrate to the maintenance releases. Show quoted text
> I am in the process of re-compiling perl itself with this flag, so I > don't have to use the environment variable and run ALL programs in this > model. > > Thanks for your assistance.
Thanks for your persistence! Show quoted text
> Regards > Alan > > On Mon Jul 10 04:57:50 2006, h.m.brand@xs4all.nl wrote:
> > On Mon, 10 Jul 2006 01:47:46 -0400 (EDT), "Guest via RT" > > <bug-DBD-Unify@rt.cpan.org> wrote: > >
> > > > > > Queue: DBD-Unify > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=20268 > > > > > > > Hi there > > > > > > I think that this problem is actually related to linking DBD::Unify, the > > > default SHMOFFSET for AIX is 512M, it appears that the program data area > > > goes past the 512M offset, and it states in the gcc documentation that > > > you can't attach shared memory at an address already marked as data > > > area. > > > > > > Having said that, I have tried increasing the SHMOFFSET and quite a few > > > different linker options, with no luck so far.
> > > > I'm just using it with IBM's vac/xlc, and never tried with gcc. > >
> > > Do you know anything about the values set in LDDLFLAGS in the Makefile ?
> > > > I know about these flags, but I have no thoughts about how they would > > relate to using gcc with shared mamory > >
> > > These values appear to come from the Perl Config.pm. > > > > > > Anyway, I'll keep plugging away.
-- H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/) using & porting perl 5.6.2, 5.8.x, 5.9.x on HP-UX 10.20, 11.00, 11.11, & 11.23, SuSE 10.0, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org http://mirrors.develooper.com/hpux/ http://www.test-smoke.org http://www.goldmark.org/jeff/stupid-disclaimers/