Re: [osol-discuss] SIGSEGV in libc.so.1`_malloc_unlocked on Solaris x86 machine

2007-12-24 Thread Casper . Dik

Hi All

When I use my 32 bit binary on Solaris x86 machine, I get a segmentation
fault with the following stack trace.

libc.so.1`_malloc_unlocked+0x14c(4000, 3, 80a3130, 1, 8046a38, 805763f)
libc.so.1`malloc+0x39(4000, 0, 8046a1c, fef9e455, fef9158c, 4)
meta_del+0x13(2, 80a3100, 10, 0)
standby_fix+0x75e(2, 8047e8f, 8046b10, 0)
standby+0xcc(2, 8047e8f, 0, 0, 8046bc7)
main+0xd59(6, 8047d80, 8047d9c)
_start+0x80(6, 8047e48, 8047e67, 8047e6a, 8047e7c, 8047e8f)



This stacktrace is symptomatic for memory corruption; because the 32 bit 
and 64 bit allocators round up differently, it is possible that the error 
is masked in 64 bit mode.

Start debugging, e.g., using watchmalloc or libumem or dbx run time access 
checking.

Casper

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] SIGSEGV in libc.so.1`_malloc_unlocked on Solaris x86 machine

2007-12-24 Thread Vamsee Priya
Hi 
I don't find a core dump generated when a SIGSEGV is received. I set the
LD_PRELOAD variable to watchmalloc.so.1 but could not find the actual
place of seg. fault as the core dump file is not generated. (I got the
stack trace I pasted when I attached mdb to the process) I don't have a
Sun studio compiler to run dbx.
Any more tools with which I can debug futher?

Thanks
Priya

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
Sent: Monday, December 24, 2007 2:27 PM
To: Vamsee Priya
Cc: opensolaris-discuss@opensolaris.org
Subject: Re: [osol-discuss] SIGSEGV in libc.so.1`_malloc_unlocked on
Solaris x86 machine 


Hi All

When I use my 32 bit binary on Solaris x86 machine, I get a
segmentation
fault with the following stack trace.

libc.so.1`_malloc_unlocked+0x14c(4000, 3, 80a3130, 1, 8046a38, 805763f)
libc.so.1`malloc+0x39(4000, 0, 8046a1c, fef9e455, fef9158c, 4)
meta_del+0x13(2, 80a3100, 10, 0)
standby_fix+0x75e(2, 8047e8f, 8046b10, 0)
standby+0xcc(2, 8047e8f, 0, 0, 8046bc7)
main+0xd59(6, 8047d80, 8047d9c)
_start+0x80(6, 8047e48, 8047e67, 8047e6a, 8047e7c, 8047e8f)



This stacktrace is symptomatic for memory corruption; because the 32 bit

and 64 bit allocators round up differently, it is possible that the
error 
is masked in 64 bit mode.

Start debugging, e.g., using watchmalloc or libumem or dbx run time
access 
checking.

Casper



___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] SIGSEGV in libc.so.1`_malloc_unlocked on Solaris x86 machine

2007-12-24 Thread Frank . Hofmann
On Mon, 24 Dec 2007, [EMAIL PROTECTED] wrote:


 Hi
 I don't find a core dump generated when a SIGSEGV is received. I set the
 LD_PRELOAD variable to watchmalloc.so.1 but could not find the actual
 place of seg. fault as the core dump file is not generated. (I got the
 stack trace I pasted when I attached mdb to the process) I don't have a
 Sun studio compiler to run dbx.
 Any more tools with which I can debug futher?

 You can use coreadm to redirect the core someplace.

 Does your program call chdir()?  If so, the core dump will be elsewhere.

 Note that with watchmalloc.so.1 you will also need to set some other
 variables.

... which are, like all good Solaris features, documented in the manpages, 
watchmalloc(3MALLOC) in that case :)

watchmalloc and libumem are somewhat complementary, some problems are 
easier to track with one some easier with the other.

Merry christmas,
FrankH.
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


[osol-discuss] SIGSEGV in libc.so.1`_malloc_unlocked on Solaris x86 machine

2007-12-23 Thread Vamsee Priya
Hi All

When I use my 32 bit binary on Solaris x86 machine, I get a segmentation
fault with the following stack trace.

libc.so.1`_malloc_unlocked+0x14c(4000, 3, 80a3130, 1, 8046a38, 805763f)
libc.so.1`malloc+0x39(4000, 0, 8046a1c, fef9e455, fef9158c, 4)
meta_del+0x13(2, 80a3100, 10, 0)
standby_fix+0x75e(2, 8047e8f, 8046b10, 0)
standby+0xcc(2, 8047e8f, 0, 0, 8046bc7)
main+0xd59(6, 8047d80, 8047d9c)
_start+0x80(6, 8047e48, 8047e67, 8047e6a, 8047e7c, 8047e8f)

The same binary when compiled with -m64 and linked with amd64 libraries
works fine on the same machine.
When I searched in Google many suggested that  _REENTRANT flag must be
defined while compiling. I used it but same problem persisted.
Can anyone help me as to what could be done in this case?

Thanks in advance

Regards
Priya



___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] SIGSEGV in libc.so.1`_malloc_unlocked on Solaris x86 machine

2007-12-23 Thread Ian Collins
Vamsee Priya wrote:
 Hi All

 When I use my 32 bit binary on Solaris x86 machine, I get a segmentation
 fault with the following stack trace.

 libc.so.1`_malloc_unlocked+0x14c(4000, 3, 80a3130, 1, 8046a38, 805763f)
 libc.so.1`malloc+0x39(4000, 0, 8046a1c, fef9e455, fef9158c, 4)
 meta_del+0x13(2, 80a3100, 10, 0)
 standby_fix+0x75e(2, 8047e8f, 8046b10, 0)
 standby+0xcc(2, 8047e8f, 0, 0, 8046bc7)
 main+0xd59(6, 8047d80, 8047d9c)
 _start+0x80(6, 8047e48, 8047e67, 8047e6a, 8047e7c, 8047e8f)

 The same binary when compiled with -m64 and linked with amd64 libraries
 works fine on the same machine.
 When I searched in Google many suggested that  _REENTRANT flag must be
 defined while compiling. I used it but same problem persisted.
 Can anyone help me as to what could be done in this case?

   
One of the Studio forums would be a better place to ask. 

If your application isn't too big, run it under dbx with access checking
enabled, it looks like something's soiled the heap.  Never define
_REENTRANT, if your application is multi-threaded, use the -mt option.

Ian

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org