Solved

My application is having issue with Windows Vista

Posted on 2008-06-23
8
445 Views
Last Modified: 2013-11-20
I have multithreaded MFC application that uses secure socket. The application is running perfectly in XP. But abruptly crashes in Vista (though not always). It crashes when the application calls SSL_library_init. The stack trace shows this crashes at realloc/malloc deep within the SSL_library_init function. The weird thing about this issue is that I can only reproduce in release binary, never in debug or using some tool like boundschecker.
This made be think that this is a timing issue and I added two seconds delay before SSL_library_init, the issue disappeared. Suspecting the previous running instance has not released the socket, I observed the use of socket, but that doesnt looks likely.

I would like to get to the root of it and not able to get the lead. This application is not using more than 22MB, since its known that WIN32 only gets 32MB to work on Vista.
0
Comment
Question by:shuklasunil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 21854008
SSL_library_init must be called (and return :-) before *any* other OpenSSL functions.  Is there a chance that some worker thread or something is assuming that it has already been called?
0
 

Author Comment

by:shuklasunil
ID: 21864820
Than why doesn't it crashes when I add two seconds delay before SSL_library_init. In that case this other thread, that we think, calls OpenSSL before SSL_library_init in more likely be excuted before.

Also if I comment  SSL_library_init the code never crashes.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 21869879
I can't think of anything obvious.  
Are you using the latest version of OpneSSL?  After all, Vista is a relatively new OS... if bugs relating to it exist, they would be fixed onnly in recent versions.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:shuklasunil
ID: 21897629
I am using OpenSSL and I am having issue even with the latest version
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 21903117
The main reason that a Release build fails while a Debug build works is that some variable or buffer is not being initialized in code (the Debug version presets them to defined values).  So check all variables that you are passinging into the OpenSSL functions.
0
 

Author Comment

by:shuklasunil
ID: 22024804
Ok I am using the workaround of sleeping for few second.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 22226488
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WinWaitActive parameters 12 31
sum13 challenge 24 135
wait notify demo infinite loop 3 137
Use of condition with 'serial' in ansible 2 89
So who is this article for? If you are like most of the computer users out there, you probably only realize the meaning of 'System maintenance' after something goes wrong. This article is for you if you care about keeping your system working opti…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question