SCM

[#1010830] DataException at DataReader.Close

View Trackers | Bugs | Download .csv | Monitor

Date:
2010-05-27 10:11
Priority:
3
State:
Open
Submitted by:
Andreas Graf (andyg)
Assigned to:
Nobody (None)
Npgsql Version:
2.0.9
Category:
Group:
Resolution:
None
Summary:
DataException at DataReader.Close

Detailed description
Information
===========

In my Application I have 2 threads (GUI and on unvisible for concurrent user check)
It is posible, that both of them collect or change data in same database.
In order to implement it I have 2 different connnections to the database.
Sometimes I become a DataException if one of threads close DataReader after read some data from database.

I have tested different versions of .NET 2.0 provider. It looks like it should be one of the changes from version 2.0.9. (with 2.0.8 I can't reproduce it)

Connections
===========

Connection1:
BackendProtocolVersion Version3 {2} Npgsql.ProtocolVersion
CommandTimeout 20 Integer
ConnectionLifeTime 15 Integer
ConnectionString "HOST=127.0.0.1;PORT=5540;PROTOCOL=3;DATABASE=MyData;USER ID=MyUser;PASSWORD="MyPass";SSL=False;SSLMODE=Disable;TIMEOUT=15;SEARCHPATH=;POOLING=True;CONNECTIONLIFETIME=15;MINPOOLSIZE=1;MAXPOOLSIZE=20;SYNCNOTIFICATION=False;COMMANDTIMEOUT=20;ENLIST=False;PRELOADREADER=False;USEEXTENDEDTYPES=False;INTEGRATED SECURITY=False;COMPATIBLE=2.0.9.0;ENCODING=UNICODE" String
ConnectionTimeout 15 Integer
Container Nothing System.ComponentModel.IContainer
Database "MyData" String
DataSource "127.0.0.1" String
FullState Open {1} System.Data.ConnectionState
Host "127.0.0.1" String
+ NpgsqlCompatibilityVersion {System.Version} System.Version
Port 5540 Integer
+ PostgreSqlVersion {System.Version} System.Version
PreloadReader False Boolean
ProcessID 1724 Integer
ServerVersion "8.4.1" String
Site Nothing System.ComponentModel.ISite
SSL False Boolean
State Open {1} System.Data.ConnectionState
SyncNotification False Boolean
UseExtendedTypes False Boolean

Connection2:
BackendProtocolVersion Version3 {2} Npgsql.ProtocolVersion
CommandTimeout 20 Integer
ConnectionLifeTime 15 Integer
ConnectionString "HOST=127.0.0.1;PORT=5540;PROTOCOL=3;DATABASE=MyData;USER ID=MyUser;PASSWORD="MyPass";SSL=False;SSLMODE=Disable;TIMEOUT=15;SEARCHPATH=;POOLING=True;CONNECTIONLIFETIME=15;MINPOOLSIZE=1;MAXPOOLSIZE=20;SYNCNOTIFICATION=False;COMMANDTIMEOUT=20;ENLIST=False;PRELOADREADER=False;USEEXTENDEDTYPES=False;INTEGRATED SECURITY=False;COMPATIBLE=2.0.9.0;ENCODING=UNICODE" String
ConnectionTimeout 15 Integer
Container Nothing System.ComponentModel.IContainer
Database "MyData" String
DataSource "127.0.0.1" String
FullState Open {1} System.Data.ConnectionState
Host "127.0.0.1" String
+ NpgsqlCompatibilityVersion {System.Version} System.Version
Port 5540 Integer
+ PostgreSqlVersion {System.Version} System.Version
PreloadReader False Boolean
ProcessID 4744 Integer
ServerVersion "8.4.1" String
Site Nothing System.ComponentModel.ISite
SSL False Boolean
State Open {1} System.Data.ConnectionState
SyncNotification False Boolean
UseExtendedTypes False Boolean

StackTrace
==========

bei Npgsql.StringRowReaderV3.AbandonShip() in C:\projects\Npgsql2\src\Npgsql\NpgsqlAsciiRow.cs:Zeile 124.
bei Npgsql.StringRowReaderV3.SkipOne() in C:\projects\Npgsql2\src\Npgsql\NpgsqlAsciiRow.cs:Zeile 132.
bei Npgsql.RowReader.Skip(Int32 count) in C:\projects\Npgsql2\src\Npgsql\NpgsqlRow.cs:Zeile 448.
bei Npgsql.RowReader.Dispose() in C:\projects\Npgsql2\src\Npgsql\NpgsqlRow.cs:Zeile 478.
bei Npgsql.ForwardsOnlyRow.Dispose() in C:\projects\Npgsql2\src\Npgsql\NpgsqlRow.cs:Zeile 199.
bei Npgsql.CachingRow.Dispose() in C:\projects\Npgsql2\src\Npgsql\NpgsqlRow.cs:Zeile 115.
bei Npgsql.ForwardsOnlyDataReader.set_CurrentRow(NpgsqlRow value) in C:\projects\Npgsql2\src\Npgsql\NpgsqlDataReader.cs:Zeile 1217.
bei Npgsql.ForwardsOnlyDataReader.GetNextResponseObject() in C:\projects\Npgsql2\src\Npgsql\NpgsqlDataReader.cs:Zeile 1163.
bei Npgsql.ForwardsOnlyDataReader.CleanUp(Boolean finishedMessages) in C:\projects\Npgsql2\src\Npgsql\NpgsqlDataReader.cs:Zeile 1337.
bei Npgsql.ForwardsOnlyDataReader.Close() in C:\projects\Npgsql2\src\Npgsql\NpgsqlDataReader.cs:Zeile 1348.
bei MySource...

Source of one of Threads
========================

Statement = "SELECT ..."

DataReader = Command.ExecuteReader()

Do While DataReader.Read
....
Loop

DataReader.Close() <-- Exception

Followup

Message
Date: 2010-06-01 01:14
Sender: Josh Cooley

We have concurrency issues in several of the recent releases. You may have encountered an issue with the protocol under load. See this discussion.
http://pgfoundry.org/forum/message.php?msg_id=1006079

This has been fixed in CVS, please test this if possible.

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge