Wierd Exception

  • Thread starter Thread starter Alvin Bruney [MVP]
  • Start date Start date
A

Alvin Bruney [MVP]

Anybody with a clue as to what is causing this?

I'm just stumped here. There are no events in the application log so I know
the pool isn't being recycled. My other theory is the provider but I'm
checking here to see if any one has seen this before.


_ASP.dscostcomparison_report_aspx === System.IO.IOException: Unable to read
data from the transport connection. --->
System.Threading.ThreadAbortException: Thread was being aborted. at
System.Net.OSSOCK.recv(IntPtr socketHandle, IntPtr pinnedBuffer, Int32 len,
SocketFlags socketFlags) at System.Net.Sockets.Socket.Receive(Byte[] buffer,
Int32 offset, Int32 size, SocketFlags socketFlags) at
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) --- End of inner exception stack trace --- at
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) at System.IO.Stream.ReadByte() at
ByteFX.Data.MySqlClient.Driver.ReadPacketFromServer() at
ByteFX.Data.MySqlClient.Driver.ReadPacket() at
ByteFX.Data.MySqlClient.Driver.Send(DBCmd cmd, Byte[] bytes) at
ByteFX.Data.MySqlClient.MySqlCommand.ExecuteBatch(Boolean stopAtResultSet)
at ByteFX.Data.MySqlClient.MySqlDataReader.NextResult() at
ByteFX.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at
ByteFX.Data.MySqlClient.MySqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
behavior) at System.Data.Common.DbDataAdapter.FillFromCommand(Object data,
Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet
dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand
command, CommandBehavior behavior) at
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at
ds_cost_comparison_report.dscostcomparison_report.GetTempData(String str,
String& retval) at
ds_cost_comparison_report.dscostcomparison_report.Graft(String str) at
ds_cost_comparison_report.dscostcomparison_report.GetData(String query) at
ds_cost_comparison_report.dscostcomparison_report.CreateView() at
ds_cost_comparison_report.dscostcomparison_report.BtnCreateReport_Command(Object
sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs
e) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at
System.Web.UI.Page.ProcessRequestMain()

There is some funky stuff going on in the graft routine that you should be
aware of. Graft needs to get data from multiple tables. The idea is to
create a temporary merge table from the required tables and query this merge
table for data. The mysql provider cannot directly create merge tables so
this is the work-around which entails shelling out to command prompt from
the web app and invoking a perl script via command prompt passing it the
various tables i need to merge. The script is able to create the merge
tables in the database. When the merge is done, the script returns a code to
the dos window and the merge table name. The webpage fires a query at the
temp table to retrieve data once every second for 60 seconds. If the merge
table is ready, data is returned, otherwise it times out and busy message is
displayed to the user. This is when the error occurs. The current fix is to
restart the application pool. About once a week, we will experience this
condition - typically under increased loads.
 
It is hard to comment on this without understanding your architecture
clearly, which I tried to from the below, but this seems to be one of those
things that will take me 1/2 hour of in person explanation with block
diagrams and leave me with a double migraine.

But sounds like a thread-safety issue. Instance members of
System.Net.Sockets.Socket are not threadsafe, .. you might even have a
code-rentrancy problem. .. again extremely hard to comment without
understanding the bigger picture with block diagrams.

- Sahil Malik
Independent Consultant
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik


Alvin Bruney said:
Anybody with a clue as to what is causing this?

I'm just stumped here. There are no events in the application log so I know
the pool isn't being recycled. My other theory is the provider but I'm
checking here to see if any one has seen this before.


_ASP.dscostcomparison_report_aspx === System.IO.IOException: Unable to read
data from the transport connection. --->
System.Threading.ThreadAbortException: Thread was being aborted. at
System.Net.OSSOCK.recv(IntPtr socketHandle, IntPtr pinnedBuffer, Int32 len,
SocketFlags socketFlags) at System.Net.Sockets.Socket.Receive(Byte[] buffer,
Int32 offset, Int32 size, SocketFlags socketFlags) at
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) --- End of inner exception stack trace --- at
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
size) at System.IO.Stream.ReadByte() at
ByteFX.Data.MySqlClient.Driver.ReadPacketFromServer() at
ByteFX.Data.MySqlClient.Driver.ReadPacket() at
ByteFX.Data.MySqlClient.Driver.Send(DBCmd cmd, Byte[] bytes) at
ByteFX.Data.MySqlClient.MySqlCommand.ExecuteBatch(Boolean stopAtResultSet)
at ByteFX.Data.MySqlClient.MySqlDataReader.NextResult() at
ByteFX.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at
ByteFX.Data.MySqlClient.MySqlCommand.System.Data.IDbCommand.ExecuteReader(Co
mmandBehavior
behavior) at System.Data.Common.DbDataAdapter.FillFromCommand(Object data,
Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet
dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand
command, CommandBehavior behavior) at
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at
ds_cost_comparison_report.dscostcomparison_report.GetTempData(String str,
String& retval) at
ds_cost_comparison_report.dscostcomparison_report.Graft(String str) at
ds_cost_comparison_report.dscostcomparison_report.GetData(String query) at
ds_cost_comparison_report.dscostcomparison_report.CreateView() at
ds_cost_comparison_report.dscostcomparison_report.BtnCreateReport_Command(Ob
ject
sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs
e) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String
eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at
System.Web.UI.Page.ProcessRequestMain()

There is some funky stuff going on in the graft routine that you should be
aware of. Graft needs to get data from multiple tables. The idea is to
create a temporary merge table from the required tables and query this merge
table for data. The mysql provider cannot directly create merge tables so
this is the work-around which entails shelling out to command prompt from
the web app and invoking a perl script via command prompt passing it the
various tables i need to merge. The script is able to create the merge
tables in the database. When the merge is done, the script returns a code to
the dos window and the merge table name. The webpage fires a query at the
temp table to retrieve data once every second for 60 seconds. If the merge
table is ready, data is returned, otherwise it times out and busy message is
displayed to the user. This is when the error occurs. The current fix is to
restart the application pool. About once a week, we will experience this
condition - typically under increased loads.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
 
Back
Top