bugGNU Wget - Bugs: bug #32349, No timeout when connecting to...

 
 

bug #32349: No timeout when connecting to https server and waiting server certificate

Submitted by:  None
Submitted on:  Fri 04 Feb 2011 10:33:47 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: Giuseppe Scrivano <gscrivano>
Originator Name: AnonymousOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.12
Operating System: GNU/LinuxReproducibility: None
Fixed Release: NonePlanned Release: None
Regression: NoneWork Required: None
Patch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 23 Sep 2013 10:05:05 AM UTC, comment #3:

This issue still present with wget 1.14.
It is very annoying as it hangs indefinitely a script using wget if the https server is not responding.
If you don't want to dig into openssl internals, maybe a solution would be to add a switch that limits the total run time for a request ? This is what curl does with -m.

Alexis Bezverkhyy <abezverkhyy>
Thu 12 Apr 2012 02:59:44 PM UTC, comment #2:

This issue still seems to be in wget 1.13.4 when the openssl backend is used. The method to reproduce mentioned in the initial report is still valid. Here's the backtrace I managed to generate:

GNU gdb (GDB) Fedora (7.4.50.20120120-38.fc17)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/wget...Reading symbols from /usr/lib/debug/usr/bin/wget.debug...done.
done.
(gdb) r -w 1 -t 1 -T 1 --no-proxy https://localhost
Starting program: /usr/bin/wget -w 1 -t 1 -T 1 --no-proxy https://localhost
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
--2012-04-12 16:57:38-- https://localhost/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:443... connected.
^C
Program received signal SIGINT, Interrupt.
0x0000003cf80e4bb0 in __read_nocancel () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.15-32.fc17.x86_64 keyutils-libs-1.5.5-2.fc17.x86_64 krb5-libs-1.10-5.fc17.x86_64 libcom_err-1.42-2.fc17.x86_64 libgcc-4.7.0-1.fc17.x86_64 libselinux-2.1.9-9.fc17.x86_64 openssl-1.0.0h-1.fc17.x86_64 zlib-1.2.5-6.fc17.x86_64
(gdb) bt
#0 0x0000003cf80e4bb0 in __read_nocancel () from /lib64/libc.so.6
#1 0x0000003d004afe5a in ?? () from /lib64/libcrypto.so.10
#2 0x0000003d004adbb9 in BIO_read () from /lib64/libcrypto.so.10
#3 0x0000003d02029833 in ssl23_read_bytes () from /lib64/libssl.so.10
#4 0x0000003d020288d4 in ssl23_connect () from /lib64/libssl.so.10
#5 0x000000000042bfe0 in ssl_connect_wget (fd=fd@entry=7) at openssl.c:413
#6 0x000000000041813a in gethttp (u=u@entry=0x85b080, hs=hs@entry=0x7fffffffdf80, dt=dt@entry=0x7fffffffe348, proxy=proxy@entry=0x0,
count=count@entry=1, iri=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at http.c:1912
#7 0x000000000041b204 in http_loop (u=u@entry=0x85b080, original_url=original_url@entry=0x85b080, newloc=newloc@entry=0x7fffffffe260,
local_file=local_file@entry=0x7fffffffe268, referer=referer@entry=0x0, dt=dt@entry=0x7fffffffe348, proxy=proxy@entry=0x0,
iri=iri@entry=0x65d9e0) at http.c:2769
#8 0x00000000004245ab in retrieve_url (orig_parsed=orig_parsed@entry=0x85b080, origurl=origurl@entry=0x85cf40 "https://localhost",
file=file@entry=0x7fffffffe350, newloc=newloc@entry=0x7fffffffe358, refurl=refurl@entry=0x0, dt=dt@entry=0x7fffffffe348,
recursive=false, iri=iri@entry=0x65d9e0, register_status=register_status@entry=true) at retr.c:736
#9 0x0000000000405121 in main (argc=-7472, argv=0x7fffffffe518) at main.c:1394

wget --version returns this:
GNU Wget 1.13.4 built on linux-gnu.

+digest +https +ipv6 -iri +large-file +nls +ntlm +opie +ssl/openssl

Wgetrc:
/etc/wgetrc (system)
Locale: /usr/share/locale
Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
-DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic
Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-lssl -lcrypto /usr/lib64/libssl.so /usr/lib64/libcrypto.so
/usr/lib64/libz.so -ldl -lz -lrt ftp-opie.o openssl.o http-ntlm.o
../lib/libgnu.a

Erik van Pienbroek <epienbro>
Fri 11 Feb 2011 11:43:06 PM UTC, comment #1:

I am going to apply a patch which fixes it.

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Fri 04 Feb 2011 10:33:47 AM UTC, original submission:

On Debian Squeeze. 1.12-2.1

with a "nc -l 443" playing the server
and a "wget -w 1 -t 1 -T 1 --no-proxy https://server"
I seems I can wait forever

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by abezverkhyy (Posted a comment)
  • -unavailable- added by epienbro (Posted a comment)
  • -unavailable- added by gscrivano (Posted a comment)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 11 Feb 2011 11:43:06 PM UTCgscrivanoStatusNone=>Fixed
      Assigned toNone=>gscrivano
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1