Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows Media Server / November 2007

Tip: Looking for answers? Try searching our database.

WMS crashing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
javatopia - 23 Nov 2007 15:35 GMT
Hello,

We have a clean install of Windows Server Enterprise 2003 R2 with WMS
installed. The WMS is updated to 9.1.x. We have a set of custom
authentication, authorization, and context plugins that control access to the
WMS streams. The authentication supports both digest and basic methods.

The plugins, when they get a connection for the first time, put the WMS into
impersonation mode. This is done as a security precaution to reduce the
runtime permissions of the connections but allow WMI privileged access to the
rest of the WMS.

We are continually seeing this error in the event log, since about 11/13/07:

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 1000
Date: 11/21/2007
Time: 2:44:57 AM
User: N/A
Computer: R215G
Description:
Faulting application wmserver.exe, version 9.1.1.3841, stamp 45d69887,
faulting module unknown, version 0.0.0.0, stamp 00000000, debug? 0,
fault address 0x00000000.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 00 70 00 70 00 6c 00 A.p.p.l.
0008: 69 00 63 00 61 00 74 00 i.c.a.t.
0010: 69 00 6f 00 6e 00 20 00 i.o.n. .
0018: 46 00 61 00 69 00 6c 00 F.a.i.l.
0020: 75 00 72 00 65 00 20 00 u.r.e. .
0028: 20 00 77 00 6d 00 73 00 .w.m.s.
0030: 65 00 72 00 76 00 65 00 e.r.v.e.
0038: 72 00 2e 00 65 00 78 00 r...e.x.
0040: 65 00 20 00 39 00 2e 00 e. .9...
0048: 31 00 2e 00 31 00 2e 00 1...1...
0050: 33 00 38 00 34 00 31 00 3.8.4.1.
0058: 20 00 34 00 35 00 64 00 .4.5.d.
0060: 36 00 39 00 38 00 38 00 6.9.8.8.
0068: 37 00 20 00 69 00 6e 00 7. .i.n.
0070: 20 00 75 00 6e 00 6b 00 .u.n.k.
0078: 6e 00 6f 00 77 00 6e 00 n.o.w.n.
0080: 20 00 30 00 2e 00 30 00 .0...0.
0088: 2e 00 30 00 2e 00 30 00 ..0...0.
0090: 20 00 30 00 30 00 30 00 .0.0.0.
0098: 30 00 30 00 30 00 30 00 0.0.0.0.
00a0: 30 00 20 00 66 00 44 00 0. .f.D.
00a8: 65 00 62 00 75 00 67 00 e.b.u.g.
00b0: 20 00 30 00 20 00 61 00 .0. .a.
00b8: 74 00 20 00 6f 00 66 00 t. .o.f.
00c0: 66 00 73 00 65 00 74 00 f.s.e.t.
00c8: 20 00 30 00 30 00 30 00 .0.0.0.
00d0: 30 00 30 00 30 00 30 00 0.0.0.0.
00d8: 30 00 0d 00 0a 00 0.....

Any ideas? The plugins are all written in .NET 2/C#. They only use ActiveX
to do the user impersonation.

We have noticed that the response blob in the basic authentication stream
tends to have bad characters in it, e.g. 0xFFFF at the end of the buffer.
I've written code to strip off this type of bad data, but it is clearly a
problem to deal with.

Any help is greatly appreciated.

- Jake

Signature

Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.

javatopia - 27 Nov 2007 21:24 GMT
Something I've noted about our implementation.

In RC1, I had this code in my context implementations:

static internal string GetStringFromNSSBuffer(INSSBuffer NsBuffer)
{
 uint bufSize;
 string s = null;
 IntPtr pBuf = IntPtr.Zero;
 NsBuffer.GetBufferAndLength(out pBuf,out bufSize);
 byte[] Buf = new byte[bufSize];
 Marshal.Copy(pBuf,Buf,0,(int)bufSize);
 s = Convert.ToBase64String(Buf,0,(int)bufSize);
 return(s);
}

Then in RC2 came the 9.1.x version of the WMS dll, and so I got this code
from this URL:

http://msdn2.microsoft.com/en-us/library/ms745169.aspx

public static string GetStringFromNSSBuffer( INSSBuffer NsBuffer )
{
   uint bufSize;
   IntPtr[] BufArr = { new IntPtr() };
   IntPtr pBuf = Marshal.UnsafeAddrOfPinnedArrayElement( BufArr, 0 );
   NsBuffer.GetBufferAndLength( pBuf, out bufSize );
   string s = Marshal.PtrToStringUni( BufArr[0], (int) bufSize / 2 );
   return s;
}

Could it be that this new code is causing our problems? It's definitly a
memory corruption error because the failures appear in seemingly random areas
where the plugins must interact with COM interop.

Signature

Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.

> Hello,
>
[quoted text clipped - 66 lines]
>
> - Jake
javatopia - 29 Nov 2007 17:23 GMT
Sure enough, when I reverted my GetStringFromNSSBuffer method back to th 9.0
implementation, the wms stabilized. It's been running crash free for over 24
hours now.

Here's my impl again:

static internal string GetStringFromNSSBuffer(INSSBuffer NsBuffer)
       {
           uint bufSize;
           string s = null;
           /* This section seems to crash the WMS server.
            *
           IntPtr[] pBufArray = { new IntPtr() };
           IntPtr pBuf =
Marshal.UnsafeAddrOfPinnedArrayElement(pBufArray,0);
           NsBuffer.GetBufferAndLength(pBuf,out bufSize);
           // s = Marshal.PtrToStringAuto(pBufArray[0],(int)bufSize / 2);
           s = Marshal.PtrToStringUni(pBufArray[0],(int)bufSize / 2);
            */

           /* This was the old WMS method in 9.0.x and it works in the 9.1
version */
           IntPtr pBuf = IntPtr.Zero;
           NsBuffer.GetBufferAndLength(out pBuf,out bufSize); // Changed in
9.1.x
           byte[] Buf = new byte[bufSize];
           Marshal.Copy(pBuf,Buf,0,(int)bufSize);
           s = Convert.ToBase64String(Buf,0,(int)bufSize);
           return (s);
       }

Signature

Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.extremeplannerlive.com
---
If you think it''''s expensive to hire a professional to do the job, wait
until you hire an amateur.

> Something I've noted about our implementation.
>
[quoted text clipped - 101 lines]
> >
> > - Jake
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.