[Bug 9471] New: wget doesn't work on my system (http)
bugzilla at busybox.net
bugzilla at busybox.net
Fri Dec 9 05:12:45 UTC 2016
https://bugs.busybox.net/show_bug.cgi?id=9471
Bug ID: 9471
Summary: wget doesn't work on my system (http)
Product: Busybox
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Networking
Assignee: unassigned at busybox.net
Reporter: mrs.sub at gmail.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
Hi. wget refuses to wget on my systems (ArchLinux 4.8.12 and custom 4.9-rc8)
busybox versions:
v1.26.0.git snapshot from site (2016-12-09 00:20)
v1.25.1 from site (2016-10-07 15:24)
GCC version:
6.2.1 20160830 (from ArchLinux repositories)
After I request `wget http://localhost/` it returns
| Connecting to localhost (127.0.0.1:80)
| wget: error getting response
I'v tried to build it in many different ways: statically linked, dynamically
linked,
using glibc or musl - result was always the same. At the time wget from busybox
1.25.1
from official Arch repos works. `strace` comparison gave me a hint that the
source
code has been changed:
strace from version that *works*:
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
ioctl(3, TIOCGWINSZ, 0x7ffcd6cf39a8) = -1 ENOTTY (Inappropriate ioctl
for device)
writev(3, [{iov_base="GET / HTTP/1.1\r\nHost: localhost\r"..., iov_len=72},
{iov_base=NULL, iov_len=0}], 2) = 72
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={900, 0}},
{it_interval={0, 0}, it_value={899, 999701}}) = 0
readv(3, [{iov_base="", iov_len=0}, {iov_base="HTTP/1.1 200 OK\r\nServer:
nginx/1"..., iov_len=1024}], 2) = 497
strace from version that *doesn't work*:
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
ioctl(3, TIOCGWINSZ, 0x7fff515b5668) = -1 ENOTTY (Inappropriate ioctl
for device)
writev(3, [{iov_base="GET / HTTP/1.1\r\nHost: localhost\r"..., iov_len=72},
{iov_base=NULL, iov_len=0}], 2) = 72
* shutdown(3, SHUT_WR) = 0
setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={900, 0}},
{it_interval={0, 0}, it_value={899, 966622}}) = 0
readv(3, [{iov_base="", iov_len=0}, {iov_base="", iov_len=1024}], 2) = 0
And then I've found this commit:
https://git.busybox.net/busybox/commit/networking/wget.c?id=de3da6bf87a579a344b0581c6f2ce6a40166b432
I commented the line out, recompile busybox and get wget working. I don't
really know
if it affects others' systems. It can be that my host is misconfigured.
A guess is that kernel closes write ability for a connection before all the
request
is transmitted but I really don't know.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list