- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: problem c-program (memory fault)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 12:57 AM
тАО05-30-2005 12:57 AM
problem c-program (memory fault)
So we compiled exactly the same c-source on another server (hp-ux 10.20, PA 1.1, lets call this server "B") and it runs perfectly on B.
Now we took the executable from B to A and it wil not run: Memory fault(coredump).
And when we take the executable from A to B and it runs perfectly.
So both compiled executables will run: on B. And both executables will not run on A.
FYI: server A has far more memory than server B.
Putting this problem so 'general' as above: does anyone have a good idea where to look first?
(We also compiled on "C" (hp-ux 11.00 PA 2.0) and this has the same effect: the executable will not run on A (memory fault) and it run's on B; it will not run on C)
- Tags:
- SIGSEGV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 01:08 AM
тАО05-30-2005 01:08 AM
Re: problem c-program (memory fault)
try creating a simple hello world program and see whether it runs on server A. if it is then the more likely issue could be your C program, the way it initiates the program memory.
check for the change log between 10.20 and 11.00 and see whether there is anything specific to memory module is mentioned.
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 01:18 AM
тАО05-30-2005 01:18 AM
Re: problem c-program (memory fault)
It could as well be a shared library that misbehavess, or - in case of (n)curses programs - a misconfigured termcap or terminfo entry
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 01:32 AM
тАО05-30-2005 01:32 AM
Re: problem c-program (memory fault)
adb>$c
main(1,7F7F094C) from main+8
main+8_end($START$+1A0
$START$+1A0
adb>
gdb calc_statistic_lml core produces:
Core was generated by `calc_statistic'.
Program terminated with signal 11, Segmentation fault.
#0 0x1d00c in main (argc=1, argv=0x7f7f094c) at calc_statistic_lml.c:200
200 sessie = 1;
(gdb)
This is all abacadabra to me. To you ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 02:46 AM
тАО05-30-2005 02:46 AM
Re: problem c-program (memory fault)
]
] adb>$c
] main(1,7F7F094C) from main+8
] main+8_end($START$+1A0
] $START$+1A0
] adb>
Your stack is corrupted
] gdb calc_statistic_lml core produces:
]
] Core was generated by `calc_statistic'.
] Program terminated with signal 11, Segmentation fault.
] #0 0x1d00c in main (argc=1, argv=0x7f7f094c) at calc_statistic_lml.c:200
] 200 sessie = 1;
] (gdb)
]
] This is all abacadabra to me. To you ?
please show us the function that is defined in calc_statistics_lml.c about line 200 and make sure that it includes the function header. For example
line:code
195:int main (int argc, char *argv[])
196:{
197: short foo;
198:
199: foo = 1;
200: *((long long *)&foo) = 12345678L;
Just to give you an example of what could cause such a core dump
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 02:47 PM
тАО05-30-2005 02:47 PM
Re: problem c-program (memory fault)
Now I see that there can be one of two reasons for this:
1) There is incompatibility introduced in 11.11, I am not sure how to cathc this or corrcet this.
2) The application has some null dereference statement or unitialized pointer dereference. In this case I would suggest you to use some lint software to see if there is any trivial bug. Verify the printf statements to see that the number of arguments matches with the format string requirements. Similarly look for other varargs statements. This should be straightforward as you already know the function that is causing memory fault.
Having said everything, I am great admirer of gdb and owuld suggest you to continue using that to locate the issue.
-Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 11:30 PM
тАО05-30-2005 11:30 PM
Re: problem c-program (memory fault)
I increased kernel-variable MAXSSIZ and then it worked.
Thank you all.
- Tags:
- maxssiz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 01:07 AM
тАО05-31-2005 01:07 AM
Re: problem c-program (memory fault)
Anyway learned something new.:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2005 02:29 AM
тАО07-27-2005 02:29 AM