[
https://issues.apache.org/jira/browse/MESOS-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14549744#comment-14549744
]
Littlestar commented on MESOS-2636:
-----------------------------------
hostname in net.hpp has same problem
{noformat}
inline Try<std::string> hostname()
{
char host[512];
if (gethostname(host, sizeof(host)) < 0) {
return ErrnoError();
}
// TODO(evelinad): Add AF_UNSPEC when we will support IPv6
struct addrinfo hints = createAddrInfo(SOCK_STREAM, AF_INET, AI_CANONNAME);
struct addrinfo *result;
int error = getaddrinfo(host, NULL, &hints, &result);
if (error != 0 || result == NULL) {
if (result != NULL) {
freeaddrinfo(result);
}
return Error(gai_strerror(error));
}
std::string hostname = result->ai_canonname;
freeaddrinfo(result);
return hostname;
}
{noformat}
> Segfault in inline Try<IP> getIP(const std::string& hostname, int family)
> -------------------------------------------------------------------------
>
> Key: MESOS-2636
> URL: https://issues.apache.org/jira/browse/MESOS-2636
> Project: Mesos
> Issue Type: Bug
> Reporter: Chi Zhang
> Assignee: Chi Zhang
> Labels: twitter
> Fix For: 0.23.0
>
>
> We saw a segfault in production. Attaching the coredump, we see:
> Core was generated by `/usr/local/sbin/mesos-slave --port=5051
> --resources=cpus:23;mem:70298;ports:[31'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x00007f639867c77e in free () from /lib64/libc.so.6
> (gdb) bt
> #0 0x00007f639867c77e in free () from /lib64/libc.so.6
> #1 0x00007f63986c25d0 in freeaddrinfo () from /lib64/libc.so.6
> #2 0x00007f6399deeafa in net::getIP (hostname="<redacted>", family=2) at
> ./3rdparty/stout/include/stout/net.hpp:201
> #3 0x00007f6399e1f273 in process::initialize (delegate=Unhandled dwarf
> expression opcode 0xf3
> ) at src/process.cpp:837
> #4 0x000000000042342f in main ()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)