# Thread deadlock activerecord 2.2.2/ruby 1.8.6/postgres win32

**URL:** <https://www.ruby-forum.com/t/thread-deadlock-activerecord-2-2-2-ruby-1-8-6-postgres-win32/155749>\
**Category:** Rails\
**Created:** [December 16, 2008, 10:29am UTC](https://www.ruby-forum.com/t/thread-deadlock-activerecord-2-2-2-ruby-1-8-6-postgres-win32/155749 "2008-12-16T10:29:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@ccd](https://www.ruby-forum.com/u/ccd)\
**Post date:** [December 16, 2008, 10:29am UTC](https://www.ruby-forum.com/t/thread-deadlock-activerecord-2-2-2-ruby-1-8-6-postgres-win32/155749/1 "2008-12-16T10:29:54Z")

</div>

Hello,

I’m trying to run the tests that come with activerecord-2.2.2. I’m using  
PostgreSQL 8.3 with the pg driver. Other details:

ruby version: 1.8.6 build 111  
platform: windows XP SP2  
activerecord version: 2.2.2  
activesupport version: 2.2.2  
pg version: 0.7.9.2008.10.13  
mocha version: 0.9.3

When I run "rake test\_postgresql TEST=test\cases\transactions\_test.rb, I  
get a thread deadlock. The error output is attached.

Some other observations:

- The error only manifests itself when the ruby environment platform is  
windows. The tests work perfectly under Linux (at least, with ruby 1.8.6  
build 114 rather than 111)
- The platform of the PostgreSQL server machine is irrelevant to the  
test outcome.
- Comparing database query logs of a (linux-based) good run with a  
(windows-based) bad run shows no relevant differences in the queries  
being sent to PostgreSQL, until the failure occurs where the windows log  
just stops abruptly.
- The error isn’t the result of a database deadlock.

I also tried this with ruby 1.8.7. This doesn’t give a deadlock error -  
instead it just hangs at the same point.

Any ideas on how to get these tests to run to completion successfully?

Thanks,

Charles D.
