Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Collecting Shared Memory in core dump Post 302907751 by Perderabo on Tuesday 1st of July 2014 12:59:47 PM
Old 07-01-2014
Quote:
Originally Posted by rupeshkp728
Is there any way through which shared memory or its details can be collected in core and accessed?
Core dump occur as default action of a few signals. The list is available with "man -s7 signal" on RedHat. You could install a signal handler to catch all those signals. It could then display what ever information you want.

One issue to watch for... You may be getting a core dump because you blew the stack. So you will need to use sigaltstack() to provide an alternate stack to use with your handler to guarantee that it can run.
This User Gave Thanks to Perderabo For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies

2. UNIX for Dummies Questions & Answers

core dump

does any one have read a core dump? is there any reader for that? or may i know what is the use of that core which takes sometimes memory in GBs? :) (6 Replies)
Discussion started by: sskb
6 Replies

3. UNIX for Dummies Questions & Answers

core dump

Hi , Working on AIX 4.3. An internal error from my apps engine suddenly causes the engine to die. During this time i do notice a core file being dumped in the directory from where I try to re-start my engine. Q is how does one read this core file, or I should say 'what is this core file'? thnx (2 Replies)
Discussion started by: buRst
2 Replies

4. UNIX for Advanced & Expert Users

Shared memory shortage but lots of unused memory

I am running HP-UX B.11.11. I'm increasing a parameter for a database engine so that it uses more memory to buffer the disk drive (to speed up performance). I have over 5GB of memory not being used. But when I try to start the DB with the increased buffer parameter I get told. "Not... (1 Reply)
Discussion started by: cjcamaro
1 Replies

5. UNIX for Dummies Questions & Answers

Core dump in HP-UX..

Hi All I am new for this forum. I have a core file by using gdb and bt cmd I got the function name but I want to the exact cause of the core dump because of I can not reproduse the binary so if any one know the cmd plz plz plz let me know. (0 Replies)
Discussion started by: gyanusoni
0 Replies

6. Programming

core dump

how to view core dumped file using gdb and how to extract information from the coredumped file.can we get similar information from the other utilites like strace or ptrace. (2 Replies)
Discussion started by: Manabhanjan
2 Replies

7. HP-UX

memory fault(core dump)

i am getting memory fault (core dump) in a C program i want to know which statement execution caused it. i tried following things $ gdb generalised_tapinread_mod HP gdb 5.4.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x. Copyright 1986 - 2001 Free Software Foundation, Inc.... (2 Replies)
Discussion started by: junaid.nehvi
2 Replies

8. UNIX for Advanced & Expert Users

collecting memory usage by a process

Hi Guys, I work on a AIX environment and I'm trying to write a script where I can collect all the memory used by a process. Basically I'm executing the command 'ps -fu userid' to get all the process ids and then executing the 'ps v PID' to get all the memory allocated by PPID. My question is... (2 Replies)
Discussion started by: arizah
2 Replies

9. Programming

Shared library with acces to shared memory.

Hello. I am new to this forum and I would like to ask for advice about low level POSIX programming. I have to implement a POSIX compliant C shared library. A file will have some variables and the shared library will have some functions which need those variables. There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies

10. Solaris

core dump

Hi guys, just want to know which core file pattern is best to set for core dumps: 1) per-process file name pattern or 2) global file name pattern. I will really appreciate an explanation why the chosen one is better. Thanks a lot guys. (2 Replies)
Discussion started by: cjashu
2 Replies
sigstack(3C)						   Standard C Library Functions 					      sigstack(3C)

NAME
sigstack - set and/or get alternate signal stack context SYNOPSIS
#include <signal.h> int sigstack(struct sigstack *ss, struct sigstack *oss); DESCRIPTION
The sigstack() function allows the calling process to indicate to the system an area of its address space to be used for processing signals received by the process. If the ss argument is not a null pointer, it must point to a sigstack structure. The length of the application-supplied stack must be at least SIGSTKSZ bytes. If the alternate signal stack overflows, the resulting behavior is undefined. (See USAGE below.) o The value of the ss_onstack member indicates whether the process wants the system to use an alternate signal stack when deliver- ing signals. o The value of the ss_sp member indicates the desired location of the alternate signal stack area in the process' address space. o If the ss argument is a null pointer, the current alternate signal stack context is not changed. If the oss argument is not a null pointer, it points to a sigstack structure in which the current alternate signal stack context is placed. The value stored in the ss_onstack member of oss will be non-zero if the process is currently executing on the alternate signal stack. If the oss argument is a null pointer, the current alternate signal stack context is not returned. When a signal's action indicates its handler should execute on the alternate signal stack (specified by calling sigaction(2)), sigstack() checks to see if the process is currently executing on that stack. If the process is not currently executing on the alternate signal stack, the system arranges a switch to the alternate signal stack for the duration of the signal handler's execution. After a successful call to one of the exec functions, there are no alternate signal stacks in the new process image. RETURN VALUES
Upon successful completion, sigstack() returns 0. Otherwise, it returns -1 and sets errno to indicate the error. ERRORS
The sigstack() function will fail if: EPERM An attempt was made to modify an active stack. USAGE
A portable application, when being written or rewritten, should use sigaltstack(2) instead of sigstack(). The direction of stack growth is not indicated in the historical definition of struct sigstack. The only way to portably establish a stack pointer is for the application to determine stack growth direction, or to allocate a block of storage and set the stack pointer to the mid- dle. sigstack() may assume that the size of the signal stack is SIGSTKSZ as found in <signal.h>. An application that would like to specify a signal stack size other than SIGSTKSZ should use sigaltstack(2). Applications should not use longjmp(3C) to leave a signal handler that is running on a stack established with sigstack(). Doing so may dis- able future use of the signal stack. For abnormal exit from a signal handler, siglongjmp(3C), setcontext(2), or swapcontext(3C) may be used. These functions fully support switching from one stack to another. The sigstack() function requires the application to have knowledge of the underlying system's stack architecture. For this reason, sigalt- stack(2) is recommended over this function. SEE ALSO
fork(2), _longjmp(3C), longjmp(3C), setjmp(3C), sigaltstack(2), siglongjmp(3C), sigsetjmp(3C) SunOS 5.11 28 Feb 1996 sigstack(3C)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy