Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2015-07-30
19:29 • Ticket [d8ff47babc] Segmentation fault (core dumped) while using Thread 2.7.2</i... artifact: f9a8bb61ea user: dgp
19:27 • Closed ticket [d8ff47babc]. artifact: 4889814fe0 user: dgp
12:57 • New ticket [d8ff47babc]. artifact: eeea1fa1f7 user: anonymous

Segmentation fault (core dumped) while using Thread 2.7.2

Closed / Invalidd8ff47babc5676f9684579b7e6c2ca3dbc16454dCreated 11 years agoUpdated 11 years ago
Descriptionplain2015-07-30 12:57:24
File - sample.tcl

package require Expect
spawn telnet 10.64.12.126



Script being executed - 

set inputListToRun(12) 1
package require Thread
set pool [tpool::create -minworkers [array size inputListToRun] -initcmd {
source sample.tcl
}]

Output - Segmentation fault (core dumped)



Version of OS - CentOS 7
Tclsh version - 8.6
Expect version - 5.45
Thread version - 2.7.2
dgpplain2015-07-30 19:27:21
Correct me if I'm wrong, but I'm near certain
Expect is not and has never been thread safe.

I don't think it even qualifies as single-thread,
multi-interp safe.  It's got global vars all over
the place.

Something for Expect devs to fix (if you find any),
not a bug in Tcl or in Thread.
dgpplain2015-07-30 19:29:23
This likely matters much less than you might think,
since Expect by its nature interacts with spawned
processes, anything you might imagine wanting to
do with many concurrent threads all running Expect
scripts can likely be done just as effectively by
many concurrent processes all running Expect scripts.
Log in (anonymous is fine) to add a comment.