Can't get core file

Can't get core file

Post by Thomas Deh » Fri, 08 Dec 2000 04:00:00




> I am running Solaris 2.6. One of our routines is getting a SIGSEGV.
> I cannot find a core file on the system. Is there something I need
> to turn on. Thanks for any help..

If you really can't get a core, you can still attach dbx
to the running process to obtain a stacktrace.

Thomas

 
 
 

Can't get core file

Post by maurice.dal.. » Sat, 09 Dec 2000 00:17:25


I am running Solaris 2.6. One of our routines is getting a SIGSEGV.
I cannot find a core file on the system. Is there something I need
to turn on. Thanks for any help..

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Can't get core file

Post by Darren Dunha » Sat, 09 Dec 2000 02:34:38



> I am running Solaris 2.6. One of our routines is getting a SIGSEGV.
> I cannot find a core file on the system. Is there something I need
> to turn on. Thanks for any help..

Is the routine setuid?  Cores are generally disabled on such programs.

Check your 'limit' or 'ulimit' for coredumpsize.  Dumps are disabled if
that is set to 0.

--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
      < Please move on, ...nothing to see here,  please disperse >

 
 
 

Can't get core file

Post by Uma Nellur » Sat, 09 Dec 2000 22:49:19


Is it setuid process?. Solaris does not give core for setuid process.

> I am running Solaris 2.6. One of our routines is getting a SIGSEGV.
> I cannot find a core file on the system. Is there something I need
> to turn on. Thanks for any help..

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Can't get core file

Post by Cher » Sun, 10 Dec 2000 17:06:47


On solaris 2.6, savecore is turned off by default

/etc/rc2.d/S20syssetup

check your setting, make sure that you uncomment it

##
## Default is to not do a savecore
##
if [ ! -d /var/crash/`uname -n` ]
then mkdir -m 0700 -p /var/crash/`uname -n`
fi
                echo 'checking for crash dump...\c '
savecore /var/crash/`uname -n`
                echo '


>I am running Solaris 2.6. One of our routines is getting a SIGSEGV.
>I cannot find a core file on the system. Is there something I need
>to turn on. Thanks for any help..

>Sent via Deja.com http://www.deja.com/
>Before you buy.

 
 
 

Can't get core file

Post by Tor Slettne » Tue, 12 Dec 2000 18:01:42


    Cherry> On solaris 2.6, savecore is turned off by default
    Cherry> /etc/rc2.d/S20syssetup

That has nothing to do with core files from user programs, but is
whether you want to save a core of the kernel if/when it crashes.

It is turned off by default, because a new file is created each time.
If an installation has a problem that makes the system crash, these
files would quickly fill up available space on that volume.

Again, this has nothing to do with the question at hand, however.

-tor

 
 
 

Can't get core file

Post by Michael Shapi » Thu, 14 Dec 2000 07:57:59



>Is it setuid process?. Solaris does not give core for setuid process.


>> I am running Solaris 2.6. One of our routines is getting a SIGSEGV.
>> I cannot find a core file on the system. Is there something I need
>> to turn on. Thanks for any help..

I think I've posted this before, but here it is again ... there are many
reasons why a process will not produce a core file.  Specifically:

The program will dump a core file whenever it receives one of the signals (such
as SEGV or BUS as you mention) whose default disposition is to cause a core
dump, and the application has not installed its own handler for the signal
which causes it to do something else.   The complete list of default signal
dispositions is shown in signal(5).  This is the first and most obvious way
in which an application will not produce a core file -- by blocking or
modifying the behavior of a signal which by default produces a core.

Additionally, no core dump can be created:

- If the resource limit RLIMIT_CORE has been set to 0 for the process.
Refer to setrlimit(2) and ulimit(1) for more information on resource limits.

- If the file "core" exists in the destination directory and is not a regular
file (i.e. is a symlink, block or character special-file, etc).  If your
system has coreadm(1M), this test is applied to both the global pathname and
the per-process pathname.

- If the destination directory is part of a filesystem that is mounted
read-only.

- If the file "core" exists in the destination directory and is not writeable
to the user-id associated with the process trying to dump core.  If your
system has coreadm(1M), this test is only relevant to the per-process core
file pathname, because the global core file is always written as the super-user.

- In Solaris 7 and later, if the kernel cannot open the destination file
O_EXCL, which might happen if another process is trying to dump core there at
the same time.

- If the process is setuid or setgid or has changed its uid or gid (by virtue
of being root and executing any of the set*id(2) system calls).  In Solaris 7
and later, these processes can be granted permission to dump core (at the risk
of compromising secure data) by setting "allow_setid_core" to 1 in /etc/system
or via adb -kw.  In Solaris 8 or later, or in a recent Solaris 7 Update,
these processes can be granted permission to dump core using the new
coreadm(1M) utility instead.

- If the system has coreadm(1M), the global core file and per-process core
file will not be written if the corresponding expanded pathname contains
intermediate directory components that do not exist.  For example, if you set
your global pathname to "/var/core/%n/core.%p", and you have not created the
directory /var/core/`uname -n`, no global core files will be produced.

-Mike

--
Mike Shapiro, Solaris Kernel Development.

 
 
 

1. When a core file is not a core file

We use gcc 2.5.8 and gdb 4.13 on Solaris 2.3.  Some of our applications
say they dump core on a SEGV (or some other error) and running a
'file core' indicates that they did.  However, the core file size
is only 800K+ and when loaded into gdb, an error indicating that the
core file is of incorrect format is displayed.  We have recently
implemented threads usage in our code.  Could this be contributing
to our "core" file problem?  Is there a solution or workaround?
Core files are an essential debugging aid.

------------------------------------------------------------------------------

Marquette Electronics, Inc.              CompuServe: 71064,1202
8200 W. Tower Ave.
Milwaukee, WI 53223                      Jimmy the 'C'
Toll-free: (800) 558-5120 x3628
   Direct: (414) 362-3628                "I protest, I am not a merry man!"
      Fax: (414) 357-5947                                         -- Lt. Worf
------------------------------------------------------------------------------

2. Assembly language compiler for FreeSCO

3. It's not bad canned meat...

4. Help!!~~My Modem doesn't Work!!~

5. File searches on Internet

6. Couldn't fetch registers from core file: File in wrong format

7. dosemu .49 question

8. getting IP-Filter to reread it's configuration-files 'on-the-fly'

9. HELP: Raplayer gets Signal 11 - can't get a core dump!

10. NO 'core' file when C program seg faults???

11. analyzing 'core' file, how ?

12. What do I do with ``core'' files?