Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

weird app crash ( no core gets dumped)

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> weird app crash ( no core gets dumped) Page: [1]
Login
Message << Older Topic   Newer Topic >>
weird app crash ( no core gets dumped) - May 2, '06, 2:02:11 PM   
korona_lite

 

Posts: 19
Joined: Nov. 7, '05,
Status: offline
Hi all,
We have ported a very heavy multithreaded(pthread) server on Interix.
Here is the summary of the events:

1) It runs fine for some 2-3 hours,then suddenly it gets a SIGSEGV signal ( atleast the signal handler says so), but i see no core dump ( we specifically call abort() in the signal handler).
2) After restarting, the problem happens fast, server no longer survives even for two hours now.
3) weird part is that the faulty address the handler catches is some 0x10d8 which i am not able to relate to any code-base.
And all the time crash happens in different section of the code.

I am not able to understand this behavior. Is it something related to resource consumption of posix over the time ?? if it was then application restart should have fixed it.

Any guess wht could be going here

TIA,
....
Post #: 1
RE: weird app crash ( no core gets dumped) - May 2, '06, 3:03:14 PM   
Rodney

 

Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
Which libraries does your program link with?

(in reply to korona_lite)
Post #: 2
RE: weird app crash ( no core gets dumped) - May 2, '06, 4:42:31 PM   
korona_lite

 

Posts: 19
Joined: Nov. 7, '05,
Status: offline
it is linked with following libraries ( tht we have ported to interix)
libemsmtp
openssl
myodbc driver ( interfaced through unixODBC bridge)
standard libc

I am using SFU3.5 ( XP) to build the binaries but finally running it on Win2k3 SUA(5.2), will it be an issue ??

Just trying to understand,
if libraries are build in win2k3 and application is build with SFU(XP), what kinda problem we can expect ??? ( because i am afraid this is the case here ..)

(in reply to Rodney)
Post #: 3
RE: weird app crash ( no core gets dumped) - May 2, '06, 11:32:54 PM   
Rodney

 

Posts: 3714
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
Interix 5.2 will run binaries built with 3.5.
There was about a one month window when the 3.5 shared libraries on 5.2
were not working. But if you have the SUA/5.2 utilitiy/SDK install from 6/Jan/2006
or after it's okay.

There can be two things happening. It can be one or both.

a) If the app was built using gcc on 3.5 then you may have parts of the
code that trigger DEP to set off. That's the stack execution prevention.
It'll result in a SEGV. To turn off DEP refer to the FAQ 2.07.

b) OpenSSL isn't listed as thread safe. The only way it is thread safe is if you guard
each of the API calls yourself. This is an OpenSSL thing, not a platform thing.
So you can get writes/reads that will collide causing a SEGV.

Both SEGV's will/can happen "just depending" how the code gets run and some quantum
timing (as opposed to real clock timing).

(in reply to korona_lite)
Post #: 4
RE: weird app crash ( no core gets dumped) - May 3, '06, 2:25:08 AM   
korona_lite

 

Posts: 19
Joined: Nov. 7, '05,
Status: offline
1) We are using the latest SUA ( the after Jan6)
2) We have already turned off DEP for the entire OS itself
3) So now the only thing remains is openSSL .. i will try to make it thread-safe @app level.

But the wired part is, why i dont get the core-dump for this.

(in reply to Rodney)
Post #: 5
RE: weird app crash ( no core gets dumped) - May 4, '06, 10:15:46 AM   
markfunk

 

Posts: 670
Joined: Mar. 31, '03,
Status: offline
quote:

Just trying to understand,
if libraries are build in win2k3 and application is build with SFU(XP), what kinda problem we can expect ??? ( because i am afraid this is the case here ..)
In general, you should not mix build environments. If you build libraries in SUA, then you should only link with these in SUA (or a newer env - like Vista).
There is a good chance that libs built in SUA will not work when linked using the SFU3.5 build env.
You shouldn't mix things going backwards (going to older Interix releases).
It's usually ok to go forwards - libraries built on SFU3.5 are usually ok to use in SUA.

(in reply to korona_lite)
Post #: 6
RE: weird app crash ( no core gets dumped) - May 5, '06, 4:10:33 AM   
korona_lite

 

Posts: 19
Joined: Nov. 7, '05,
Status: offline
Now i have built the server app in SUA env., but same results.

It crashes (SEGV), but no core gets dumped. it reports the faulty address Ox00010db8.

(in reply to markfunk)
Post #: 7
RE: weird app crash ( no core gets dumped) - May 9, '06, 2:10:04 PM   
korona_lite

 

Posts: 19
Joined: Nov. 7, '05,
Status: offline
Thanks guys!

Unix-ODBC bridge that i was using was not thread-safe. Finally compiled latest unixODBC-2.8.11 with thread switch and the crash got Fixed.

(in reply to korona_lite)
Post #: 8
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> weird app crash ( no core gets dumped) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.063