Send Mail from within a NetClients socket handler fails

Tagged:
Project:GNU Smalltalk
Component:NetClients
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

Script crashing when try and send an email from within a server socket handler.

System is GST 3.1 on Linux CentOS 5.2 64 bit.

To reproduce...
Set up a client and server as per...
http://sblinn.jottit.com/gnu_smalltalk_netclients-based_echo_server

At http://smalltalk.gnu.org/blog/swoolerton/mail-scripting-0 there is a class called SMTPHelper.

To see the fault, set the server atResponse method to something like this...

respondTo: aRequest [
 | session sessionSocket msg smtpHelper |
   "sending an email from the respondTo method crashes"
   smtpHelper := SMTPHelper new.
   SMTPHelper smtpHost: 'myMailHost'.
   smtpHelper sendEmailMsg: msg from: fromEmailAddr to:  toEmailAddr subject: 'Test'.
]

Stack dump...
(ip 44)SocketAddress class>>#extractAddressesAfterLookup:
(ip 6)[] in SocketAddress class>>#allByName:
(ip 4) BlockClosure>>#ensure:
(ip 48)[] in SocketAddress class>>#allByName:
(ip 4)[] in SocketAddress class>>#at:cache:
(ip 10)Dictionary>>#at:ifAbsent:
(ip 18)SocketAddress class>>#at:cache:
(ip 24)SocketAddress class>>#allByName:
(ip 16)SocketAddress class>>#byName:
(ip 10)Socket class(StreamSocket class)>>#remote:port:local:port:
(ip 18)Socket class(StreamSocket class)>>#remote:port:
(ip 12)[] in NetProtocolInterpreter>>#connect
(ip 10) BlockClosure>>#on:do:
(ip 16)SMTPProtocolInterpreter(NetProtocolInterpreter)>>#connect
(ip 6)SMTPProtocolInterpreter>>#connect
(ip 24)SMTPClient(NetClient)>>#connectToHost:port:
(ip 10)SMTPClient class(NetClient class)>>#connectToHost:
(ip 10)[] in SMTPHelper>>#sendEmailMsg:from:to:subject:
(ip 10) BlockClosure>>#on:do:
(ip 50)SMTPHelper>>#sendEmailMsg:from:to:subject:
(ip 24)AutoReplyServer>>#respondTo:
(ip 8)[] in NetSession>>#run
(ip 10)Time class>>#millisecondsToRun:
(ip 14)[] in NetSession>>#run
(ip 10) BlockClosure>>#on:do:
(ip 24)AutoReplySession(NetSession)>>#run
(ip 2)[] in NetThread>>#startNewProcess
(ip 52)[] in Process>>#onBlock:at:suspend:
(ip 10) BlockClosure>>#on:do:
(ip 14)[] in Process>>#onBlock:at:suspend:
(ip 4) BlockClosure>>#ensure:
(ip 10)[] in Process>>#onBlock:at:suspend:
(ip 42)[] in BlockClosure>>#asContext:
(ip 12)BlockContext class>>#fromClosure:parent:
Aborted

User login