1 Reply Latest reply on Feb 8, 2010 8:44 AM by greg@solarwinds.net

    SWSPMCMD.exe throwing a .Net exception:  The number of WaitHandles must be less than or equal to 64.

    Jason Ward

      Aloha....

      I was happy to see that 10.5 was released as it had a fix for the command line PortMapper that I am using to make dynamic switch tables with reverse DNS lookup.  After installation and trying a simple test on one of our main switches I got the following error:

      Unhandled Exception: System.NotSupportedException: The number of WaitHandles mus
      t be less than or equal to 64.
         at System.Threading.WaitHandle.WaitAll(WaitHandle[] waitHandles, Int32 millis
      econdsTimeout, Boolean exitContext)
         at SWSPMCmd.SwitchPortMapper.Main(String[] args)

      Event Log has the following entries:

      Event Type: Error
      Event Source: .NET Runtime 2.0 Error Reporting
      Event Category: None
      Event ID: 5000
      Date:  2/4/2010
      Time:  4:42:09 PM
      User:  N/A
      Computer: SOLARWINDS
      Description:
      EventType clr20r3, P1 swspmcmd.exe, P2 10.5.0.79, P3 4b5a07b6, P4 mscorlib, P5 2.0.0.0, P6 4a7cd8f7, P7 114a, P8 29, P9 system.notsupportedexception, P10 NIL.

      For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
      Data:
      0000: 63 00 6c 00 72 00 32 00   c.l.r.2.
      0008: 30 00 72 00 33 00 2c 00   0.r.3.,.
      0010: 20 00 73 00 77 00 73 00    .s.w.s.
      0018: 70 00 6d 00 63 00 6d 00   p.m.c.m.
      0020: 64 00 2e 00 65 00 78 00   d...e.x.
      0028: 65 00 2c 00 20 00 31 00   e.,. .1.
      0030: 30 00 2e 00 35 00 2e 00   0...5...
      0038: 30 00 2e 00 37 00 39 00   0...7.9.
      0040: 2c 00 20 00 34 00 62 00   ,. .4.b.
      0048: 35 00 61 00 30 00 37 00   5.a.0.7.
      0050: 62 00 36 00 2c 00 20 00   b.6.,. .
      0058: 6d 00 73 00 63 00 6f 00   m.s.c.o.
      0060: 72 00 6c 00 69 00 62 00   r.l.i.b.
      0068: 2c 00 20 00 32 00 2e 00   ,. .2...
      0070: 30 00 2e 00 30 00 2e 00   0...0...
      0078: 30 00 2c 00 20 00 34 00   0.,. .4.
      0080: 61 00 37 00 63 00 64 00   a.7.c.d.
      0088: 38 00 66 00 37 00 2c 00   8.f.7.,.
      0090: 20 00 31 00 31 00 34 00    .1.1.4.
      0098: 61 00 2c 00 20 00 32 00   a.,. .2.
      00a0: 39 00 2c 00 20 00 73 00   9.,. .s.
      00a8: 79 00 73 00 74 00 65 00   y.s.t.e.
      00b0: 6d 00 2e 00 6e 00 6f 00   m...n.o.
      00b8: 74 00 73 00 75 00 70 00   t.s.u.p.
      00c0: 70 00 6f 00 72 00 74 00   p.o.r.t.
      00c8: 65 00 64 00 65 00 78 00   e.d.e.x.
      00d0: 63 00 65 00 70 00 74 00   c.e.p.t.
      00d8: 69 00 6f 00 6e 00 20 00   i.o.n. .
      00e0: 4e 00 49 00 4c 00 0d 00   N.I.L...
      00e8: 0a 00                     ..     

      Event Type: Information
      Event Source: .NET Runtime 2.0 Error Reporting
      Event Category: None
      Event ID: 5001
      Date:  2/4/2010
      Time:  4:42:35 PM
      User:  N/A
      Computer: SOLARWINDS
      Description:
      Bucket 969686159, bucket table 5, EventType clr20r3, P1 swspmcmd.exe, P2 10.5.0.79, P3 4b5a07b6, P4 swspmcmd, P5 10.5.0.79, P6 4b5a07b6, P7 1, P8 2bc, P9 system.nullreferenceexception, P10 NIL.

      For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
      Data:
      0000: 42 00 75 00 63 00 6b 00   B.u.c.k.
      0008: 65 00 74 00 3a 00 20 00   e.t.:. .
      0010: 39 00 36 00 39 00 36 00   9.6.9.6.
      0018: 38 00 36 00 31 00 35 00   8.6.1.5.
      0020: 39 00 0d 00 0a 00 42 00   9.....B.
      0028: 75 00 63 00 6b 00 65 00   u.c.k.e.
      0030: 74 00 54 00 61 00 62 00   t.T.a.b.
      0038: 6c 00 65 00 20 00 35 00   l.e. .5.
      0040: 0d 00 0a 00               ....   

      The command line I used was:  SWSPMCMD.exe <mainswitch> <community> <mainswitch> <community> /xml

      This is running on a Windows2003 SP2 machine.

      Any suggestions?