[GE issues] [Issue 505] sge_execd may crash at start-up time due to fd_set used incorrectly in sge_close_all_fds()

andreas andreas.haas at sun.com
Tue Feb 10 14:52:15 GMT 2009


http://gridengine.sunsource.net/issues/show_bug.cgi?id=505



User andreas changed the following:

                What    |Old value                 |New value
================================================================================
                Priority|P4                        |P3
--------------------------------------------------------------------------------
              QA contact|ernst                     |pollinger
--------------------------------------------------------------------------------
                 Summary|fd_set used incorrectly in|sge_execd may crash at sta
                        | sge_close_all_fds()      |rt-up time due to fd_set u
                        |                          |sed incorrectly in sge_clo
                        |                          |se_all_fds()
--------------------------------------------------------------------------------
            Subcomponent|cleanup                   |execution
--------------------------------------------------------------------------------




------- Additional comments from andreas at sunsource.net Tue Feb 10 06:52:07 -0800 2009 -------
It turned out this issue is of general meaning and not only FreeBSD.

Resolution is 

(1) use sysconf(_SC_OPEN_MAX) for looping over all possible file descriptors
(2) use FD_SETSIZE inside the loop to prevent FD_ISSET(fd,  keep_open) being
used for fd's which go beyond the size of fd_set

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=36&dsMessageId=103208

To unsubscribe from this discussion, e-mail: [issues-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list