[Buildbot-devel] IntegrityError on postgresql, "claimed_at" violates not-null constraint

Benoît Allard benoit at aeteurope.nl
Fri Sep 21 09:53:16 UTC 2012


Hi there,

I just realized, the following message is filling up my postgresql logs for the past month, last two logs together are almost a Gig, only with this message ... And nothing in the twisted.log.

2012-08-24 11:37:10 CEST ERROR:  null value in column "claimed_at" violates not-null constraint
2012-08-24 11:37:10 CEST STATEMENT:  INSERT INTO buildrequest_claims DEFAULT VALUES
2012-08-24 11:37:10 CEST ERROR:  null value in column "claimed_at" violates not-null constraint
2012-08-24 11:37:10 CEST STATEMENT:  INSERT INTO buildrequest_claims DEFAULT VALUES
2012-08-24 11:37:10 CEST ERROR:  null value in column "claimed_at" violates not-null constraint
2012-08-24 11:37:10 CEST STATEMENT:  INSERT INTO buildrequest_claims DEFAULT VALUES
2012-08-24 11:37:10 CEST ERROR:  null value in column "claimed_at" violates not-null constraint
2012-08-24 11:37:10 CEST STATEMENT:  INSERT INTO buildrequest_claims DEFAULT VALUES
2012-08-24 11:37:10 CEST ERROR:  null value in column "claimed_at" violates not-null constraint
2012-08-24 11:37:10 CEST STATEMENT:  INSERT INTO buildrequest_claims DEFAULT VALUES

Looks like, ``buildbot.process.Builder.maybeStartBuild`` has an infinite loop.

This function calls ``buildbot.db.BuildRequestsConnectorComponent.claimBuildRequests`` which (in our case) (wrongly) raises an ``AlreadyClaimedError``. And then try again.

Inside that ``claimBuildRequests``, we detect the ``AlreadyClaimedError`` based on presence of ``sa.exc.IntegrityError``, or ``sa.exc.ProgrammingError``. The case I'm having is demonstrating that this is way too much, and that IntegrityErrors also happen in other cases.

I have no idea why the claimed_at is empty in this case.

Looks like restarting the master silent it (at least for the moment).

Does someone already has a fix in the pipeline for this ?

Regards,
Benoît.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6467 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20120921/43998f1b/attachment.bin>


More information about the devel mailing list