Community Packages

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#43361 - [lua-socket] 3.0rc1-3 has a bug with timeouts (fixed upstream)

Attached to Project: Community Packages
Opened by Rob Hoelz (hoelzro) - Tuesday, 06 January 2015, 23:08 GMT
Last edited by Sergej Pupykin (sergej) - Sunday, 11 January 2015, 10:50 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

LuaSocket 3.0rc1 shipped with a bug when using socket read timeouts; this was fixed in the following commit:

https://github.com/diegonehab/luasocket/commit/396e9e5

Until a new version of LuaSocket is released, would it be possible to apply this patch to the Arch package?

Additional info:
LuaSocket v3.0rc1

Steps to reproduce:

1) Run the following Perl oneliner to create a dummy server listening on port 9000, which writes the numbers 1-100 to a client, pausing for 100ms before each write:

perl -MTime::HiRes=usleep -MIO::Socket -E 'my $server = IO::Socket::INET->new(Proto => "tcp", Listen => 5, LocalAddr => "localhost", LocalPort => 9000, ReuseAddr => 1) or die "cant create socket: $!"; my $client = $server->accept; for(1..100) { usleep 100_000; $client->say($_); } $client->close; $server->close;'

2) Run the attached Lua script, which connects to the server on port 9000 and has a read timeout of 1000ms, but fails with a timeout somewhere during the 100 reads. (I ran the script with both Lua 5.1 and 5.2)

3) If you build LuaSocket from Git with that commit, install it to a temporary directory, and point LUA_PATH and LUA_CPATH to that temporary directory, the timeout does not occur.
This task depends upon

Closed by  Sergej Pupykin (sergej)
Sunday, 11 January 2015, 10:50 GMT
Reason for closing:  Fixed
Comment by Rob Hoelz (hoelzro) - Friday, 09 January 2015, 22:17 GMT
I ended up building a package for my personal consumption; here's the PKGBUILD and patch to implement the fix!

Loading...