Closed Bug 305836 Opened 19 years ago Closed 18 years ago

DBD::Pg 1.43 has a bug which causes Bugzilla to fail

Categories

(Bugzilla :: Documentation, defect)

2.20
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 322960

People

(Reporter: skip.slugger, Assigned: mkanat)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: 

checksetup.pl stopped with the following error:

Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Checking for         DBD::Pg (v1.31)   ok: found v1.43
Checking for      PostgreSQL (v7.03.0000) Checking for      PostgreSQL
(v7.03.0000) ok: found v07.03.0900

Adding new table bz_schema ...
Initializing the new Schema storage...
Assertion *retlen+1 <= resultant_len+2 failed: file "quote.c", line 319 at
Bugzilla/DB.pm line 811.
Attempt to free non-existent shared string 'lla/DB.pm line 811.
'.

A console I have that is running as the postgres user showed this error:

ERROR:  Relation "bz_schema" does not exist



Reproducible: Always

Steps to Reproduce:
1. Extract bugzilla-2.20rc2
2. Edit localconfig
3. Create a new postgresql database using the command:
createdb -O bzdbadmin -e bugzilla
4. Run ./checksetup.pl

Actual Results:  
checksetup.pl stopped with the following error:

Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Checking for         DBD::Pg (v1.31)   ok: found v1.43
Checking for      PostgreSQL (v7.03.0000) Checking for      PostgreSQL
(v7.03.0000) ok: found v07.03.0900

Adding new table bz_schema ...
Initializing the new Schema storage...
Assertion *retlen+1 <= resultant_len+2 failed: file "quote.c", line 319 at
Bugzilla/DB.pm line 811.
Attempt to free non-existent shared string 'lla/DB.pm line 811.
'.

A console I have that is running as the postgres user showed this error:

ERROR:  Relation "bz_schema" does not exist


Expected Results:  
I expected to see no errors and have the database setup properly for use with
bugzilla.

This is an installation attempt on an RHEL3 WS. 
PostgreSQL v07.03.0900
Perl v5.8.0 built for i386-linux-thread-multi
This specific error keeps happening when initializing the schema in PostgreSQL.
 Every few tables created, there is an error.  For example, here the error
occurs when creating the versions table:


Checking for      PostgreSQL (v7.03.0000) Checking for      PostgreSQL
(v7.03.0000) ok: found v07.03.0900

Adding new table tokens ...
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'tokens_pkey' for
table 'tokens'
Adding new table user_group_map ...
Adding new table versions ...
Assertion *retlen+1 <= resultant_len+2 failed: file "quote.c", line 319 at
Bugzilla/DB.pm line 897.


What I do then is rerun checksetup.pl, which results in the following error
about the table versions already existing:


Adding new table versions ...
DBD::Pg::db do failed: ERROR:  Relation 'versions' already exists
 [for Statement "CREATE TABLE versions (
        value   varchar(64) NOT NULL,
        product_id      integer NOT NULL
)"] at Bugzilla/DB.pm line 502
       
Bugzilla::DB::_bz_add_table_raw('Bugzilla::DB::Pg=HASH(0xa8d1770)','versions')
called at Bugzilla/DB.pm line 477
       
Bugzilla::DB::bz_add_table('Bugzilla::DB::Pg=HASH(0xa8d1770)','versions') called
at Bugzilla/DB.pm line 331
        Bugzilla::DB::bz_setup_database('Bugzilla::DB::Pg=HASH(0xa8d1770)')
called at Bugzilla/DB/Pg.pm line 209
        Bugzilla::DB::Pg::bz_setup_database('Bugzilla::DB::Pg=HASH(0xa8d1770)')
called at ./checksetup.pl line 1592


If I then use psql to drop the versions table, I can rerun checksetup.pl and it
will continue.  Here are the next set of messages and the next error:


Checking for      PostgreSQL (v7.03.0000) Checking for      PostgreSQL
(v7.03.0000) ok: found v07.03.0900

Adding new table versions ...
Adding new table votes ...
Adding new table watch ...
Assertion *retlen+1 <= resultant_len+2 failed: file "quote.c", line 319 at
Bugzilla/DB.pm line 897.


This continued until I finally got to the end of all the table creations, which,
in the end, seemed to all be there, with their proper indexes.
Version: unspecified → 2.20
Unfortunately, what you're experiencing is a bug in DBD::Pg, which should be
fixed in DBD::Pg 1.44. In the mean time, try to install DBD::Pg 1.41 or 1.42.
Assignee: database → mkanat
Status: UNCONFIRMED → NEW
Component: Database → Documentation
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: checksetup.pl new table bz_schema initializing assertion failed quote.c → DBD::Pg 1.43 has a bug which causes Bugzilla to fail
Target Milestone: --- → Bugzilla 2.20
Checking for         DBD::Pg (v1.31)   ok: found v1.43
Checking for      PostgreSQL (v7.03.0000) ok: found v08.00.0100

I have no problem using Bugzilla
Are you sure it's a problem with DBD::Pg and not with PostgreSQL 7 itself?
mkanat, any relation between this bug and bug 322954?
Keywords: relnote
*** Bug 322954 has been marked as a duplicate of this bug. ***
Added to the Bugzilla 2.22 Release Notes in bug 322960. However, I still think I should update the 2.20.x Release Notes to have this information.
We relnoted this in the relnotes for 2.22, and I think that's enough for now.

*** This bug has been marked as a duplicate of 322960 ***
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Actually, PostgreSQL DBD::Pg v1.45 is out that fixes the crashes with this and other problems.  But, v1.43-v1.44 have propblems.
Target Milestone: Bugzilla 2.20 → ---
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.