Primitive failed in: SciSocketManager class>>#primFdSetSize

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby waynej » Fri May 16, 2008 7:03 am

We are getting an error early during startup of our server image on one machine:
Primitive failed in: SciSocketManager class>>#primFdSetSize due to General protection fault - read from invalid memory location

This Windows XP Professional 2002 SP2 machine had already run our client code successfully for a long time but our server had never been tried there before. Our server stuff works great on many other machines and we've never seen this error before. So I wouldn't doubt there's something weird about this machine.

This error seems vaguely familiar but I can't find anything about it on the web or in newsgroups or this forum (though I can't get searches of this forum to find anything). DEP has already been disabled.

Thanks.
--
Wayne Johnston


vmtrap.log:

-Platform Information-------------------
VM Timestamp: 4.0,(NC) 3/30/2007 (73)
CPU Architecture: i386
OS Type: WIN32_NT
OS Version: 5.1 build 2600 Service Pack 2
-State Information----------------------
Handler=0x00478770
vmState=0x00000000
vmError=0x00000035
ExceptionCode=0xc0000005
ExceptionAddress=0x0043b670
ContextFlags=0x0001003f
Module=C:\Program
Files\Carreker\Exceptions
Express\bin\ESVM40.dll
Module_base_address=0x00420000
Offset_in_DLL=0x0001b670
EDI=0x00008000
ESI=0x00008003
EAX=0x0156619c
EBX=0x00168260
ECX=0x0014a8b0
EDX=0x00000000
EBP=0x0014a8b0
ESP=0x00a9fd3c
EIP=0x0043b670
-----------------------------------------
Image snapshot: vmtrap.img
-Walkback--------------------------------
EsStackDumper class>>dumpStack:
AbtStackDumpStartUp class>>outputWalkback:
[] in Block>>valueWithErrorHandler:oldHandler:onReturnDo:
[] in <optimized block> Block>>when:do:exitWith:retryReturn:
[] in <optimized block> Block>>when:do:
[] in <optimized block> AbtStackDumpStartUp class>>outputWalkback:
[] in <optimized block> EsImageStartUp class>>reportError:resumable:startBP:
Process>>reportError:resumable:
ExceptionalEvent class>>initializeSystemExceptions
[] in <optimized block> Signal>>evaluate:
[] in ExceptionalEvent>>applyDefaultHandler:
ExceptionalEvent>>signalWithArguments:
[] in <optimized block> ExceptionalEvent>>signalWith:
Object>>error:
EmSystemConfiguration>>executeStartupBlock:queueErrors:
[] in ProcessorScheduler>>copyCurrentProcess:
EmSystemConfiguration>>executeStartupBlock:queueErrors:
[] in Signal>>evaluate:
[] in <optimized block> Block>>when:do:exitWith:retryReturn:
[] in ExceptionalEvent>>signalWithArguments:
[] in <optimized block> ExceptionalEvent>>signalWith:
Object>>error:
Object>>primitiveFailed:withArgument:backUp:
Object>>primitiveFailed
SciSocketManager class>>primFdSetSize
SciComWIN class>>initializePlatformSciConstants
SciComWIN class>>initializePlatformConstants
SciComWIN class>>startUp
EmSystemConfiguration>>startUp
[] in <optimized block> Block>>valueWithErrorHandler:oldHandler:onReturnDo:
[] in Block>>when:do:exitWith:retryReturn:
[] in Block>>when:do:
[] in <optimized block> EmSystemConfiguration>>executeStartupBlock:queueErrors:
[] in <optimized block> EmSystemConfiguration>>startUp
[] in BlockContextTemplate>>apply:from:to:
ArrayedCollection>>do:
EmSystemConfiguration>>startUp
[] in <optimized block> EmSystemConfiguration>>xdImageStartup



partial stack trace:

....


EmSystemConfiguration>>#executeStartupBlock:queueErrors:
receiver = an EmSystemConfiguration
arg1 = [] in EmSystemConfiguration>>#startUp
arg2 = OrderedCollection('Primitive failed in: SciSocketManager class>>#primFdSetSize due to General protection fault - read from invalid memory location' -> Process:6{running,3} )
[] in EmSystemConfiguration>>#startUp
receiver = an EmSystemConfiguration
temp1 = OrderedCollection('Primitive failed in: SciSocketManager class>>#primFdSetSize due to General protection fault - read from invalid memory location' -> Process:6{running,3} )
blockarg1 = SciComWIN
BlockContextTemplate>>#apply:from:to:
receiver = [] in EmSystemConfiguration>>#startUp
arg1 = (Kernel CLDT CLIM Core CPM DM EsTTYTools AbtImageConfigurationApp AbtNlsKernelApp AbtTraceApp CommonFileSystem CfsImplementationESWin CfsPaths CfsStreams EsAsynchronousCallout EsbBenchmarksES EsMemoryModel EsMemoryUsage EswMutationSupport PlatformFramework WindowsOlePlatformFramework SgmlSupport SgmlSupportES SstKernelExtensions AbtPrimitiveBaseApp EsStackDumperSupport WindowsPlatformAccessors WindowsPlatformExtensions SocketCommunicationsInterface SciComBlocking SciComPolled SciComWIN SciPolledWinApp SstCommunications SstMarshaling Swapper AbtCFSAdditionsApp AbtCLDTAdditions AbtImageSupportApp AbtNtServiceSupportApp SstLightweightMarshaling SstMethodInvocation SstSocketCommunications SstSwapperMarshaling AbtThreadsApp AbtThreadsThreadedSubApp SstObjectSpaces SstSessionManagement SstTcpCommunications SstEnhancedSelect SstEnhancedSelectWIN AbtCodePageUtilitiesApp AbtRunInterfacesApp SstNamingService SstProxies SstServerSupport AbtRunCommonPartsApp AbtXmlBaseApp ...etc...)
arg2 = 1
arg3 = 90
temp1 = 32
Array(ArrayedCollection)>>#do:
receiver = (Kernel CLDT CLIM Core CPM DM EsTTYTools AbtImageConfigurationApp AbtNlsKernelApp AbtTraceApp CommonFileSystem CfsImplementationESWin CfsPaths CfsStreams EsAsynchronousCallout EsbBenchmarksES EsMemoryModel EsMemoryUsage EswMutationSupport PlatformFramework WindowsOlePlatformFramework SgmlSupport SgmlSupportES SstKernelExtensions AbtPrimitiveBaseApp EsStackDumperSupport WindowsPlatformAccessors WindowsPlatformExtensions SocketCommunicationsInterface SciComBlocking SciComPolled SciComWIN SciPolledWinApp SstCommunications SstMarshaling Swapper AbtCFSAdditionsApp AbtCLDTAdditions AbtImageSupportApp AbtNtServiceSupportApp SstLightweightMarshaling SstMethodInvocation SstSocketCommunications SstSwapperMarshaling AbtThreadsApp AbtThreadsThreadedSubApp SstObjectSpaces SstSessionManagement SstTcpCommunications SstEnhancedSelect SstEnhancedSelectWIN AbtCodePageUtilitiesApp AbtRunInterfacesApp SstNamingService SstProxies SstServerSupport AbtRunCommonPartsApp AbtXmlBaseApp ...etc...)
arg1 = [] in EmSystemConfiguration>>#startUp
EmSystemConfiguration>>#startUp
receiver = an EmSystemConfiguration
temp1 = OrderedCollection('Primitive failed in: SciSocketManager class>>#primFdSetSize due to General protection fault - read from invalid memory location' -> Process:6{running,3} )
EmSystemConfiguration>>#xdImageStartup
receiver = an EmSystemConfiguration
temp1 = nil
waynej
 
Posts: 32
Joined: Wed Apr 18, 2007 9:18 am

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby marten » Fri May 16, 2008 9:24 am

Are you sure, that you have not mixed older dll's with newer VM's or newer Smalltalk source code ?
What is your Server software ?

Marten
Marten Feldtmann, Principal Smalltalk User, Private
SkypeMe callto://marten.feldtmann
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby waynej » Mon May 19, 2008 6:19 am

Marten:

I copied the entire directory structure for our application (includes dll, exe, nls, etc.) to another machine, and found it works fine. So it is something weird about this machine.

I'm not sure what you mean by server software, other than it's Windows XP Professional 2002 SP2. Our application is built as an NT service.

Thanks.
waynej
 
Posts: 32
Joined: Wed Apr 18, 2007 9:18 am

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby irccwh » Mon May 19, 2008 12:36 pm

Does it fail when running from a command prompt too? Or just when running as a service?
irccwh
 
Posts: 8
Joined: Thu Jan 25, 2007 10:13 am

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby waynej » Mon May 19, 2008 1:00 pm

Our server image is built to only be runnable as a service. If you try to run it at the command line, you get:
"StartServiceCtrlDispatcher error: (0x427) The service process could not connect to the service controller."

But we learned something very basic today (it's hard to get information from this remote site). There are two events in the Windows application event log each time they try to start the service. The first one gives a bunch of details, the second one says "Windows cannot query for the list of Group Policy objects. ..." So that gives the administrators something to go on. I hope to characterize the problem here later.
waynej
 
Posts: 32
Joined: Wed Apr 18, 2007 9:18 am

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby wembley » Tue May 20, 2008 2:06 pm

Wayne -

Getting 'Primitive failed in: SciSocketManager class>>#primFdSetSize' is rather odd since this C function simple returns an integer constant -- no computations and no conversions.

vmError=0x00000035
ExceptionCode=0xc0000005
ExceptionAddress=0x0043b670
ContextFlags=0x0001003f
Module=C:\Program Files\Carreker\Exceptions Express\bin\ESVM40.dll
Module_base_address=0x00420000
Offset_in_DLL=0x0001b670

Offset 0x0001b670 in esvm40.dll is within the globalGarbageCollect routine. A memory reference error here generally indicates that object memory has been corrupted.

I'll be interested to hear more about what your system admin folks discover from investigating the Event Logs. It is hard to see though what the relationship between these arrors and "Windows cannot query for the list of Group Policy objects. ..." could be.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby waynej » Fri May 23, 2008 7:35 am

I figured it out. Thanks for your mentioning garbage collection, John. I reduced the service's -mo (old space) parameter and the service works now. It had been specifying 1 billion - and it's a 1GB RAM machine. :shock: We install that command line everywhere without thinking since we assume machines running our application would have at least 2GB RAM.

It turns out the aforementioned events were unrelated to trying to start our service. Sorry about that.

At least if someone else hits the problem, they'll see the solution here. I don't know if other VA versions would have the same failure signature.
waynej
 
Posts: 32
Joined: Wed Apr 18, 2007 9:18 am

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby wembley » Mon May 26, 2008 4:45 am

Wayne -

I'm glad your application is now running correctly, but I'm a little confused about the (apparent) cause of the failure and the actions you took to correct the failure. You said that you were specifying 1 billion for old space -- could you post the exact commandline value you were using when it failed and the value you were using when it succeeded on the 1GB machine?
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: Primitive failed in: SciSocketManager class>>#primFdSetSize

Postby waynej » Tue May 27, 2008 1:34 pm

The original command line (obfuscated) was:

"C:\Program Files\MyCompany\MyProduct\bin\abtntsrvWithChangedIcon.exe" -iMyProduct.icx -lMyProduct.log -srvWorkingdir "C:\Program Files\MyCompany\MyProduct\bin" -mn5000000 -ml5000000 -mo1000000000

The fix was to remove a zero from the end.
waynej
 
Posts: 32
Joined: Wed Apr 18, 2007 9:18 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest