64 bit dbx consuming large amounts of memory on Ubuntu Linux (Dapper Drake)

Hi,

I've finally managed to get Sun Studio 11 to run on my 64 bit Dell 690 (Dual-core 2 processor Xeon-based) system. However when I try to load into dbx a 64 bit debugged application that is about 28 MB, it consumes 100% of the CPU and over 12 GB of memory before having to kill it (after waiting over 4 mins.).

The shared libs that the application uses are:

obara@Logopolis:~/Projects/linuxExxonMobil/bin$ ldd Cone

libpthread.so.0 => /lib/libpthread.so.0 (0x00002aaaaabc2000)

libdl.so.2 => /lib/libdl.so.2 (0x00002aaaaacd7000)

libGL.so.1 => /usr/lib64/libGL.so.1 (0x00002aaaaadd9000)

libXt.so.6 => /usr/lib64/libXt.so.6 (0x00002aaaaaf8e000)

libSM.so.6 => /usr/lib64/libSM.so.6 (0x00002aaaab0f0000)

libICE.so.6 => /usr/lib64/libICE.so.6 (0x00002aaaab1fa000)

libX11.so.6 => /usr/lib64/libX11.so.6 (0x00002aaaab315000)

libXext.so.6 => /usr/lib64/libXext.so.6 (0x00002aaaab51e000)

libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaaab62f000)

libm.so.6 => /lib/libm.so.6 (0x00002aaaab82c000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002aaaab9b2000)

libc.so.6 => /lib/libc.so.6 (0x00002aaaababf000)

/lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)

libGLcore.so.1 => /usr/lib64/libGLcore.so.1 (0x00002aaaabcf8000)

libnvidia-tls.so.1 => /usr/lib64/tls/libnvidia-tls.so.1 (0x00002aaaac578000)

libXau.so.6 => /usr/lib64/libXau.so.6 (0x00002aaaac679000)

Thanks in advance to anyone who can help,

Bob

[1573 byte] By [TimeLordBob] at [2007-11-26 10:23:20]
# 1

Sometimes we see similar problems related to the debug information. You

can verify this by making a copy of your main program, and then

stripping it, then loading it into dbx. If it loads right away, then the bug

you are seeing is related to debug information.

If you can run "pstack <pid>" a few times while dbx is chewing away, that

will help us narrow down the problem.

You could also try downloading the latest Sun Studio Express

http://developers.sun.com/prodtech/cc/downloads/express.jsp

It has a bunch of new fixes in it, and some of them are related to dwarf.

In Sun Studio 11 the default debug format for C is dwarf, and the default

format for C++ is stabs.

If your app is in C, then as a workaround you can also try building your

application with -xdebugformat=stabs, but we won't keep supporting the

old format forever, so we need to identify and fix all the bugs we can.

If some of your shared libraries were compiled with -g, that could also

have some effect.

--chris

ChrisQuenelle at 2007-7-7 2:24:28 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
You can read a little more about stabs and dwarf here: http://blogs.sun.com/quenelle/entry/stabs_versus_dwarf
ChrisQuenelle at 2007-7-7 2:24:28 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Hi Chris,Stripping the program does allow it to load in quickly into dbx. I will be more than glad to give you some pstack output but the problem is I can not find a 64 bit version of pstack for linux - do you know where I can possible find one?Bob
TimeLordBob at 2007-7-7 2:24:28 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
Hi Chris,Just to follow up on SunStudioExpress - there was no change. By the way I can send you the executable if that would help speed things up.Bob
TimeLordBob at 2007-7-7 2:24:28 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5

Sorry about that. pstack is from Solaris. The equivalent on Linux would

be something like gcore followed by "dbx - core -c 'where;quit'" or else

just attaching a debugger, and then stopping the process a few times

and getting output of "where".

I am pretty sure this is a bug that we fixed in a patch. The problem is

the patch is caught up in our internal process someplace, and hasn't

been made available yet. The sun Studio Express bits should definately

have this fixed.

I'm still searching for the bugid to verify this, I'll post an update soon.

--chris

ChrisQuenelle at 2007-7-7 2:24:28 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6

Hmmmm If it still shows up as a problem in Sun Studio Express, then yes,

I should probably get the executable. Can you tell me which

version of Linux you're using? If you can make the executable available

for download someplace, I can just download it.But I think our mail server

should handle large attachments, so you can try mailing it to me too.

My email is chris dot quenelle at sun dot com.

--chris

ChrisQuenelle at 2007-7-7 2:24:28 > top of Java-index,Development Tools,Solaris and Linux Development Tools...