Centennial apps/desktop bridge, SQL Server and error “The data area passed to a system call is too small.”

11

Dec

Centennial apps/desktop bridge, SQL Server and error “The data area passed to a system call is too small.”

Centennial apps/desktop bridge, SQL Server and error “The data area passed to a system call is too small.”
https://blogs.msdn.microsoft.com/sql_server_team/centennial-appsdesktop-bridge-sql-server-and-error-the-data-area-passed-to-a-system-call-is-too-small/

Source: https://blogs.msdn.microsoft.com/sql_server_team/centennial-appsdesktop-bridge-sql-server-and-error-the-data-area-passed-to-a-system-call-is-too-small/

 

The title of the blog may throw someone off a little. After all, SQL Server is not a centennial app and the error message doesn’t appear to have anything to do with SQL Server. So please bear with us while the whole scenario is explained.

Note: Here is an introduction to Centennial apps/Desktop bridge which may help with the context. The Desktop Bridge was introduced in Windows 10, version 1607. This functionality helps you bring existing desktop apps and add modern experience for Windows 10 users, including possibility of distribution via Microsoft Store if the developer chooses to do so.

Scenario:

1. Install Windows 10 1607 or later on the system.

2. Install SQL Server and enable the SQL Filestream feature (Ref: https://docs.microsoft.com/en-us/sql/relational-databases/blob/enable-and-configure-filestream )

3. Create a database with a filestream container. Ensure that container is hosted on the drive which also hosts the Centennial applications.

4. Install any Centennial application such as MS Office Preview apps or Ubuntu Linux from the Microsoft Store application

5. Launching any Centennial application fails with the following error

Text version:

[Window Title] C:Program FilesWindowsAppsMicrosoft.Office.Desktop.Word_16.8326.2107.0_x86__8wekyb3d8bbweOffice16WINWORD.exe 
[Content] C:Program FilesWindowsAppsMicrosoft.Office.Desktop.Word_16.8326.2107.0_x86__8wekyb3d8bbweOffice16WINWORD.exe 
The data area passed to a system call is too small. 
[OK].

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

clip_image001

Log file output:

2017-10-01 14:52:42.345 = Microsoft.Windows.ApplicationModel.DesktopAppx.ActivityError A_os_bootId=4, A_popSample=100, utc.aId=49E92CF4-3AC3-0002-9FCC-F649C33AD301, utc.flags=213912112, C_data wilActivity.hresult=2147942522, wilActivity.fileName=baseappmodelexe, cmodeldesktopappxlibdesktopappxvfs.cpp, wilActivity.lineNumber=974, wilActivity.module=daxexe, c.dll, , wilActivity.failureType=0, wilActivity.threadId=9068, wilActivity.callContext=PostDesktopActivationAddProcessToContainerCreateContainerConfigureVfs, wilActivity.originatingContextId=2, wilActivity.originatingContextName=PostDesktopActivation, wilActivity.currentContextId=5, wilActivity.currentContextName=ConfigureVfs

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 

So why does this occur?

Simply speaking, this issue occurs due to due to miscommunication between two filter drivers, namely WCNFS (the desktop bridge) and RsFxXXXX.sys driver (filestream system driver). RsFx system driver doesn’t honor flags being passed by WCNFS driver appropriately, which causes startup failure of any Centennial application with the aforementioned error.

Note: this error may also occur for reasons unrelated to SQL Server, so please do try to correlate with the existence RsFx driver as described later.

 

How to identify the problem? 

Following is an example output of fltmc command if there is a filestream container being hosted on a volume. In this case, a filestream container is hosted within some folder on C drive. RsFx driver binds to a volume so you will see host volume being mentioned, not the specific folder. If the centennial app was installed on C drive on this system, it would fail to launch.

PS C:windowssystem32> fltmc instances

Filter                Volume Name                              Altitude        Instance Name       Frame   SprtFtrs  VlStatus
--------------------  -------------------------------------  ------------  ----------------------  -----   --------  --------
RsFx0500              C:                                         41005.00  RsFx0500 MiniFilter Instance    0     00000000
RsFx0500              DeviceMup                                41005.00  RsFx0500 MiniFilter Instance    0     00000000

 

So what next?

Of course, we will provide a fix for this issue in Cumulative updates for SQL Server versions which are still being serviced. They should come out somewhere in Q1 of calendar year 2018. But what are the options to avoid this till then?

Consider following options to avoid this issue for time being:

  • Disable Filestream feature
    •   Go to SQL Server Configuration Manager and open the Properties of the SQL Server instance. Disable FILESTREAM on FILESTREAM tab.
    •   Reboot Windows

Note: if you have a Database which contains Filestream file group, the database won’t be brought online after disabling FILESTREAM. You should carefully consider the implication of disabling the filestream feature completely in case that is being used by some application using the SQL Server in question.

After reboot, you can use fltmc command (requires Admin privilege) to confirm that the RsFx driver is no longer attached to the C drive.

c:>fltmc instances -v C:

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

RsFx**** should not be listed in the output.

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 

Tejas Shah

Senior Program Manager | SQL Tiger Team

LinkedIn Twitter

Follow us on Twitter: @mssqltiger | Team Blog: Aka.ms/sqlserverteam