submitChanges call does not return

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
klay
Posts: 2
Joined: Thu 23 Jul 2009 20:28

submitChanges call does not return

Post by klay » Thu 23 Jul 2009 20:35

First, a disclaimer: I have extensive experience with SQL Server, but I'm brand new to both Oracle and dotConnect for Oracle.

When I try to use the LINQ to Oracle features to insert new records into me Oracle database, the SubmitChanges() call doesn't return.

Here's the code I'm using to verify this:

Code: Select all

Debug.Print("submitting changes");
context.SubmitChanges();
Debug.Print("changes submitted");
It prints the first line, but doesn't print the second line, and execution seems to hang on the SubmitChanges line. What's worse is I don't get any errors, and I can't use the context.Log() call either, since it must be called after SubmitChanges.

Any ideas?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 24 Jul 2009 14:28

Do you have a possibility to pause the program execution and obtain Call Stack?
If yes, please post it here, this can help us in the investigation.
If possible, please create a smal test project illustrating the issue, and send it to support * devart * com
with the "SubmitChanges() hangs" subject.

frfecn
Posts: 7
Joined: Thu 23 Jul 2009 12:38

Post by frfecn » Wed 29 Jul 2009 12:47

AndreyA,would you please help me check http://www.devart.com/forums/viewtopic.php?t=15417?

JasonRShaver
Posts: 3
Joined: Thu 06 Aug 2009 22:58

Post by JasonRShaver » Thu 06 Aug 2009 23:01

AndreyR wrote:Do you have a possibility to pause the program execution and obtain Call Stack?
If yes, please post it here, this can help us in the investigation.
If possible, please create a smal test project illustrating the issue, and send it to support * devart * com
with the "SubmitChanges() hangs" subject.
I am having the same issues, the Call Stack is just "External Code". When I show that code, I get:

[Managed to Native Transition]
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer = {byte[4096]}, int offset = 0, int size, System.Net.Sockets.SocketFlags socketFlags = None, out System.Net.Sockets.SocketError errorCode = Success) + 0xc4 bytes
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) + 0x20 bytes
System.dll!System.Net.Sockets.NetworkStream.Read(byte[] buffer, int offset, int size) + 0x84 bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.bt.a(byte[] A_0 = {byte[4096]}, int A_1 = 0, int A_2 = 8) + 0x86 bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.bt.a(out byte A_0 = 0) + 0x38 bytes
Devart.Data.Oracle.dll!xc.l.b(byte[] A_0 = {byte[1]}, int A_1 = 0, int A_2 = 1) + 0x88 bytes
Devart.Data.Oracle.dll!xc.l.b() + 0x56 bytes
Devart.Data.Oracle.dll!xc.f.b() + 0x25 bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.bk.b() + 0xc7 bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.t.a(int A_0 = 1, Devart.Data.Oracle.a5 A_1 = a) + 0xb05 bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleCommand.a(System.Data.CommandBehavior A_0 = Default, System.IDisposable A_1 = {Devart.Data.Oracle.t}, int A_2 = 0, int A_3 = 0) + 0x4a8 bytes
Devart.Data.dll!Devart.Common.DbCommandBase.ExecuteDbDataReader(System.Data.CommandBehavior behavior = Default) + 0x14a bytes
System.Data.dll!System.Data.Common.DbCommand.ExecuteReader() + 0xd bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleCommand.ExecuteNonQuery() + 0x41 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.Provider.DataProvider.a(string A_0 = "INSERT INTO MOT.MOT_REGIONS (ID, NAME, ACRONYM, DATECREATED, DATEMODIFIED) VALUES (:p1, :p2, :p3, :p4, :p5) ", System.Collections.Generic.IList A_1 = Count = Cannot evaluate expression because a native frame is on top of the call stack., out System.Data.IDbCommand A_2 = {Devart.Data.Oracle.OracleCommand}) + 0x21a bytes
Devart.Data.Linq.dll!Devart.Data.Linq.v.b(System.Data.Linq.Mapping.MetaType A_0 = {Devart.Data.Linq.Mapping.p}, Devart.Data.Linq.q A_1 = {Devart.Data.Linq.EntityEntry}, bool A_2 = true) + 0x9ee bytes
Devart.Data.Linq.dll!Devart.Data.Linq.x.a(Devart.Data.Linq.h A_0 = {Devart.Data.Linq.EntityEntry}, object A_1 = {Madden.Core.Entities.L2O.Region}, Devart.Data.Linq.ModifiedMemberInfo[] A_2 = {Devart.Data.Linq.ModifiedMemberInfo[0]}, bool A_3 = true) + 0x1a8 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.j.a(Devart.Data.Linq.x A_0 = {Devart.Data.Linq.x}, Devart.Data.Linq.h A_1 = {Devart.Data.Linq.EntityEntry}, bool A_2 = true) + 0x90 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.j.a(Devart.Data.Linq.DataContext A_0 = {Madden.Core.Entities.L2O.DataContext}, System.Data.Linq.ConflictMode A_1 = FailOnFirstConflict) + 0x39a bytes
Devart.Data.Linq.dll!Devart.Data.Linq.j.b(Devart.Data.Linq.DataContext A_0 = {Madden.Core.Entities.L2O.DataContext}, System.Data.Linq.ConflictMode A_1 = FailOnFirstConflict) + 0x32 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.DataContext.SubmitChanges(System.Data.Linq.ConflictMode failureMode = FailOnFirstConflict) + 0x16d bytes
Devart.Data.Linq.dll!Devart.Data.Linq.DataContext.SubmitChanges() + 0x1f bytes

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 07 Aug 2009 09:04

Is the problem reproducible using the latest 5.25.39 build of dotConnect for Oracle?

JasonRShaver
Posts: 3
Joined: Thu 06 Aug 2009 22:58

Post by JasonRShaver » Fri 07 Aug 2009 14:47

AndreyR wrote:Is the problem reproducible using the latest 5.25.39 build of dotConnect for Oracle?
Yup, checked on 5.25.37 and 5.25.39. Same stack trace:

[Managed to Native Transition]
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer = {byte[4096]}, int offset = 0, int size, System.Net.Sockets.SocketFlags socketFlags = None, out System.Net.Sockets.SocketError errorCode = Success) + 0xc4 bytes
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) + 0x20 bytes
[...]

This also happens in Direct and non-direct modes. Here is the stack trace for non-direct:

[Managed to Native Transition]
OciCall.dll!OciDynamicType.a() + 0x46 bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.aq.a(int A_0 = 1, Devart.Data.Oracle.a4 A_1 = a) + 0x108 bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleCommand.a(System.Data.CommandBehavior A_0 = Default, System.IDisposable A_1 = {Devart.Data.Oracle.aq}, int A_2 = 0, int A_3 = 0) + 0x61e bytes
Devart.Data.dll!Devart.Common.DbCommandBase.ExecuteDbDataReader(System.Data.CommandBehavior behavior = Default) + 0x14a bytes
System.Data.dll!System.Data.Common.DbCommand.ExecuteReader() + 0xd bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleCommand.ExecuteNonQuery() + 0x41 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.Provider.DataProvider.a(string A_0 = "INSERT INTO MOT.MOT_REGIONS (ID, NAME, ACRONYM, DATECREATED, DATEMODIFIED) VALUES (:p1, :p2, :p3, :p4, :p5) ", System.Collections.Generic.IList A_1 = Count = Cannot evaluate expression because a native frame is on top of the call stack., out System.Data.IDbCommand A_2 = {Devart.Data.Oracle.OracleCommand}) + 0x21a bytes
Devart.Data.Linq.dll!Devart.Data.Linq.v.b(System.Data.Linq.Mapping.MetaType A_0 = {Devart.Data.Linq.Mapping.p}, Devart.Data.Linq.q A_1 = {Devart.Data.Linq.EntityEntry}, bool A_2 = true) + 0x9ee bytes
Devart.Data.Linq.dll!Devart.Data.Linq.x.a(Devart.Data.Linq.h A_0 = {Devart.Data.Linq.EntityEntry}, object A_1 = {Madden.Core.Entities.L2O.Region}, Devart.Data.Linq.ModifiedMemberInfo[] A_2 = {Devart.Data.Linq.ModifiedMemberInfo[0]}, bool A_3 = true) + 0x1a8 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.j.a(Devart.Data.Linq.x A_0 = {Devart.Data.Linq.x}, Devart.Data.Linq.h A_1 = {Devart.Data.Linq.EntityEntry}, bool A_2 = true) + 0x90 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.j.a(Devart.Data.Linq.DataContext A_0 = {Madden.Core.Entities.L2O.DataContext}, System.Data.Linq.ConflictMode A_1 = FailOnFirstConflict) + 0x39a bytes
Devart.Data.Linq.dll!Devart.Data.Linq.j.b(Devart.Data.Linq.DataContext A_0 = {Madden.Core.Entities.L2O.DataContext}, System.Data.Linq.ConflictMode A_1 = FailOnFirstConflict) + 0x32 bytes
Devart.Data.Linq.dll!Devart.Data.Linq.DataContext.SubmitChanges(System.Data.Linq.ConflictMode failureMode = FailOnFirstConflict) + 0x16d bytes
Devart.Data.Linq.dll!Devart.Data.Linq.DataContext.SubmitChanges() + 0x1f bytes

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 10 Aug 2009 11:22

The problem is that server hangs on executing the command

Code: Select all

INSERT INTO MOT.MOT_REGIONS (ID, NAME, ACRONYM, DATECREATED, DATEMODIFIED) VALUES (:p1, :p2, :p3, :p4, :p5)
Could you please execute this command with parameters using OracleCommand?
The problem can be associated with some trigger.

JasonRShaver
Posts: 3
Joined: Thu 06 Aug 2009 22:58

Post by JasonRShaver » Tue 11 Aug 2009 13:51

AndreyR wrote:The problem is that server hangs on executing the command

Code: Select all

INSERT INTO MOT.MOT_REGIONS (ID, NAME, ACRONYM, DATECREATED, DATEMODIFIED) VALUES (:p1, :p2, :p3, :p4, :p5)
Could you please execute this command with parameters using OracleCommand?
The problem can be associated with some trigger.
Ok, I looked into this further and it seems the issue was with an active lock on the MOT_REGIONS table (it was edited but not committed in TOAD).

I was surprised to find that there was no time-out mechanism built into Oracle/dotConnect, but I am new to Oracle and don't know if that is just how things are in this world.

Thanks for the response and even going so far as to open a help-desk ticket with me. I am not used to that level of support being initiated from a forum post.

Jason R. Shaver

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 13 Aug 2009 12:18

The timeout mechanism is under construction now.
But we cannot provide any timeframe.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 15 Dec 2009 10:07

We have implemented the Default Command Timeout connection parameter in one of the latest builds.

Post Reply