Opened 12 years ago

Closed 11 years ago

#1803 enhancement closed duplicate (duplicate)

unittest using adbapi hang on exit

Reported by: thomasvs Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

I wrote a very simple unit test using adbapi with MySQL. It hangs when running with trial. gdb shows all threads being locked waiting on a semaphore.

I'm attaching the unit test.

The unit test hangs when run with trial under twisted-core 2.4.0 and twisted-core 2.3.0 twisted-2.2.0 seems to run it fine.

Test shows same behaviour with pgdb, but works with pysqlite.

Attachments (1)

test_mysql.py (562 bytes) - added by thomasvs 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by thomasvs

Attachment: test_mysql.py added

comment:1 Changed 12 years ago by thomasvs

Uncommenting the open and close calls on the dbpool makes it work. This is something I only learnt after looking at the unit test for adbapi, and it's not mentioned at all in the HOWTO on using twisted.enterpise.adbapi.

Given that it works in 2.2.0, I would assume this is in fact a regression.

comment:2 Changed 12 years ago by Jean-Paul Calderone

Owner: changed from Glyph to Jonathan Lange

comment:3 Changed 11 years ago by Jonathan Lange

Resolution: duplicate
Status: newclosed

thomasvs, thanks for spending the time to experiment with this bug and provide reproduction -- it helps a great deal.

This bug has also been filed earlier under #1630. Given the popularity of the bug, I'm upgrading the priority of the origianl to 'high'.

I'll add you to the CC field of #1630 if Trac doesn't already.

Thanks again.

comment:4 Changed 7 years ago by <automation>

Owner: Jonathan Lange deleted
Note: See TracTickets for help on using tickets.