Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You can debug a core file, but you'll have to manually walk the stack, trace data structures, and backtrack from what evidence is available in the core file. It may be easy, or it may be nearly impossible to find a memory leak using a core file - it all depends upon your program's complexity.
I've only used purify and prior to that manual debugging. There are version of malloc that provide some instrumentation and assistance, but those may not be of any help.
Finding a memory leak from a core file is like finding a needle in a haystack. You have to start walking data structures, pointer by pointer.
It would be more productive to instrument your code.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Yes, give up trying to extract anything from your current core file. This is a dead end. You might use a core file only after the application has been instrumented.
Solaris provides excellent and free tools to investigate memory leaks. Start with libumem.
This will display and generate a file named /tmp/leak.txt will all the current memory allocations. Note that they aren't necessarily leaks.
There are several other mdb commands to go further.
Google "mdb findleaks site:blogs.sun.com" for various articles about them.
You can also inspect a core file as long as the process has been started the way I described. Generate that core file with the gcore command or just wait for the OS to create the core if your application is crashing.
Our core file is not prepared with purify option and we generated a core using gcore utility.
Can you provide inputs through malloc?
Jlliagre has responded with very good information, and is far more up to date and knowledgeable on Solaris than I am. I haven't done major Solaris development work in a while now.
You can install Solaris 10 on a commodity cheap x86 machine. Use an old Pentium 4 with 1-2GB RAM. When you have debugged it on the Solaris 10, you can compile on S8 instead.
I have no idea where you got the information that applications written for solaris 8 are "guaranteed" to run on 10.
I have worked for Sun doing technical support in HAS (High Availability Support//25k/20k/15k/12k and sun cluster) and that is NOT accurate. It is called support and we have a long list of what is supported and NOT supported in 10. There is no guarantee that the app that was compiled for 8 will work in 10.
That is one of the reasons why sun came up with solaris 8 and 9 non global zones in 10 via the Migration Assistant. That way, you can run solaris 10 on new machines and install solaris 8 zones to run your old apps in new hardware without having to keep old hardware.
It is a matter of support. Sun does not support old apps written for 8 in 10. They may or may not run but you are talking about lack of support.
Here are some examples:
in sun cluster 3.2 that can only run 10, you can't (we don't support) old versions of oracle. Like 8i. I have tried to install 8i on 10 and it will not work in or out of cluster.
solaris 10 does not support older versions of veritas (only 4.1 and 5.0). So if you try let's say a 3x version of vxvm, it will not work due to library (among others) issues.
Also, if the poster has a memory leak, he should send the core file to the kernel team in Sun (that is what they do) and they will help him (assuming he has a contract) with his issue at least to a point.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.