Connecting Balanced Data Distributor outputs programmatically to OleDbDestinations crashes - by Filip Popović

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 770683 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/10/2012 5:56:31 AM
Access Restriction Public


Programmatically generating SSIS packages for transferring data with 1 dataflow: 1 OleDbSource -> 1 Balanced Data Distributor -> multiple outputs to OleDbDestinations with same configuration (destination table, rows per batch and other settings) crashes randomly, regardless of number of packages and number of outputs.

It crashes after successfully creating few packages with described package structure. No exception is caught with try/catch. Application crashes even while debugging within Visual Studio - VS does not even catch exception.  At the moment of crash, message box is displayed: vshost-clr2.exe has stopped working with details:

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	ConsoleApplication1.vshost.exe
  Application Version:	10.0.30319.1
  Application Timestamp:	4ba2084b
  Fault Module Name:	StackHash_7736
  Fault Module Version:	6.0.6001.18538
  Fault Module Timestamp:	4cb73957
  Exception Code:	c0000374
  Exception Offset:	00000000000a7857
  OS Version:	6.0.6001.
  Locale ID:	1033
  Additional Information 1:	7736
  Additional Information 2:	db51d7aa2a2cceb6f6facb10f783553e
  Additional Information 3:	b29f
  Additional Information 4:	f747c08658e6d0cc26be4ac3422a2323

I found no workaround for this problem. None of following was of any use: generating packages using SQL Server dlls directly or using EzPackage; starting new thread for each package; starting new process (.EXE) for each package; creating new ApplicationDomain for each package; changing number of BDD outputs and OleDbDestinations.

Crash occurs on line of code that connects BDD output and OleDbDestination.

Since it crashes randomly, I made no conclusions regarding data types or such.

I've found articles on the Internet suggesting to turn Data Executino Prevention off for my application but Windows tells me that I can't turn DEP off for this application.

Just edited this connect item, here is additional info:
-in x64 and Any CPU configurations of application that creates packages, it crashes after generating two or three pacakge
-in x86 configuration of application that creates packages, it creates much more packages than in x64, and randomly throws AccessViolationException caught by VS:
   at Microsoft.SqlServer.Dts.Runtime.Executables.Add(String moniker)
   at Microsoft.SqlServer.SSIS.EzAPI.EzExecutable.CreateExecutable()
   at Microsoft.SqlServer.SSIS.EzAPI.EzExecutable..ctor(EzContainer parent)
   at Microsoft.SqlServer.SSIS.EzAPI.EzDataFlow..ctor(EzContainer parent)
   at Microsoft.SqlServer.SSIS.EzAPI.EzSrcDF`1..ctor(EzContainer parent)
   at Microsoft.SqlServer.SSIS.EzAPI.EzSrcConnDF`2..ctor(EzContainer parent)
   at Microsoft.SqlServer.SSIS.EzAPI.EzTransformDF`3..ctor(EzContainer parent)
   at Microsoft.SqlServer.SSIS.EzAPI.EzTransDestDF`4..ctor(EzContainer parent)
   at Microsoft.SqlServer.SSIS.EzAPI.EzTransDestConnDF`5..ctor(EzContainer parent)
   at ConsoleApplication1.STGPackage..ctor(String srcSrv, String srcDb, String tblNm, String dstSrv, String dstDb) in c:\app\STGPackage.cs:line 18
   at ConsoleApplication1.Program.GenPkg(String table) in c:\app\Program.cs:line 287
   at ConsoleApplication1.Program.GeneratePackages(String[] args) in c:\app\Program.cs:line 263
   at ConsoleApplication1.Program.Main(String[] args) in c:\app\Program.cs:line 124
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
Sign in to post a comment.
Posted by Filip Popović on 12/19/2012 at 2:46 AM
Hi, thank You for your time so far, please find attached demo solution.
Build configurations (all Debug):
-x32 - working
-x64 and Any CPU - not working, attached project generates between 40-50 packages successfully and then it crashes on the next one. It does not crash on the same package (table) every time. I've tested it with multiple different databases and the same problem persists.
Posted by Microsoft on 12/19/2012 at 1:02 AM
Hi, thank you for providing the dump file. We are unable to successfully reproduce the issue in our environment. If it is possible, can you share some sample code which will help us identify the root cause?
Posted by Filip Popović on 12/7/2012 at 3:43 AM
New dump file is created and uploaded. If You find this file also corrupted, would You like me to try sending minidump instead?
Posted by Microsoft on 12/4/2012 at 9:33 PM
Hi, thanks for your quick turn-around. Unfortunately, the attached zip file is corrupted. Could you please re-upload a new one?
Posted by Filip Popović on 12/2/2012 at 12:37 PM
Please find attached dump file for process run from Visual Studio 2010, debug configuration Any CPU. If You should need anything else, please do not hesitate to contact me.
Posted by Microsoft on 11/30/2012 at 12:45 AM
Hi, thank you for your feedback. Could you please attach a sample package or a dump file, so that we can further investigate the issue accordingly?