kostyll / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

LuaSocket segfault after some amount of I/O #646

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What device(s) are you experiencing the problem on?
Iconia Tab A200

What firmware version are you running on the device?
CyanogenMod 9

What steps will reproduce the problem?
1. Create a Lua script which opens a socket for listening
2. Connect to the socket and send to it
3. After a while, the receiver segfaults.

Example receiver script:
require "android"
local listener = assert(socket.bind('localhost', 9999))
local sock = assert(listener:accept())
while true do sock:receive('*l') end

sender script:
require "android"
local sock = assert(socket.connect('localhost', 9999))
for i = 1, 1000000 do
    if not sock:send('.') then error("failed at " .. i) end
end
print("finished")

Start receiver, then sender, and receiver should segfault after a few seconds.

What is the expected output? What do you see instead?
Expected: receiver never terminates; sender runs for a few seconds then prints 
"finished".
Actual: receiver segfaults after about 90,000 messages received.

What version of the product are you using? On what operating system?
Release 6 on CM9.

Please provide any additional information below.
The number of messages before segfault varies between about 60,000 and 95,000, 
and is reduced by sending longer messages.

Original issue reported on code.google.com by hyperhac...@gmail.com on 15 Jul 2012 at 7:21

GoogleCodeExporter commented 9 years ago
Adding logcat.

Original comment by hyperhac...@gmail.com on 15 Jul 2012 at 7:23

Attachments: