Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 730154 - >=net-misc/iputils-20190515 breaks arping deadline option
Summary: >=net-misc/iputils-20190515 breaks arping deadline option
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:45 UTC by Nuno
Modified: 2020-08-24 17:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno 2020-06-29 15:45:21 UTC
iputils' arping has a -w deadline option, which allows to "Specify a timeout, in seconds, before arping exits regardless of how many packets have been sent or received".


In net-misc/iputils-20180629, the deadline option works (tested on amd64 and arm). E.g. for a dead host:

# time arping -w 3 -f 192.168.1.10 -I br1
ARPING 192.168.1.3 from 192.168.1.10 br1
Sent 4 probes (4 broadcast(s))
Received 0 response(s)

real    0m4.011s
user    0m0.001s
sys     0m0.000s


However, starting with net-misc/iputils-20190515, arping seems to wait forever and doesn't exit.
It doesn't seem to be blocked/dead. Using strace, I can see it keeps repeating the following calls every ~1 second:

read(5, "\1\0\0\0\0\0\0\0", 8)          = 8
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=4537848, tv_nsec=475941894}) = 0
sendto(3, "\0\1\10\0\6\4\0\1\0\33!\20\245z\300\250\1\1\377\377\377\377\377\377\300\250\1\n", 28, 0, {sa_family=AF_PACKET, sll_protocol=htons(ETH_P_ARP), sll_ifindex=if_nametoindex("br1"), sll_hatype=ARPHRD_ETHER, sll_pkttype=PACKET_HOST, sll_halen=6, sll_addr=[0xff, 0xff, 0xff, 0xff, 0xff, 0xff]}, 20) = 28
poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}, {fd=5, events=POLLIN|POLLERR|POLLHUP}, {fd=3, events=POLLIN|POLLERR|POLLHUP}], 3, -1



The following versions are affected:

net-misc/iputils-20190709-r1 (tested on amd64 and arm)
net-misc/iputils-20190709 (tested on amd64 only)
net-misc/iputils-20190515 (tested on amd64 only)

I only noticed the issue now that net-misc/iputils-20190709-r1 was stabilised.
In the mean time, I will revert my systems to version 20180629.

This is probably a bug upstream, but I don't know of a more appropriate place to report it.

Any help is appreciated. Thanks in advance.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-30 19:20:14 UTC
Why are you using that version?  Newer version is already stable...

*** This bug has been marked as a duplicate of bug 692982 ***
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-30 19:21:39 UTC
Wait, looks like you are reporting a different issue.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-30 19:22:28 UTC
Can you please test patch from https://github.com/iputils/iputils/issues/211 ?
Comment 4 Nuno 2020-06-30 19:59:47 UTC
Thanks, Thomas. I didn't know they where on GitHub.

I just tried https://github.com/iputils/iputils/commit/1df5350bdc952b14901fde356b17b78c2bcd4cff.patch on amd64 with version 20190709-r1.

It fixes the issue with "-w" when used with "-f":

# time arping -w 3 -f 192.168.1.10 -I br1
ARPING 192.168.1.10 from 192.168.1.1 br1
Sent 3 probes (3 broadcast(s))
Received 0 response(s)

real    0m3.008s
user    0m0.000s
sys     0m0.002s


BUT "-w" on its own is still broken (only exits after Ctrl+C):

# time arping -w 3 192.168.1.10 -I br1
ARPING 192.168.1.10 from 192.168.1.1 br1
^CSent 167 probes (167 broadcast(s))
Received 0 response(s)

real    2m47.010s
user    0m0.002s
sys     0m0.011s


Should I report this on GitHub?
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2020-06-30 21:02:21 UTC
Yes please. Maybe try our live ebuild first to check if it's still broken in upstream's repository.
Comment 6 Nuno 2020-07-02 13:48:02 UTC
I just tried the live ebuild on amd64 and it seems to be fixed upstream already, so no need for a report upstream.

repository:               https://github.com/iputils/iputils.git                                                                                                                                                                               at the commit:            74790fd2128aac88796e9fe5cb28787e97902044

# time arping -w 3 -f 192.168.1.10 -I br1
ARPING 192.168.1.10 from 192.168.1.1 br1
Sent 4 probes (4 broadcast(s))
Received 0 response(s)

real    0m3.011s
user    0m0.000s
sys     0m0.002s
# time arping -w 3 192.168.1.10 -I br1
ARPING 192.168.1.10 from 192.168.1.1 br1
Sent 4 probes (4 broadcast(s))
Received 0 response(s)

real    0m3.007s
user    0m0.000s
sys     0m0.002s


I also discovered this issue upstream which is exactly what I reported: https://github.com/iputils/iputils/issues/259

If you want to release a new ebuild revision to 20190709, the patches necessary to fix the issue (which I also tested) are:
# cd /etc/portage/patches/net-misc/iputils-20190709-r1 && ls | cat
0001-1df5350bdc952b14901fde356b17b78c2bcd4cff.patch
0002-ec821e572a640bd79aecc3922cb9001f4b6b26f2.patch
0003-e594ca52afde89746b7d79c875fe9d6aea1850ac.patch

18f14be80466ddc8fb17a400be82764a779c8dcd is also needed and is already applied to 20190709-r1
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2020-08-23 02:18:36 UTC
Should be fixed with iputils-20200821.
Comment 8 Nuno 2020-08-24 17:49:55 UTC
Just tested on amd64/arm and it works. Thanks!