HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can I validate the functionality of libc?
Operating System - HP-UX
1834632
Members
3460
Online
110069
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
04-04-2007 12:25 AM
04-04-2007 12:25 AM
How can I validate the functionality of libc?
I've been attempting to compile code, however it fails and cores. I'm running on a rp3440 and HP 11.11. I ran the code on one rp3440 with no problems but on another it dropped a core file:
Output from good server:
lccas243$ gcc -o buggy buggy.c
lccas243$ gcc -Wall -g -o buggy buggy.c
lccas243$ ./buggy
res->ai_flags = 4
res->ai_family = 2
res->ai_socktype = 0
res->ai_addrlen = 16
res->ai_canonname = (NULL)
res->ai_addr = 0x40003170
res->ai_next = 0x0
---
And from server with issues:
armsweb3$ ./buggy
/usr/lib/dld.sl: Unresolved symbol: getaddrinfo (code) from ./buggy
Abort(coredump)
If I try to compile it on armsweb3, I get this result:
armsweb3$ gcc -Wall -g -o buggy buggy.c
buggy.c: In function 'main':
buggy.c:12: error: storage size of 'hints' isn't known
buggy.c:17: error: 'AI_PASSIVE' undeclared (first use in this function)
buggy.c:17: error: (Each undeclared identifier is reported only once
buggy.c:17: error: for each function it appears in.)
buggy.c:18: error: 'AI_CANONNAME' undeclared (first use in this function)
buggy.c:22: warning: implicit declaration of function 'getaddrinfo'
buggy.c:28: error: dereferencing pointer to incomplete type
buggy.c:29: error: dereferencing pointer to incomplete type
buggy.c:30: error: dereferencing pointer to incomplete type
buggy.c:31: error: dereferencing pointer to incomplete type
buggy.c:33: error: dereferencing pointer to incomplete type
buggy.c:33: error: dereferencing pointer to incomplete type
buggy.c:34: error: dereferencing pointer to incomplete type
buggy.c:35: error: dereferencing pointer to incomplete type
buggy.c:37: error: dereferencing pointer to incomplete type
buggy.c:12: warning: unused variable 'hints'
I'm NOT asking HP to support apache. I'm asking them to support their operating system.
Here's the illustrative code snippet:
#include
#include
#include
#include
#include
#include
int
main()
{
int i;
struct addrinfo hints;
struct addrinfo *res;
char addr[] = "1.81.22.11";
memset(&hints,0,sizeof(hints));
hints.ai_family |= AI_PASSIVE;
hints.ai_family |= AI_CANONNAME;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
if((i = getaddrinfo(addr, NULL, NULL, &res)) != 0){
perror("getaddrinfo failed");
exit(1);
}
do {
printf ("res->ai_flags = %d\n", res->ai_flags);
printf ("res->ai_family = %d\n", res->ai_family);
printf ("res->ai_socktype = %d\n", res->ai_socktype);
printf ("res->ai_addrlen = %d\n", (int) res->ai_addrlen);
printf ("res->ai_canonname = %s\n",
(res->ai_canonname? res->ai_canonname:"(NULL)"));
printf ("res->ai_addr = 0x%0x\n", (unsigned int) res->ai_addr);
printf ("res->ai_next = 0x%0x\n", (unsigned int) res->ai_next);
printf ("---\n");
} while ((res = res->ai_next));
exit(0);
}
Any hints will be greatly appreciated.
Regards,
Output from good server:
lccas243$ gcc -o buggy buggy.c
lccas243$ gcc -Wall -g -o buggy buggy.c
lccas243$ ./buggy
res->ai_flags = 4
res->ai_family = 2
res->ai_socktype = 0
res->ai_addrlen = 16
res->ai_canonname = (NULL)
res->ai_addr = 0x40003170
res->ai_next = 0x0
---
And from server with issues:
armsweb3$ ./buggy
/usr/lib/dld.sl: Unresolved symbol: getaddrinfo (code) from ./buggy
Abort(coredump)
If I try to compile it on armsweb3, I get this result:
armsweb3$ gcc -Wall -g -o buggy buggy.c
buggy.c: In function 'main':
buggy.c:12: error: storage size of 'hints' isn't known
buggy.c:17: error: 'AI_PASSIVE' undeclared (first use in this function)
buggy.c:17: error: (Each undeclared identifier is reported only once
buggy.c:17: error: for each function it appears in.)
buggy.c:18: error: 'AI_CANONNAME' undeclared (first use in this function)
buggy.c:22: warning: implicit declaration of function 'getaddrinfo'
buggy.c:28: error: dereferencing pointer to incomplete type
buggy.c:29: error: dereferencing pointer to incomplete type
buggy.c:30: error: dereferencing pointer to incomplete type
buggy.c:31: error: dereferencing pointer to incomplete type
buggy.c:33: error: dereferencing pointer to incomplete type
buggy.c:33: error: dereferencing pointer to incomplete type
buggy.c:34: error: dereferencing pointer to incomplete type
buggy.c:35: error: dereferencing pointer to incomplete type
buggy.c:37: error: dereferencing pointer to incomplete type
buggy.c:12: warning: unused variable 'hints'
I'm NOT asking HP to support apache. I'm asking them to support their operating system.
Here's the illustrative code snippet:
#include
#include
#include
#include
#include
#include
int
main()
{
int i;
struct addrinfo hints;
struct addrinfo *res;
char addr[] = "1.81.22.11";
memset(&hints,0,sizeof(hints));
hints.ai_family |= AI_PASSIVE;
hints.ai_family |= AI_CANONNAME;
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
if((i = getaddrinfo(addr, NULL, NULL, &res)) != 0){
perror("getaddrinfo failed");
exit(1);
}
do {
printf ("res->ai_flags = %d\n", res->ai_flags);
printf ("res->ai_family = %d\n", res->ai_family);
printf ("res->ai_socktype = %d\n", res->ai_socktype);
printf ("res->ai_addrlen = %d\n", (int) res->ai_addrlen);
printf ("res->ai_canonname = %s\n",
(res->ai_canonname? res->ai_canonname:"(NULL)"));
printf ("res->ai_addr = 0x%0x\n", (unsigned int) res->ai_addr);
printf ("res->ai_next = 0x%0x\n", (unsigned int) res->ai_next);
printf ("---\n");
} while ((res = res->ai_next));
exit(0);
}
Any hints will be greatly appreciated.
Regards,
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2007 12:33 AM
04-04-2007 12:33 AM
Re: How can I validate the functionality of libc?
Shalom,
Could be a system problem.
Maybe the library is corrupted on the system its being compiled on where it drops a core.
Maybe the system needs to be patched.
Make sure the systems are totally equal before investing time in validation.
SEP
Could be a system problem.
Maybe the library is corrupted on the system its being compiled on where it drops a core.
Maybe the system needs to be patched.
Make sure the systems are totally equal before investing time in validation.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2007 01:23 AM
04-04-2007 01:23 AM
Re: How can I validate the functionality of libc?
You probably dont have all the systems at the same patch level or code level. Have you checked that?
Seems to be a common error with getaddrinfo
This thread mentions specific patches to look at
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1076123&admit=-682735245+1175692835899+28353475
Seems to be a common error with getaddrinfo
This thread mentions specific patches to look at
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1076123&admit=-682735245+1175692835899+28353475
"Downtime is a Crime."
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP