Sponsored Content
Top Forums Programming execution failure and core dump generation Post 302321370 by suresh_kb211 on Monday 1st of June 2009 02:31:47 AM
Old 06-01-2009
execution failure and core dump generation

Hi, I am running a c++ program in unix sun OS 5.9. There are two functions in a file which are being used by a third function in the same file. the two functions being used are of the same type. one function is returning a success and the control is redeemed by the calling function. for teh second function, it is executing fine and is returning a success, but the control is not taken back by the caliing function and a core dump is getting generated. what can be the reason ?

details of functions:
calling function :
int lnClassType::updateDP(updatestruct lupdatestruct, localstruct llocalstruct)
{
retVal = validateDP(lupdatestruct);
if ( FAILURE == updateDP( lupdatestruct,localstruct)) {
return FAILURE;
}
}

called functions:
int limitnodeClassType::validateDrwngPower(updatestruct lupdatestruct, localstruct llocalstruct)
int limitnodeClassType::updateAcctDrwngPower(updatestruct lupdatestruct, localstruct llocalstruct)

function validateDP is goin thru fine. UpdateDP is giving the core. Included logs to find out wer exactly the execution is stopping. Found that updateDP is returning success, but the value is not being caught at the calling function and exectuin is stopping there. plz help.

please suggest a solution for this.
 

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

I've got a core dump in my weblogic home directory, which i have tried to debug by initiating savecore from /etc/init.d/savecore start but savecore failed to create the two files, that is vmcore.n and vmunix.n. savecore is enable on my server to save vmcore and vmunix in /var/crash/hostname 1)... (4 Replies)
Discussion started by: hassan2
4 Replies

3. UNIX for Advanced & Expert Users

Core Dump

Hello all, Iam new to unix while executing java program which finely working in windows know iam testing with unix ,but in unix while executing iam getting core dump, my application is in client server environment and it is menu drivrn application on clicking options no problem but after some time... (1 Reply)
Discussion started by: vinp
1 Replies

4. AIX

core dump

My application gives core dump. When i am debugging with dbx getting instructions below: pthdb_session.c, 818: 695445 PTHDB_INTERNAL (internal error) pthreaded.c, 1941: PTHDB_INTERNAL (internal error) Illegal instruction (illegal opcode) in . at 0x0 warning: Unable to access address 0x0... (1 Reply)
Discussion started by: bapi
1 Replies

5. 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

6. Solaris

Core dump generation in sun OS

Hi, im getting a core dump file in my sun OS version 5.9 while using a complex c++ program. The same program is working without any core error in another system with same sun OS and same version. The program has used structs, LL's and lots of call by references. What may be the reason. will it be a... (3 Replies)
Discussion started by: suresh_kb211
3 Replies

7. Programming

execution failure and core dump generation

Hi, I am running a c++ program in unix sun OS 5.9. There are two functions in a file which are being used by a third function in the same file. the two functions being used are of the same type. one function is returning a success and the control is redeemed by the calling function. for teh second... (2 Replies)
Discussion started by: suresh_kb211
2 Replies

8. Programming

mysterious execution failure and core dump generation

Posting again, as previous query had a typo. ======================================================= Hi, I am running a c++ program in unix AIX machine. There are two functions in a file which are being used by a third function in the same file. the two functions being used are of the same type.... (1 Reply)
Discussion started by: suresh_kb211
1 Replies

9. AIX

core dump generation in IBM machine

Hi, im getting a core dump file in a AIX machine while using a complex c++ program. The same program is working without any core error in another system with sun OS 5.9. The program has used structs, LL's and lots of call by references. What may be the reason. will it be a problem with the OS ? (3 Replies)
Discussion started by: suresh_kb211
3 Replies

10. UNIX for Dummies Questions & Answers

Core File Generation

Hi I am using Linux and I am using Java as well as C++ services running on it. The ulimit -c is set to around 400Mb. Whenever any of the service fails they produce a core file.(Actual size of core could be greater than 400Mb). Whenever my Java service fails I get a core file of size 400Mb... (3 Replies)
Discussion started by: Raj999
3 Replies
SETPGID(P)						     POSIX Programmer's Manual							SETPGID(P)

NAME
setpgid - set process group ID for job control SYNOPSIS
#include <unistd.h> int setpgid(pid_t pid, pid_t pgid); DESCRIPTION
The setpgid() function shall either join an existing process group or create a new process group within the session of the calling process. The process group ID of a session leader shall not change. Upon successful completion, the process group ID of the process with a process ID that matches pid shall be set to pgid. As a special case, if pid is 0, the process ID of the calling process shall be used. Also, if pgid is 0, the process ID of the indicated process shall be used. RETURN VALUE
Upon successful completion, setpgid() shall return 0; otherwise, -1 shall be returned and errno shall be set to indicate the error. ERRORS
The setpgid() function shall fail if: EACCES The value of the pid argument matches the process ID of a child process of the calling process and the child process has success- fully executed one of the exec functions. EINVAL The value of the pgid argument is less than 0, or is not a value supported by the implementation. EPERM The process indicated by the pid argument is a session leader. EPERM The value of the pid argument matches the process ID of a child process of the calling process and the child process is not in the same session as the calling process. EPERM The value of the pgid argument is valid but does not match the process ID of the process indicated by the pid argument and there is no process with a process group ID that matches the value of the pgid argument in the same session as the calling process. ESRCH The value of the pid argument does not match the process ID of the calling process or of a child process of the calling process. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
None. RATIONALE
The setpgid() function shall group processes together for the purpose of signaling, placement in foreground or background, and other job control actions. The setpgid() function is similar to the setpgrp() function of 4.2 BSD, except that 4.2 BSD allowed the specified new process group to assume any value. This presents certain security problems and is more flexible than necessary to support job control. To provide tighter security, setpgid() only allows the calling process to join a process group already in use inside its session or create a new process group whose process group ID was equal to its process ID. When a job control shell spawns a new job, the processes in the job must be placed into a new process group via setpgid(). There are two timing constraints involved in this action: 1. The new process must be placed in the new process group before the appropriate program is launched via one of the exec functions. 2. The new process must be placed in the new process group before the shell can correctly send signals to the new process group. To address these constraints, the following actions are performed. The new processes call setpgid() to alter their own process groups after fork() but before exec. This satisfies the first constraint. Under 4.3 BSD, the second constraint is satisfied by the synchronization property of vfork(); that is, the shell is suspended until the child has completed the exec, thus ensuring that the child has completed the setpgid(). A new version of fork() with this same synchronization property was considered, but it was decided instead to merely allow the parent shell process to adjust the process group of its child processes via setpgid(). Both timing constraints are now satisfied by having both the parent shell and the child attempt to adjust the process group of the child process; it does not matter which succeeds first. Since it would be confusing to an application to have its process group change after it began executing (that is, after exec), and because the child process would already have adjusted its process group before this, the [EACCES] error was added to disallow this. One non-obvious use of setpgid() is to allow a job control shell to return itself to its original process group (the one in effect when the job control shell was executed). A job control shell does this before returning control back to its parent when it is terminating or sus- pending itself as a way of restoring its job control "state" back to what its parent would expect. (Note that the original process group of the job control shell typically matches the process group of its parent, but this is not necessarily always the case.) FUTURE DIRECTIONS
None. SEE ALSO
exec() , getpgrp() , setsid() , tcsetpgrp() , the Base Definitions volume of IEEE Std 1003.1-2001, <sys/types.h>, <unistd.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 SETPGID(P)
All times are GMT -4. The time now is 10:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy