First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 33827
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Seemant Kulleen (RETIRED) <seemant@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Marcin Kryczek (RETIRED) <mkay@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
wget_pre20031125.ebuild.tar.bz2 wget_pre20031125.ebuild.tar.bz2 application/octet-stream Sven Wegener 2003-11-25 15:02 0000 1.61 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 33827 depends on: Show dependency tree
Bug 33827 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-11-19 07:32 0000
wget from 1.9.* series doesn't download files when the adress is specified as 
IP. It just prints 'Aborted' without even try to connect. 
example:
<aye@CogES>~: wget http://127.0.0.1
--16:25:00--  http://127.0.0.1/
           => `index.html'
Aborted

but works with domain:
<aye@CogES>~: wget http://localhost
--16:25:36--  http://localhost/
           => `index.html'
Resolving localhost... 127.0.0.1
Connecting to localhost[127.0.0.1]:80... failed: Connection refused.

i've talked with people on irc and i know that i'm not alone with this problem, 
but noone could help


Reproducible: Always
Steps to Reproduce:




i've done:
<aye@CogES>~: strace wget http://127.0.0.1 > ip.log 2>&1
<aye@CogES>~: strace wget http://localhost > domena.log 2>&1

and here are diffrences:
<aye@CogES>~: diff ip.log domena.log 
1c1
< execve("/usr/bin/wget", ["wget", "http://127.0.0.1"], [/* 42 vars */]) = 0
---
> execve("/usr/bin/wget", ["wget", "http://localhost"], [/* 42 vars */]) = 0
78,79c78,79
< getpid()                                = 3051
< getpid()                                = 3051
---
> getpid()                                = 3053
> getpid()                                = 3053
82c82
< read(3, "P\t\275f\337\330C\36\342m\234\217p\227\321W\32\311\317"..., 32) = 32
---
> read(3, "\276\244\241\324I\346\265\365\314\365\375\214\265i{vk\253"..., 32) = 
32
84,85c84,85
< getpid()                                = 3051
< getpid()                                = 3051
---
> getpid()                                = 3053
> getpid()                                = 3053
87,89c87,89
< getpid()                                = 3051
< time(NULL)                              = 1069254156
< getpid()                                = 3051
---
> getpid()                                = 3053
> time(NULL)                              = 1069254166
> getpid()                                = 3053
91c91
< time(NULL)                              = 1069254156
---
> time(NULL)                              = 1069254166
98c98
< write(2, "--16:02:36--  http://127.0.0.1/\n"..., 59--16:02:36--  http://127.0.
0.1/
---
> write(2, "--16:02:46--  http://localhost/\n"..., 59--16:02:46--  http:
//localhost/
101,105c101,153
< rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
< getpid()                          
< kill(3051, SIGABRT)                     = 0
< --- SIGABRT (Aborted) @ 0 (0) ---
< +++ killed by SIGABRT +++
---
> write(2, "Resolving localhost... ", 23Resolving localhost... ) = 23
      = 3051
[...cuted...] // the rest thing is about correct connecting to localhost

my emerge info:
<aye@CogES>~: emerge info
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.4.22-bk37)
=================================================================
System uname: 2.4.22-bk37 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -Os -pipe -mmmx -m3dnow -msse -fomit-frame-pointer 
-ffast-math"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config 
/usr/kde/2/share/config /usr/kde/3/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -pipe -mmmx -m3dnow -msse -fomit-frame-pointer 
-ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache autoaddcvs sandbox"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.
tu-clausthal.de/pub/linux/gentoo/ http://www.mirror.ac.uk/sites/www.ibiblio.
org/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://ftp.
uni-erlangen.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.
de/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.easynet.
nl/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.
inode.at/ ftp://ftp.rhnet.is/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/mnt/gentoo"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/my_ebuilds"
SYNC="rsync://rsync.gentoo.pl/gentoo-portage"
USE="x86 oss avi crypt cups encode foomaticdb gif jpeg libg++ mikmod motif mpeg 
ncurses nls pdflib png quicktime spell truetype xmms xv zlib gdbm berkdb slang 
readline arts tcltk java mysql postgres X sdl gpm tcpd pam libwww ssl perl 
python esd imlib oggvorbis opengl mozilla 3dnow acpi apache2 curl dvd fbcon 
flash javascript jikes lcms mbox memlimit mmx moznocompose moznoirc moznomail 
moznoxft nocardbus pda ppds samba sasl sse tiff v4l videos vim-with-x wmf xvid 
-apm -kde -gnome -mad -svga -xml2 -gtk -qt"

------- Comment #1 From Neil Watson 2003-11-19 08:52:11 0000 -------
127.0.0.1 is a rather special IP.  Can you confirm this with a public or
private IP?  I tried it an there was no problem:

wget http://216.138.221.7
--11:46:19--  http://216.138.221.7/
           => `index.html'
Connecting to 216.138.221.7:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,238 [text/html]

100%[===============================================================================================>]
2,238         --.--K/s             

11:46:19 (21.34 MB/s) - `index.html' saved [2238/2238]

------- Comment #2 From Marcin Kryczek (RETIRED) 2003-11-19 08:59:39 0000 -------
hmm.. i havn't noticed it, but it doesn't work with any IP for me. 
additionaly - i know that it works on some computers and doesn't work on other, however i don't know why. Could you sen me via mail your C*FLAGS and USE flags? 

------- Comment #3 From Neil Watson 2003-11-19 09:45:40 0000 -------
My flags are nothing special:
CFLAGS="-march=athlon-mp -O3 -pipe"
USE="-maildir mbox nls tcltk"

------- Comment #4 From Greg Fitzgerald (RETIRED) 2003-11-19 15:00:13 0000 -------
*** Bug 33833 has been marked as a duplicate of this bug. ***

------- Comment #5 From Marcin Kryczek (RETIRED) 2003-11-19 17:12:08 0000 -------
i was looking at sources and i've found where the bug is, but i still can't fix
it (well - it's late and in the matter of fact i'm not programming in C at
all).
anyway - this bug is coused by wget-1.9+ipvmisc.patch and it's connected with
ip_family variable. program aborts in function 'wget_sockaddr_set_address' in
host.c, where ip_family is always AF_INET6, if we specify adress as ip. 

------- Comment #6 From Mr. Bones. 2003-11-19 17:15:15 0000 -------
*** Bug 33879 has been marked as a duplicate of this bug. ***

------- Comment #7 From Piotr Bieniaszewski 2003-11-20 03:01:11 0000 -------
in my case, it doesn't matter if i give a domain name or ip address. in  both
cases it aborts. i'm only able to download something when i give "-Y off"
option (even if using of proxy is turned off in wgetrc).

------- Comment #8 From barthek 2003-11-20 04:08:51 0000 -------
for me also the problem does not depend on whether i use ip or fqdn.
indeed the problem comes from the wget-1.9+ipvmisc.patch:

unpatched wget's function wget_sockaddr_set_address gets called with these params:
wget_sockaddr_set_address (sa=0xbfffd750, ip_family=2, port=8080, addr=0xbfffd790) at host.c:284

patched version:
wget_sockaddr_set_address (sa=0xbfffdc50, ip_family=10, port=0, addr=0x402469a0) at host.c:342

ip_family=10 is ipv6 family which wget was not compiled with (the
'ENABLE_IPV6' stuff)
ARI's patch assumes that default family used is that of IPv6's,
unless --with-ipv4-default is used during configure.

dunno what to do next nor whether my findings are correct. :)

------- Comment #9 From Imad R. Faiad 2003-11-20 05:42:03 0000 -------
there used to be a USE flag to disable ipv6, namely "ipv6", the new ebuild
doesn't have it anymore.  this ipv6 patch is breaking things down, I suggest
that it either be removed or somehow allow the user to disable it.

------- Comment #10 From André Terpstra 2003-11-20 07:34:06 0000 -------
I also have this problem. I've been searching like wild, thinking that my local
FTP server had broken down... I finally decided to return to wget 1.9 with

"emerge -v /usr/portage/net-misc/wget/wget-1.9.ebuild"

and now all is well again (I think).

------- Comment #11 From Martin Holzer (RETIRED) 2003-11-21 04:37:21 0000 -------
with updated /etc/hosts which contains
 127.0.0.1      localhost
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

i'm able to reproduce this too on one box.

>>> Downloading http://192.168.10.1/gentoo//distfiles/mysql-4.0.16.tar.gz
--16:23:09--  http://192.168.10.1/gentoo/distfiles/mysql-4.0.16.tar.gz
           => `/usr/portage/distfiles/mysql-4.0.16.tar.gz'
Connecting to 192.168.10.1:80... failed: Address family not supported by protocol.
Retrying.

------- Comment #12 From Andrea Barisani (RETIRED) 2003-11-21 15:59:03 0000 -------
This also causes problems if http_proxy is configured with a numerical IP
address,
even if the target URL is a name.

------- Comment #13 From Thomas R. (TRauMa) 2003-11-24 05:35:04 0000 -------
Fine, now the -1.9.ebuild ist gone. So you have to manually throw out the ipv6
patch from the -r1.ebuild before emerging wget.

------- Comment #14 From Thomas R. (TRauMa) 2003-11-24 05:47:57 0000 -------
It doesn't work with 1.9.1-r1, too.

trauma development-sources # ACCEPT_KEYWORDS="~x86" emerge -pv wget

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-misc/wget-1.9.1-r1  +ssl +nls -static -ipv6 -debug +socks5 

trauma development-sources # wget  217.72.195.42
--14:41:30--  http://217.72.195.42/
           => `index.html'
Abgebrochen

------- Comment #15 From Martin Holzer (RETIRED) 2003-11-24 23:27:26 0000 -------
*** Bug 34305 has been marked as a duplicate of this bug. ***

------- Comment #16 From Eldad Zack (RETIRED) 2003-11-25 03:30:07 0000 -------
I've done some tracing and testing.

On a machine with ipv6 compiled in the kernel, with the ipv6 USE flag, wget correctly.
Without ipv6 in the kernel - I get "failed: Address family not supported by protocol."

without the ipv6 use flag the process gets SIGABRT on both machines.

I think it got something to do with the map_ipv4_to_ip function.

------- Comment #17 From Eldad Zack (RETIRED) 2003-11-25 04:04:51 0000 -------
Ok, the problem is that wget_sockaddr_set_address (on host.c) is called with
ip_family=10 (ipv6).

since it is not matched, it wget gets abort()'d.

this is introduced by the ipvmisc patch, I've compiled without the patch and it
works for ipv6 and ipv4 with ipv6 supported turned off or on.

I am trying to fetch localhost with wget ::1 but I get "Unsupported scheme" so
it doesn't work for ipv6 (with or without the ipvmisc patch.)

------- Comment #18 From Sven Wegener 2003-11-25 15:02:17 0000 -------
Created an attachment (id=21292) [edit]
wget_pre20031125.ebuild.tar.bz2

I just checked out the current cvs code of wget and it contains support for
dual protocol operation. Seems to be fully functional and works without a hitch
for me. Feel free to try.

Attached files is a .tar.bz2 archive containing the ebuild and a needed patch.

------- Comment #19 From Pedro B. 2003-12-02 03:54:01 0000 -------
still broken on 1.9-r2. the temporary trick is to add something like

1.2.3.4 mysite
and make the command line wget -r -m mysite for example.

but its still broken...

------- Comment #20 From Josh Grebe (RETIRED) 2003-12-02 20:24:03 0000 -------
I figured it out.

The patch, /usr/portage/distfiles/wget-1.9, line 717, explicitly sets any IP url to AF_INET6, it should be setting to AF_INET on this line, it is outside of the #ifdef block for inet6 support. I have emailed the patch author as well. This has been tested on x86 as well as sparc64 platforms.


------- Comment #21 From Seemant Kulleen (RETIRED) 2003-12-04 18:14:00 0000 -------
thanks Josh -- checked in 1.9-r2

does this problem exist in wget 1.9.1?

------- Comment #22 From Seemant Kulleen (RETIRED) 2003-12-04 18:14:24 0000 -------
closing this bug as 1.9 is fixed in portage

------- Comment #23 From Henry Jen 2003-12-09 17:10:13 0000 -------
Not fix in current portage tree, the patch file, wget-1.9.1+ipvmisc.patch,
still contains wrong AF_INET6 instead of AF_INET at line 717.

------- Comment #24 From Seemant Kulleen (RETIRED) 2003-12-09 20:48:38 0000 -------
reopening to remind me to fix wget-1.9.1

------- Comment #25 From Seemant Kulleen (RETIRED) 2003-12-10 01:25:22 0000 -------
1.9.1 is fixed as well now, closing bug

First Last Prev Next    No search results available      Search page      Enter new bug