Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#27815 - [lua] LuaSocket bugs on app startup if network is down

Attached to Project: Arch Linux
Opened by Arvydas Sidorenko (Asido) - Wednesday, 04 January 2012, 07:22 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Saturday, 17 November 2012, 18:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Roman Kyrylych (Romashka)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The bug is very clearly shown below. The point is if I run an app which uses LuaSocket on startup to connect somewhere and it fails, all future retries are doomed to fail even if the network connection gets back.


Additional info:
Tried with 2 Arch machines, one updated with stable repo and another with [testing] enabled. I tried FreeBSD 8.2 and it works fine there. Ubuntu with glibc 2.13 worked fine too. Not sure where the problem might be though.

Arch with [testing] enabled pkg versions:
luasocket 2.0.2-5
glibc 2.15-3 / 2.14
linux 3.1.6-1
netcfg 2.6.8-1


Steps to reproduce:
$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> -- this is when we have the internet connection on from the beginning
> require("socket")
> client = socket.tcp()
> resp, err = client:connect("mail.google.com", 443)
> print(resp)
1
> print(err)
nil
> -- all work fine


$ lua (01-04 09:15)
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> -- now the internet connection is off: `sudo netcfg down <profile>`
> require("socket")
> client = socket.tcp()
> resp, err = client:connect("mail.google.com", 443)
> print(resp)
nil
> print(err)
Host name lookup failure
> -- getting the network back up: `sudo netcfg <profile>`
> client = socket.tcp()
> resp, err = client:connect("mail.google.com", 443)
> print(resp) -- BUG
nil
> print(err)
Host name lookup failure
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Saturday, 17 November 2012, 18:47 GMT
Reason for closing:  Fixed
Comment by Greg (dolby) - Saturday, 17 November 2012, 02:25 GMT
Is this still happening?
Comment by Arvydas Sidorenko (Asido) - Saturday, 17 November 2012, 18:23 GMT
No

Loading...