Core File Not Being Generated in AIX


 
Thread Tools Search this Thread
Top Forums Programming Core File Not Being Generated in AIX
# 1  
Old 09-17-2003
Core File Not Being Generated in AIX

I have created an executable using my login session in an AIX Version 5 Unix system. After to which I have change the file mode to set uid and rwsrwx--x and ownership to root:system by using the following Standard C Library functions.

chmod (name, S_ISUID|S_IRWXU|S_IRWXG|S_IXOTH|S_IROTH)
chown (name, 0, 1)

where name is the name of the executable whose permissions needs to be changed. When I execute my executable using my login session, the executable gives a segmentation fault but the core file is not being generated. When I saw the man page of core in the system it said that "A process with a saved user ID that differs from the real user ID does not produce a memory image. The same holds true for the group ID (GID) and effective
group ID" .

Is it possible that we can generate a core file through some technique which would aid me in tracing the cause of the segmentation fault.
# 2  
Old 09-17-2003
Hi,

You could truss or tusc the process when you start the program.
In Solaris/HP-ux it goes like :

truss /program/to/start/myprog

When debugging an already running program you can do :

truss -p <processid>


There is one note :

AIX 5.1 has 'truss'.

AIX 4.3.3 and earlier you can use the 'trace' command - but it's a pain because it's a system-level trace from which you can then extract the information for the process you cared about.


Regs David
# 3  
Old 09-17-2003
On AIX, isn't there a way to allow a process to write a core file? (Assuming it dies as the result of the default action of an appropiate signal)

It may be that the program drops core (or dies trying) once in a blue moon. You can't run truss hundreds or thousands of times.
# 4  
Old 09-18-2003
As per Perderabo advice, I tried various options by using the 'smit' tool in AIX for "a proces to allow to creat a core file .." but was incapable to do so. I am unable to proceed further cause of this.

I would appreciate if someone could provide me accurate information or solution for the existing issue.
# 5  
Old 09-18-2003
I don't know too much about AIX but on Linux you have to play with 'ulimit' to set the size of core file allowed on your system. If the size of core file being generated is bigger than the limit specified it won't be created. Is there something like this on AIX?
# 6  
Old 09-19-2003
Dang! I saw AIX in the original post and I just moved on since I don't know AIX. But now I just read the post....

The program is suid to root! If you run it as an ordinary user, it will not drop core. This is a security feature in most versions of unix.

Remove the suid bit or sign on as root to run it.
# 7  
Old 09-23-2003
Thanks a lot Perderabo for all your help. By removing the set uid bit the process was able to generate the core dump image file.

Thanks for all your assistance.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Adding CR to ascii data file generated on AIX platform and will be transmitted to Windows OS

I desperately need help converting ascii data file generated on AIX platform that contains dollar sign ($) at the end of each line in the data file as shown below. ME570^0128237^HG278999^20140805:21:00:00^BEENZ001^$ This is the AWK command for adding CR to the new line. awk... (1 Reply)
Discussion started by: cumeh1624
1 Replies

2. Programming

How to know which binary generated obtained core dump?

Hello, Suppose there are large number of binaries are executing on a system. Meanwhile, we find a dump, now how can we know from core dump that which binary file it is related to? Thanks ---------- Post updated at 02:01 PM ---------- Previous update was at 01:53 PM ---------- I have got... (1 Reply)
Discussion started by: ezee
1 Replies

3. AIX

AIX core,cpu and application list

Hi All , I am trying to pull out below things from AIX machine (any type) 1. number of physical processor 2. number of logical processsors 3. Total number of processors (physical plus logical) 4. total number of cores 5. list of installed applications with versions and vendor name ... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies

4. Linux

Core file not getting generated!!

Some strange behavior. Process is receiving Segmentation Fault. But no core files getting generated. I have checked ulimit. coredumpsize = unlimited. In console, process is printing Segmentation Fault even through gdb also same behavior But No corefile. Any possible reason ? ... (3 Replies)
Discussion started by: ashokd001
3 Replies

5. Solaris

core files not getting generated

Hi, We have an application ASPA . The application related processes are running in /ASPA/bin directory . now whenever a process terminates abruptly , a core file should be generated (correct me if i am wrong) in the /ASPA/bin directory . But i am not able to see any such files . The... (4 Replies)
Discussion started by: asalman.qazi
4 Replies

6. AIX

no of core in cpu for aix

is there command which will display no of core per cpu in aix? Regads, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

7. Programming

AIX core dumps

My program is not dumping core when hitting a segmentation violation inside a thread. However, it dumps core when the segv occurs within main. Any ideas on how to diagnose this? AIX 5.3 (4 Replies)
Discussion started by: bean66
4 Replies

8. AIX

How to do core dump analysis in AIX?

Please tell me some methods to analyse core dump in AIX.:) (2 Replies)
Discussion started by: Mythili
2 Replies

9. AIX

Why a core file is created whenever I send a mail in AIX

Whenever i send a mail like: mail <mail id>, a core file is created under /var/spool/mqueue/ path. This is increasing the space of the file system. Why is that core file get created. Does it happens normally. I am getting an errpt error as: LABEL: CORE_DUMP IDENTIFIER: B6048838 ... (0 Replies)
Discussion started by: sreereddy
0 Replies

10. UNIX for Advanced & Expert Users

AIX - Core dump when using mkuser

Hi all, I've got a strange problem here that is not documented in AIX FAQs and tech docs, and I was wondering if somebody out there encountered the same issue or had an idea to help me out. I'm using a script to create users with the "mkuser" command. I can set up any options I want (like... (1 Reply)
Discussion started by: dfrangidis
1 Replies
Login or Register to Ask a Question