- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Got Memory fault(coredump) on HPUX-PA 11.11
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
тАО08-19-2010 08:08 AM
тАО08-19-2010 08:08 AM
I got Memory fault(coredump) on HPUX-PA 11.11 during compilation.
Here is the log
pkgdata: /vob/hpux-pa/usr/bin/cc -g -O +DAportable +DS1.1 -D_REENTRANT -Ae +Olit=all -c -I/vob/icu/src/source/common -I../common +Z -o ./out/tmp/confusables_cfu.o ./out/tmp/confusables_cfu.c
cpp: warning 2021: Possibly incorrect message catalog.
/bin/sh: 2680 Memory fault(coredump)
gmake: *** [packagedata] Error 139
Stack trace shows
$ gdb ../bin/pkgdata -c core
HP gdb 5.2 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00
and target hppa1.1-hp-hpux11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.2 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `pkgdata'.
Program terminated with signal 11, Segmentation fault.
Unknown si_code. Report to HP.
#0 0xc01f4098 in __fwrite_unlocked+0x220 () from /usr/lib/libc.2
(gdb) bt
#0 0xc01f4098 in __fwrite_unlocked+0x220 () from /usr/lib/libc.2
#1 0xc01f7d94 in __ldfcvt_r+0x3b1c () from /usr/lib/libc.2
#2 0x6b697470 in
#3 0xc01f7d94 in __ldfcvt_r+0x3b1c () from /usr/lib/libc.2
Cannot access memory at address 0x746d605b
(gdb) q
I had searched web and found similar issues but unfortunately didn't help.
Did anyone came accross/aware of this issues OR similar one?
BTW,
$ uname -a
HP-UX eshpx080 B.11.11 U 9000/800 1542770548 unlimited-user license
$ /vob/hpux-pa/opt/ansic/bin/cc -V
/usr/ccs/bin/ld: 92453-07 linker linker ld B.11.67 081202
Any help in this regards is appreciated.
Thanks
regards,
Srikrishna Erra.
Solved! Go to Solution.
- Tags:
- SIGSEGV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2010 07:59 AM
тАО08-20-2010 07:59 AM
Re: Got Memory fault(coredump) on HPUX-PA 11.11
>../bin/pkgdata
No, you got it during building. The compiler isn't aborting, which program is this?
>$ /vob/hpux-pa/opt/ansic/bin/cc -V
The above option doesn't work on PA, unless you provide a .c file.
Use "what /vob/hpux-pa/opt/ansic/bin/cc"
Also, you might as well change +DS1.1 to +DS2.0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2010 07:37 AM
тАО08-25-2010 07:37 AM
Re: Got Memory fault(coredump) on HPUX-PA 11.11
>>No, you got it during building. The compiler isn't aborting, which program is this?
pkgdata is an executable (generated from a cpp program). It prepares command to run based on the arguments passed to it. It has below code
printf("pkgdata: %s\n", cmd);
int result = system(cmd);
if (result != 0) {
printf("-- return status = %d\n", result);
>>Also, you might as well change +DS1.1 to +DS2.0.
I have changed it but no use.
pkgdata: /vob/hpux-pa/usr/bin/cc -g -O +DAportable +DS2.0 -D_REENTRANT -Ae +Olit=all -c -I/vob/icu/src/source/common -I../common +Z -o ./out/tmp/confusables_cfu.o ./out/tmp/confusables_cfu.c
[New process 9958]
Detaching after fork from process 9958
cpp: warning 2021: Possibly incorrect message catalog.
Program received signal SIGSEGV, Segmentation fault
si_code: 0 - SEGV_UNKNOWN - Unknown Error.
0x7aff2098 in __fwrite_unlocked+0x220 () from /usr/lib/libc.2
(gdb) where
#0 0x7aff2098 in __fwrite_unlocked+0x220 () from /usr/lib/libc.2
#1 0x7aff5d94 in __ldfcvt_r+0x3b1c () from /usr/lib/libc.2
#2 0x2e2f6f74 in
#3 0x7aff5d94 in __ldfcvt_r+0x3b1c () from /usr/lib/libc.2
Error accessing memory address 0x55534f9e: Bad address.
(gdb)
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2010 10:01 PM
тАО08-25-2010 10:01 PM
Solutionprintf("pkgdata: %s\n", cmd);
int result = system(cmd);
if (result != 0) {
printf("-- return status = %d\n", result);
There has to be more than this?
It seems to be executing the printf and system(3). You need to debug pkgdata and see if you can find a place where it is printing a long double: %Lf (call to _ldfcvt_r?)
What version of gdb do you have? Your stack trace seems to have problems and perhaps the latest will work better.
http://www.hp.com/go/wdb
>I have changed it but no use.
Of course. That was just to make it faster after you get it working. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2010 07:04 AM
тАО09-03-2010 07:04 AM
Re: Got Memory fault(coredump) on HPUX-PA 11.11
Sorry for late response.
I had resolved this issue. Issue was with the code. There was sprintf which resulted in coredump.
sprintf(cmd, "%s", command);
cmd is delcared as
#define SMALL_BUFFER_MAX_SIZE 512
char cmd[SMALL_BUFFER_MAX_SIZE];
but Length of command is 9094 bytes.
(gdb) p strlen(command)
$45 = 9094
This is creating the issue here and i got fixed the same.
Thanks for all your suggestions.
regadrs,
Srikrishna Erra.
- Tags:
- sprintf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2010 09:46 AM
тАО09-03-2010 09:46 AM
Re: Got Memory fault(coredump) on HPUX-PA 11.11
Thanks for the details.
>sprintf(cmd, "%s", command);
If you could use snprintf you could range check the function. If your format is that simple, better to use strcpy or strncpy.