VM crash in primitive 230. PLEASE HELP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VM crash in primitive 230. PLEASE HELP

Trygve
How does primitive 230 work? It crashes on my PC for certain operations,
never on my laptop). There must be something wrong in my WinXP, but where?

The primitive method is
Socket>>primSocket: socketID sendData: aStringOrByteArray startIndex:
startIndex count: count
    <primitive: 'primitiveSocketSendDataBufCount' module: 'SocketPlugin'>
    self primitiveFailed

In the hope of enlightenment,
--Trygve

=================================================

Details:

WinXP SP version 5.1 (SP2)
Squeak 3.10.6 (release) from Aug 30 2007.
Compiler: gcc 2.95.2.1999 1024 (release)
Image: Squeak3.10.gamma.7159 out of the box (Same problem with earlier
versions of Squeak)

I have trouble with Universes and MC when accessing over the net. Some
operations work OK, other operation cause a crash with byte code 224,
primitive index 230.

I have traced the problem from the Squeak end, and added a halt in
Socket>>sendSomeData:startIndex:count:

I have done two experiments, both of them consistently reproducible:

EXPERIMENT 1 is the command: <UniverseEditor::update package list>. This
command always works  OK.
State at the halt:
Socket::socketHandle = a ByteArray(40 246 36 0 0 0 0 0 8 212 10 0)
"Different in different executions"
aStringOrByteArray = '...selectserver...development...protocolversion....
(0 0 0 2 0 0 0 12 115 101 108 101 99 116 115 101 114 118 101 114 0 0 0
11 100 101 118 101 108 111 112 109 101 110 116 0 0 0 2 0 0 0 15 112 114
111 116 111 99 111 108 118 101 114 115 105 111 110 0 0 0 1 49 0 0 0 1 0
0 0 15 114 101 113 117 101 115 116 112 97 99 107 97 103 101 115)

EXPERIMENT 2 is to doIt this code:
(SocketStream openConnectionToHostNamed: 'www.squeak.org' port: 80)
nextPutAll: 'GET / HTTP/1.0'; crlf; crlf; flush.
This always results in a crash in primitive index 230
State at the halt, just before the crash:
Socket::socketHandle = a ByteArray(18 23 95 5 0 0 0 0 8 211 10 0)  
"Different at different executions"
aStringOrByteArray = 'GET / HTTP/1.0....
(71 69 84 32 47 32 72 84 84 80 47 49 46 48 13 10 13 10)

(The same happens with <UniverseBrowser::update list from network>, but
I gave up on tracing its code)

Many thanks for reading this far, and a great many more if you help me
--Trygve

--

Trygve Reenskaug      mailto: [hidden email]
Morgedalsvn. 5A       http://folk.uio.no/trygver
N-0378 Oslo           Tel: (+47) 22 49 57 27
Norway
 


Reply | Threaded
Open this post in threaded view
|

Re: VM crash in primitive 230. PLEASE HELP

David T. Lewis
On Wed, Jan 02, 2008 at 11:43:35AM +0100, Trygve Reenskaug wrote:
> How does primitive 230 work? It crashes on my PC for certain operations,
> never on my laptop). There must be something wrong in my WinXP, but where?
>
> The primitive method is
> Socket>>primSocket: socketID sendData: aStringOrByteArray startIndex:
> startIndex count: count
>    <primitive: 'primitiveSocketSendDataBufCount' module: 'SocketPlugin'>
>    self primitiveFailed

This is not primitive 230; it is a named primitive that is invoked
through a different mechanism. I'm assuming that "crash" means that
your squeak.exe is crashing, as opposed to something hanging up in
the image. If so, it's crashing somewhere in the SocketPlugin. If
you don't have this in your image already, you may want to install
VMMaker and look at the SocketPlugin class just to get an idea of
what's going on.

This is a complete wild guess, but a crash like you describe may
be associated with passing some invalid parameters to the primitive,
which may or may not have adequate validity checks. I would suggest
stepping through your EXPERIMENT 2 doIt in a debugger, and have a look
at the parameters being passed to primSocket:sendData:startIndex:count:
method immediately before the crash. This may give a clue as to
the source of the problem.

FWIW I tried your EXPERIMENT 2 on an image running on Linux with
no problems, so I can't directly reproduce the problem you are
seeing.

Dave