# ping 127.0.0.1 ping: sendmsg: Bad address

## Bernhard

Hi everybody,

when i do a ping to any adress i get:

```

 ~ # ping 127.0.0.1

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.

ping: sendmsg: Bad address

```

```

 ~ # ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

ping: sendmsg: Bad address

```

```

~ # traceroute 8.8.8.8

traceroute to google-public-dns-a.google.com (8.8.8.8), 30 hops max, 38 byte packets

 1  192.168.157.1 (192.168.157.1)  1.030 ms  2.046 ms  1.460 ms

 2  ppp-default.m-online.net (82.135.16.28)  123.403 ms  103.157 ms  66.710 ms

 3  ae0.rt-inxs-1.m-online.net (212.18.6.109)  103.412 ms  73.127 ms  75.039 ms

 4  93.104.240.55 (93.104.240.55)  75.270 ms  94.051 ms  101.148 ms

 5  209.85.252.215 (209.85.252.215)  82.355 ms 64.233.175.121 (64.233.175.121)  95.967 ms 209.85.253.113 (209.85.253.113)  95.576 ms

^C

```

Everything is working, it's just strange.

```

Strace:

write(1, "PING localhost (127.0.0.1) 56(84"..., 49) = 49

setsockopt(3, SOL_SOCKET, SO_TIMESTAMP, [1], 4) = 0

setsockopt(3, SOL_SOCKET, SO_SNDTIMEO, "\1\0\0\0\0\0\0\0", 8) = 0

setsockopt(3, SOL_SOCKET, SO_RCVTIMEO, "\1\0\0\0\0\0\0\0", 8) = 0

rt_sigaction(SIGINT, {0x804c840, [], SA_INTERRUPT}, NULL, 8) = 0

rt_sigaction(SIGALRM, {0x804c840, [], SA_INTERRUPT}, NULL, 8) = 0

rt_sigaction(SIGQUIT, {0x804bf30, [], SA_INTERRUPT}, NULL, 8) = 0

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

gettimeofday({1489525793, 277041}, NULL) = 0

ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0

ioctl(1, TIOCGWINSZ, {ws_row=71, ws_col=237, ws_xpixel=0, ws_ypixel=0}) = 0

gettimeofday({1489525793, 277129}, NULL) = 0

gettimeofday({1489525793, 277153}, NULL) = 0

sendmsg(3, {msg_name(16)={sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, msg_iov(1)=[{"\10\0pp\r\234\0\1!\\\310X\241:\4\0\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27"..., 64}], msg_controllen=0, msg_flags=0}, 0) $

recvmsg(3, 0xbff08130, MSG_ERRQUEUE|MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)

dup(2)                                  = 4

fcntl64(4, F_GETFL)                     = 0x8002 (flags O_RDWR|O_LARGEFILE)

fstat64(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77b3000

_llseek(4, 0, 0xbff08028, SEEK_CUR)     = -1 ESPIPE (Illegal seek)

write(4, "ping: sendmsg: Bad address\n", 27) = 27

close(4)                                = 0

munmap(0xb77b3000, 4096)                = 0

```

Any ideas how to trace down to the problem?

Thanks for any hints.

Bernhard

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]

----------

## eccerr0r

Did this suddenly show up?

I was about to guess an alias but the strace would prove that to be false.

My current guess would be a bad kernel...but not quite sure what.  Did you compile a kernel recently?

----------

## lexflex

Hi,

Could it be anything related to this (vserver, old kernel):

https://forums.gentoo.org/viewtopic-t-878211-start-0.html

Alex.

----------

