too many close calls for non-opened fds

This is a discussion on too many close calls for non-opened fds within the OpenSSH Development forums, part of the Networking and Network Related category; Hello All, I'm using OpenSSH 4.3p2 in HP-UX 11.23. On running tusc (a tool to trace ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-14-2006
Logu
 
Posts: n/a
Default too many close calls for non-opened fds

Hello All,

I'm using OpenSSH 4.3p2 in HP-UX 11.23. On running tusc (a tool to trace
system calls and signals) on sshd, I found lot of close calls upto 2047.
Those close calls try to close a non-opened file descriptor and results in
an error. This behaviour is seen only from OpenSSH 3.9 where closefrom()
call is introduced to close the file descriptors before re-exec. The fix is
to check the resource limits before calling close(), but the comment in
source code (bsd-closefrom.c) says that it is not recommended to check the
resource limits. Is there anyway to fix this too many close() calls which
results in performance degradation?

Relavant part of tusc output for sshd is given below,

................
...............
set_userthreadid(1) ...................................... = 1
stat("/etc/pam_debug", 0x7ffff5b0) ....................... ERR#2 ENOENT
stat("/tcb/files/auth/system/default", 0x7fffec70) ....... ERR#2 ENOENT
getuid() ................................................. = 0 (0)
getuid() ................................................. = 0 (0)
getuid() ................................................. = 0 (0)
setgroups(0, NULL) ....................................... = 0
open("/dev/null", O_RDWR|0x800, 0123) .................... = 3
close(3) ................................................. = 0
sysconf(_SC_OPEN_MAX) .................................... = 2048
close(3) ................................................. ERR#9 EBADF
close(4) ................................................. ERR#9 EBADF
close(5) ................................................. ERR#9 EBADF
close(6) ................................................. ERR#9 EBADF
close(7) ................................................. ERR#9 EBADF
close(8) ................................................. ERR#9 EBADF
close(9) ................................................. ERR#9 EBADF
.................
................

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/lis...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0