Alex: Where in your app are you calling RAND_poll()?
RAND_poll() cannot be called from within DllMain() in a DLL. Is that how you are calling it? - Jeff > Guys, > > I've submitted bug report below about a month ago to > [EMAIL PROTECTED] Since I see that only one of the fixes got into > 0.9.7 (independently reported by other person), I thought I'd repeat to dev > list just in case. > > cheers, > alex. > > -----Original Message----- > From: Alex Pankratov > Sent: January 14, 2002 14:22 > To: '[EMAIL PROTECTED]' > Subject: Problem with RAND_poll() on Windows NT 4.0 Server > > > If application is started as (win32_own_process) service on WinNT Server 4.0 > SP 6 it may hang indefinitely in RAND_poll() during system startup. Problem > occurs with OpenSSL releases between 0.9.6 and 0.9.6-c inclusively. > Unfortunately, I dont have much time to trace the problem to its roots, but > here is what helps to resolve it: > > 1. In RAND_poll() do not load (or use in any other way) netapi32.dll (change > rand_win.c:216 to "netapi = 0;"). If left unchanged, it seems to cause some > sort of deadlock in NDIS layer, preventing both openssl application and > default system init sequence from proceeding. Once openssl application is > killed, system instantly proceeds with initialization, launching whole bunch > of network-related services (DHCP, DNS, IIS, etc). > > 2. In RAND_poll() disable code that queries (HKEY_PERFORMANCE_DATA, > "Global") registry entry (change rand_win.c:257 to "if (0)"). If enabled, > this code leads to yet another hang. Here is a description of similar > problem from comp.os.ms-windows.programmer.win32 news group: > > http://groups.google.com/groups?q=RegQueryValueEx+HKEY_PERFORMANCE_DATA&star > t=20&hl=en&group=comp.os.ms-windows.programmer.win32&selm=6l1lv2%241mv%40new > sstand.cit.cornell.edu&rnum=21 > > Tracing the flow with printf() shows that (273-283) 'while' loop gets > executed 5 times prior to hanging in 6th ReqQueryValueEx() call. Buffer size > at the moment of call is 49152. > > Also, the same loop incorrectly interprets return of realloc(), assuming > that if it returns 0 then passed block gets automatically free()'d. This > will leak memory, if realloc() fails to do its job on non-empty block. > > regards, > alex. > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > Development Mailing List [EMAIL PROTECTED] > Automated List Manager [EMAIL PROTECTED] > Jeffrey Altman * Sr.Software Designer C-Kermit 8.0 available now!!! The Kermit Project @ Columbia University includes Telnet, FTP and HTTP http://www.kermit-project.org/ secured with Kerberos, SRP, and [EMAIL PROTECTED] OpenSSL. Interfaces with OpenSSH ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]