Search found 34 matches

by bmarotta
Thu 30 Sep 2010 20:30
Forum: dotConnect for Oracle
Topic: DataLoadOptions weird behaviour
Replies: 9
Views: 1675

Issue not fixed

This issue is not fixed or it added a new bug.

Please check post:

http://www.devart.com/forums/viewtopic.php?t=19126
by bmarotta
Thu 30 Sep 2010 18:19
Forum: dotConnect for Oracle
Topic: EntityRef new behaviour or Regression?
Replies: 6
Views: 1430

EntityRef new behaviour or Regression?

Hi,

we are testing our application with the new 5.70.170 version and we found a different behavior from the last version we were using (5.60.124).

We have a class like this

Code: Select all

[Table(Name = @"PUMA_WORKITEM")]
    public partial class WorkItem : INotifyPropertyChanging, INotifyPropertyChanged    {
...
[Association(Name="Task_WorkItem", Storage="_Task", ThisKey="TaskId", IsForeignKey=true)]
        public Task Task
(...)
On the old version, while trying to check if a workitem had a Task, we did:

Code: Select all

if (item.Task == null)
On the new version, this always return false, even if the TaskId is set for the workitem. We found that one of the reasons may be because in another part of the code we did:

Code: Select all

context.WorkItems.LoadWith(n => n.Task)
In this case the (item.Task == null) works correctly. We think somehow, the Devart engine is saving the LoadWith information.

If we delete the above mentioned LoadWith statement than everything works fine. The problem is that we cannot go throughout our entire code deleting the LoadWith or always adding the LoadWith...

Could you please check this?
by bmarotta
Thu 30 Sep 2010 11:18
Forum: LinqConnect (LINQ to SQL support)
Topic: SubmitChanges() call does not return
Replies: 28
Views: 10356

Hi Stanislav,

thanks for the response. We will migrate the version. Not sure if this is related, but we did a dump on the IIS process and we found another source for the hanging.

There is a thread that is starting a Transaction and the response for this transaction does not comeback (or takes too long) and this blocks all other context calls.

First question:

Can I set a timeout for the opening of a connection?


Second question:

Is there a better way to handle the transaction on the context?

Please note that I have a multi-threaded application. I am sure that we are not sharing context among threads an that, at each time, I have only one context per thread.

Nevertheless, due to the code architecture, I may do a commit, than launch some new queries, than do another commit and even execute some sql command directly. We need to have these commits and command execution on the same transaction.


Here is the code for the Transaction. It is implemented on the context partial class:

Code: Select all

        public bool BeginTransaction()
        {
            if (InTransaction)
                return false;
            // Assure we have a connection
            Connection.Open();
            Transaction = Connection.BeginTransaction();
            return true;
        }
This is the call stack for the thread:

4283e014 7c82860c [HelperMethodFrame_1OBJ: 4283e014] System.Threading.WaitHandle.WaitOneNative(Microsoft.Win32.SafeHandles.SafeWaitHandle, UInt32, Boolean, Boolean)
4283e0c0 792b68af System.Threading.WaitHandle.WaitOne(Int64, Boolean)
4283e0dc 7928aa17 System.Threading.WaitHandle.WaitOne(System.TimeSpan, Boolean)
4283e0f8 27fec04d Devart.Common.Utils.WaitOne(System.Threading.WaitHandle, System.TimeSpan, Boolean)
4283e108 1d90d6a4 Devart.Common.DbConnectionPool.GetObject(Devart.Common.DbConnectionBase)
4283e13c 1d90d410 Devart.Common.DbConnectionFactory.a(Devart.Common.DbConnectionBase)
4283e16c 1d90d2e5 Devart.Common.DbConnectionClosed.Open(Devart.Common.DbConnectionBase)
4283e19c 1d90d0b1 Devart.Common.DbConnectionBase.Open()
4283e1cc 1d90c5ce Devart.Data.Oracle.OracleConnection.Open()
4283e1fc 25efcc97 IssuanceEngine.Data.PumaDataContext.BeginTransaction()
4283e208 25efc486 IssuanceEngine.BusinessObjects.Workflow.WorkflowObjectProcessThread.ProcessNextItem(IssuanceEngine.BusinessObjects.Workflow.PersistentWorkflowExecution)
4283e2a4 25ef9cd0 IssuanceEngine.BusinessObjects.BaseProcessThread`1+c__DisplayClass4[[System.__Canon, mscorlib]].b__3()
4283e2ac 25ef767d IssuanceEngine.BusinessObjects.BaseProcessThread`1[[System.__Canon, mscorlib]].CallProtected(System.Action)
4283e2f0 25ef941a IssuanceEngine.BusinessObjects.BaseProcessThread`1[[System.__Canon, mscorlib]].ProcessQueue()
4283e350 25ef807f IssuanceEngine.BusinessObjects.BaseProcessThread`1[[System.__Canon, mscorlib]].MainLoop()
4283e430 2458a29a IssuanceEngine.BusinessObjects.ThreadManagement.ThreadManager+c__DisplayClass11.b__10()
4283e45c 792d6d66 System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
4283e468 792f5681 System.Threading.ExecutionContext.runTryCode(System.Object)
4283e898 79e71b4c [HelperMethodFrame_PROTECTOBJ: 4283e898] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
4283e900 792f5577 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
4283e91c 792e01c5 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
4283e934 792d6ce4 System.Threading.ThreadHelper.ThreadStart()
4283eb60 79e71b4c [GCFrame: 4283eb60]
4283ee50 79e71b4c [ContextTransitionFrame: 4283ee50]
OS Thread Id: 0x1c0 (46)

I have 37 other threads waiting for the lock release. Here are some call stack examples for the other blocking threads:

0258f64c 7c82860c [GCFrame: 0258f64c]
0258f788 7c82860c [HelperMethodFrame: 0258f788] System.Threading.Monitor.Enter(System.Object)
0258f7dc 27b8b746 Devart.Common.DbConnectionPool.DoomObject()
0258f810 27b8b40c Devart.Common.DbConnectionPoolGroup.a(Devart.Common.DbConnectionPool)
0258f860 27b8b10c Devart.Common.DbConnectionPoolGroup.a(System.Object)
0258f8a4 792a842f System.Threading._TimerCallback.TimerCallback_Context(System.Object)
0258f8ac 792e01ef System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
0258f8c4 792a839b System.Threading._TimerCallback.PerformTimerCallback(System.Object)
0258fa50 79e71b4c [GCFrame: 0258fa50]
0258fb9c 79e71b4c [ContextTransitionFrame: 0258fb9c]

-----------------------


2799ec58 7c82860c [HelperMethodFrame: 2799ec58] System.Threading.Monitor.Enter(System.Object)
2799ecac 1d90d51f Devart.Common.DbConnectionPool.GetObject(Devart.Common.DbConnectionBase)
2799ece0 1d90d410 Devart.Common.DbConnectionFactory.a(Devart.Common.DbConnectionBase)
2799ed10 1d90d2e5 Devart.Common.DbConnectionClosed.Open(Devart.Common.DbConnectionBase)
2799ed40 1d90d0b1 Devart.Common.DbConnectionBase.Open()
2799ed70 1d90c5ce Devart.Data.Oracle.OracleConnection.Open()
2799eda0 2478c01a Devart.Data.Linq.Provider.ConnectionManager.GetOpenConnection()
2799edc8 2478bec8 Devart.Data.Linq.Provider.ConnectionManager.b(Devart.Data.Linq.Provider.IConnectionUser)
2799eddc 2478b2cc Devart.Data.Linq.Provider.DataProvider.a(b, System.Object[], System.Object[], System.Object)
2799eee0 2478b256 Devart.Data.Linq.Provider.DataProvider.a(b, System.Object[])
2799eef4 2478b1b3 Devart.Data.Linq.Provider.DataProvider+b.a(Devart.Data.Linq.Provider.b, System.Object[])
2799ef08 244e6e92 Devart.Data.Linq.DataQuery`1[[System.__Canon, mscorlib]].i()
2799ef1c 799d5f87 System.Collections.Generic.List`1[[System.__Canon, mscorlib]]..ctor(System.Collections.Generic.IEnumerable`1)
2799ef54 6c2fc036 System.Linq.Enumerable.ToList[[System.__Canon, mscorlib]](System.Collections.Generic.IEnumerable`1)
2799ef64 25ef85e7 IssuanceEngine.BusinessObjects.Workflow.WorkflowDispatcherProcessThread.GetNextItemsToProcess()
2799efb4 25ef828e IssuanceEngine.BusinessObjects.BaseProcessThread`1+c__DisplayClass1[[System.__Canon, mscorlib]].b__0()
2799efc0 25ef767d IssuanceEngine.BusinessObjects.BaseProcessThread`1[[System.__Canon, mscorlib]].CallProtected(System.Action)
2799f004 25ef7ea5 IssuanceEngine.BusinessObjects.BaseProcessThread`1[[System.__Canon, mscorlib]].MainLoop()
2799f0e4 2458a29a IssuanceEngine.BusinessObjects.ThreadManagement.ThreadManager+c__DisplayClass11.b__10()
2799f110 792d6d66 System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
2799f11c 792e01ef System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
2799f134 792d6ce4 System.Threading.ThreadHelper.ThreadStart()
2799f360 79e71b4c [GCFrame: 2799f360]
2799f650 79e71b4c [ContextTransitionFrame: 2799f650]

------------------------------


42c1e1c8 7c82860c [HelperMethodFrame: 42c1e1c8] System.Threading.Monitor.Enter(System.Object)
42c1e21c 1d90d51f Devart.Common.DbConnectionPool.GetObject(Devart.Common.DbConnectionBase)
42c1e250 1d90d410 Devart.Common.DbConnectionFactory.a(Devart.Common.DbConnectionBase)
42c1e280 1d90d2e5 Devart.Common.DbConnectionClosed.Open(Devart.Common.DbConnectionBase)
42c1e2b0 1d90d0b1 Devart.Common.DbConnectionBase.Open()
42c1e2e0 1d90c5ce Devart.Data.Oracle.OracleConnection.Open()
42c1e310 2478c01a Devart.Data.Linq.Provider.ConnectionManager.GetOpenConnection()
42c1e338 2478bec8 Devart.Data.Linq.Provider.ConnectionManager.b(Devart.Data.Linq.Provider.IConnectionUser)
42c1e34c 2478b2cc Devart.Data.Linq.Provider.DataProvider.a(b, System.Object[], System.Object[], System.Object)
42c1e450 2478b256 Devart.Data.Linq.Provider.DataProvider.a(b, System.Object[])
42c1e464 2478b1b3 Devart.Data.Linq.Provider.DataProvider+b.a(Devart.Data.Linq.Provider.b, System.Object[])
42c1e478 27b8c8c9 Devart.Data.Linq.DataQuery`1[[System.Int32, mscorlib]].i()
42c1e488 6cc3e2a0 System.Collections.Generic.HashSet`1[[System.Int32, mscorlib]].UnionWith(System.Collections.Generic.IEnumerable`1)
42c1e4b4 6cc3dc2b System.Collections.Generic.HashSet`1[[System.Int32, mscorlib]]..ctor(System.Collections.Generic.IEnumerable`1, System.Collections.Generic.IEqualityComparer`1)
42c1e4cc 6cc3dbd4 System.Collections.Generic.HashSet`1[[System.Int32, mscorlib]]..ctor(System.Collections.Generic.IEnumerable`1)
42c1e4dc 27fb3085 IssuanceEngine.Web.Manager.WorkItemManager.GetBusinessUnitIds(Puma.Transfer.WorkItems.WorkItemFilterScope, Int32)
42c1e550 27fb2ad8 IssuanceEngine.Web.Manager.WorkItemManager.FilterWorkItems(Puma.Transfer.WorkItems.WorkItemFilter, Puma.Transfer.WorkItems.DisplayedWorkItemInformation[])
42c1e580 27fb286c IssuanceEngine.Web.Manager.WorkItemManager.GetWorkItems(Puma.Transfer.WorkItems.WorkItemFilter, Puma.Transfer.WorkItems.DisplayedWorkItemInformation[])

Thanks for the support,
by bmarotta
Wed 29 Sep 2010 11:44
Forum: LinqConnect (LINQ to SQL support)
Topic: SubmitChanges() call does not return
Replies: 28
Views: 10356

I am getting the same error using doracle version 5.60.124. This mostly occurs when running on the IIS server. It is very hard to simulate under development environment.

I see that the error is not on the Devart Linq side, but what astonish me is that the CommandTimeout from the context does not work for this case.

We did also check and there is no deadlock on the database. Actually, when there is a deadlock on the database, the command timeout doesn't work either. Guess, if the CommandTimeout works at all...

Also, the log suggestion will never work as the SubmitChanges never returns, and the log can only be seen after the SubmitChanges has finished.

This is really urgent and it is jeopardizing our full application.