Bug #431
open
bip is leaking file descriptors
Added by Pierre-Louis Bonicoli almost 10 years ago.
Updated 9 months ago.
Description
fran wrote:
bip is leaking file descriptors on my server, and the fix is pretty easy: on connection.c, on read_socket, whenever read returns <1 and errno is different to EAGAIN and EINTR, the socket MUST be closed
because read will not return 0 on the following iterations of select (cause it's not added to the read fd_set after that), plus after read failing with fatal error it keeps returning -1
- Confirmed changed from No to Yes
- Security set to No
Test script wrote by Fran:
!/bin/sh
#\
exec tclsh "$0" "$@"
set BIPPASSWORD xxx
set NSPASSWORD xxx
set fd [socket localhost 7778]
fconfigure $fd -buffering line -buffersize 1000000
puts $fd "PASS fran:$BIPPASSWORD:freenode"
puts $fd "NICK fran"
puts $fd "USER fran 0 fran :Francisco Castro"
while {[gets $fd line] >= 0} {
puts $line
set parts [split $line]
if {[lindex $parts 1] eq "NICK"} {
if {[lindex $parts 2] ne "fran"} {
puts $fd "NICK fran"
after 500
puts $fd "PRIVMSG NickServ :IDENTIFY $NSPASSWORD"
after 500
}
exit
}
}
close $fd
- Assignee set to Loïc Gomez
- Priority changed from Normal to High
- Patch Available set to Yes
At last I found the bug behind this, having noticed it myself with improperly disconnecting clients (network issues, etc)
Will send a patch in a new issue.
- Target version changed from 21 to 0.10.0
Also available in: Atom
PDF