httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14219] - apache with mod_ssl fail to start when return value of open syscall of certificates and key files are more than 255
Date Tue, 05 Nov 2002 15:03:44 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14219>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14219

apache with mod_ssl fail to start when return value of open syscall of certificates and key
files are more than 255





------- Additional Comments From jlrenard@generali.fr  2002-11-05 15:03 -------
We have found the reason why the problem occurs.
When Apache start it open and let open each log file.
In our example, for each Virtual host, it exists one log file for errors and one
for access.
So apache open 230 files.
Apache open too 31 files more (libraries and others...).
So, 264 descriptors are used when mod_ssl open the first certificate file.
And the problem occur when mod_ssl open the certificate file via the OpenSSL
BIO_new_file() function (in  bss_file.c source file of OpenSSH).
This function open the certificate file with fopen.
But the fopen fail.
The reason why the fopen fail is Solaris (2.8 and less) can't open a file using
fopen when the descriptor is greater than 255, this is due to the use of an
unsigned char instead of an int (as in linux, HPUX or short as in FreeBSD, AIX)
for field _file in struct FILE (typedef for __FILE_TAG defined in stdio_tag.h).
See below the structure __FILE_TAG prototype.

struct __FILE_TAG       /* needs to be binary-compatible with old versions */
{
#ifdef _STDIO_REVERSE
        unsigned char   *_ptr;  /* next character from/to here in buffer */
        ssize_t         _cnt;   /* number of available characters in buffer */
#else
        ssize_t         _cnt;   /* number of available characters in buffer */
        unsigned char   *_ptr;  /* next character from/to here in buffer */
#endif
        unsigned char   *_base; /* the buffer */
        unsigned char   _flag;  /* the state of the stream */
        unsigned char   _file;  /* UNIX System file descriptor */
        unsigned        __orientation:2; /* the orientation of the stream */
        unsigned        __ionolock:1;   /* turn off implicit locking */
        unsigned        __filler:5;
};

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message