ports/113241: expect hangs after upgrade from tcl-8.4.14_4, 1 to tcl-8.4.15, 1

Lena Lena at lena.kiev.ua
Sat Jun 2 01:10:04 UTC 2007


>Number:         113241
>Category:       ports
>Synopsis:       expect hangs after upgrade from tcl-8.4.14_4,1 to tcl-8.4.15,1
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 02 01:10:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Lena <Lena at lena.kiev.ua>
>Release:        FreeBSD 6.2-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD bedside.lena.kiev.ua 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #1: Sat Mar 24 14:06:12 EET 2007 root at bedside.lena.kiev.ua:/usr/obj/usr/src/sys/BEDSIDE i386
Ports tree cvsup-ed today, then portupgrade -a
Athlon 64 3500+ with 512M RAM.
>Description:
After upgrade from tcl-8.4.14_4,1 to tcl-8.4.15,1 an expect script
began to eat CPU infinitely on exit. Downgrade fixed the problem.
>How-To-Repeat:
My original script (without explicit 'exit' command)
asks for the IP-address from a DSL-modem/router (for dyndns).
A stripped down test script, with 'exit' added:

#!/bin/sh
TERM=cons25r expect -c 'spawn telnet -N 192.168.1.1
expect "ogin: "
send "root\r"
expect "assword: "
send "password\r"
expect "# "
send "ifconfig ppp0\r"
expect "inet addr:"
expect " "
puts [string trimright $expect_out(buffer)]
expect "# "
close
wait
puts "after wait\n"
exit
puts "after exit\n"'

Its output:

=====

spawn telnet -N 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
mygateway login: root
Password:

BusyBox v1.00 (2005.03.01-00:28+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# ifconfig ppp0
ppp0      Link encap:Point-Point Protocol
          inet addr:62.80.174.221  P-t-P:62.80.172.80  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:80649 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63284 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:97406962 (92.8 MiB)  TX bytes:8122755 (7.7 MiB)

# 62.80.174.221
after wait

Hangup

=====

The "Hangup" line is a result of "kill -HUP" because without it,
after telnet finishes, expect begins to eat CPU infinitely.
Then the `ps` command shows:

  358  v5  R+     0:21,08 [expect]

The `top` command shows (on an otherwise idle workstation):

CPU states: 49.6% user,  0.0% nice, 44.0% system,  6.4% interrupt,  0.0% idle
Mem: 177M Active, 121M Inact, 81M Wired, 23M Cache, 58M Buf, 71M Free
Swap: 768M Total, 40K Used, 768M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
  358 lena          1 132    0  2544K  1928K RUN      3:49 97.51% expect

Same without explicit 'exit' command.
A simpler test script finishes normally:

#!/bin/sh
TERM=cons25r expect -c 'puts "hello world\n"
exit
puts "after exit\n"'

Sorry, I don't know how to debug further. For me downgrade to tcl-8.4.14_4,1
fixed the problem.

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list