In a signal handler for ^C, the user is given a possibility to restart the installation utility. However, restart procedure does not close already open file descriptors, thus, new sysinstall starts with fewer fds. Fix: (the patch is untested) How-To-Repeat: Run the installation; hit ^C, choose Restart and look at VTY2. You'll see that the fd number for ioctl(TIOCCONS) is rising each time you hit ^C -> Restart.
>Number: 30737 >Category: bin >Synopsis: sysinstall leaks file descriptors on restart >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 22 09:10:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Alexey V. Neyman >Release: FreeBSD 4.4-RELEASE >Organization: Auriga, Inc. >Environment: n/a >Description: In a signal handler for ^C, the user is given a possibility to restart the installation utility. However, restart procedure does not close already open file descriptors, thus, new sysinstall starts with fewer fds. >How-To-Repeat: Run the installation; hit ^C, choose Restart and look at VTY2. You'll see that the fd number for ioctl(TIOCCONS) is rising each time you hit ^C -> Restart. >Fix: (the patch is untested) --- system.c.orig Sat Sep 22 19:49:49 2001 +++ system.c Sat Sep 22 19:52:33 2001 @@ -56,6 +56,11 @@ static int intr_restart(dialogMenuItem *self) { + int fd, fdmax; + + fdmax = getdtablesize(); + for (fd = 3; fd < fdmax; fd++) + close(fd); execl(StartName, StartName, (char *)NULL); /* NOTREACHED */ return -1; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Responsible Changed From-To: freebsd-bugs->murray I was just looking at this code, so I'll take this one.
State Changed From-To: open->analyzed Your change has been committed to -CURRENT, thanks! There are still problems with the restart code. One problem is that dhclient starts but is never killed, so if you restart sysinstall it will try to call dhclient again and this will fail. The routing table also causes problems. For some reasone /var/run/dhclient.pid is not being created by dhclient either. dhclient should be shutdown in the mediaClose function for the network device.
Responsible Changed From-To: murray->freebsd-qa There is still a valid sysinstall/dhcp interaction issue here, but I'm not actively working on it.
Responsible Changed From-To: freebsd-bugs->brucec Take.
Responsible Changed From-To: brucec->freebsd-sysinstall Back to the pool.
sysinstall has been replaced by bsdinstall in FreeBSD 9.x. Closing.