LEDE@ar71xx: Test-suite freezes

57 views
Skip to first unread message

sam_

unread,
Nov 29, 2017, 1:54:33 PM11/29/17
to luvit
Hello. I'm trying to get luvit working on TP-LINK Archer C7 v2 (single-core ar71xx arch) running OpenWRT/LEDE. After cross-compiling&installing luajit, luv & luvi I compiled both lit and luvit and both appeared to be working until I tried to execute https://github.com/luvit/luvit/blob/master/examples/http-client.lua and got segfault. OK, that could be expected, before digging into code I simply run luvit's tests. Test-suite freezes in tests/test-net.lua: "timeout client". Interesting, let's check it with strace:
root@LEDE:/home/tmp/luvit# strace -f luvi . -- tests/run.lua 2> tests_strace_deadlock_net_-_timeout_client.txt
(trace attached) What struck me is net.lua is not even reached, deadlock occurs already in tests/test-homepage.lua - "Chunked example with writeHead" + there's no attempt to read/write from/to client socket before it's removed from from libuv poll. Maybe some sort of exception, but nothing is printed. Could please someone help me/navigate me further? Thanks in advance, sam_

PS: noticed failed assertion only after it occured to me versions would be helpful.
root@LEDE:/home/tmp/luvit# lit --version
lit version
: 3.5.4
luvi version
: v2.7.6
root@LEDE
:/home/tmp/luvit# luvit --version
luvit version
: 2.14.2
luvi version
: v2.7.6
libuv version
: 1.15.0
Assertion failed: (stream->type == UV_TCP || stream->type == UV_NAMED_PIPE) && "uv_shutdown (unix) only supports uv_handle_t right now" (src/unix/stream.c: uv_shutdown: 1265)
Aborted
root@LEDE
:/home/tmp/luvit# ls -l /usr/lib/libluv*
lrwxrwxrwx    
1 root     root            11 Nov 29 19:17 /usr/lib/libluv.so -> libluv.so.1
lrwxrwxrwx    
1 root     root            15 Nov 29 19:17 /usr/lib/libluv.so.1 -> libluv.so.1.9.1
-rw-r--r--    1 root     root        115800 Nov 29 19:04 /usr/lib/libluv.so.1.9.1
root@LEDE
:/home/tmp/luvit#


strace.zip

Ryan Phillips

unread,
Nov 29, 2017, 5:18:37 PM11/29/17
to lu...@googlegroups.com
I suspect this might be a libuv bug on Mips.

-Ryan

--
You received this message because you are subscribed to the Google Groups "luvit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to luvit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sam_

unread,
Dec 5, 2017, 6:26:30 PM12/5/17
to luvit
Thank you for reply. Attached image (from attached traces) shows strace diff of first test with different outcome among 2 runs, please note epoll_wait() did not fail as in https://github.com/libuv/libuv/issues/335. Therefore I'd say it is another issue. In those traces fs-write-stream - writefile stream test once passes and once fails:
# Starting Test: fs-write-stream - writefile stream
 
/home/tmp/luvit/tests/libs/tap.lua:83: Missing 1 expected call
  stack traceback
:
     
[C]: in function 'error'
     
/home/tmp/luvit/tests/libs/tap.lua:83: in function </home/tmp/luvit/tests/libs/tap.lua:64>
     
[C]: in function 'xpcall'
     
/home/tmp/luvit/tests/libs/tap.lua:64: in function 'run'
     
/home/tmp/luvit/tests/libs/tap.lua:165: in function 'tap'
     
/home/tmp/luvit/tests/run.lua:42: in function 'fn'
     
[string "bundle:deps/require.lua"]:310: in function 'require'
     
/home/tmp/luvit/main.lua:118: in function 'main'
     
/home/tmp/luvit/init.lua:49: in function </home/tmp/luvit/init.lua:47>
     
[C]: in function 'xpcall'
     
/home/tmp/luvit/init.lua:47: in function 'fn'
     
[string "bundle:deps/require.lua"]:310: in function <[string "bundle:deps/require.lua"]:266>
not ok 61 fs-write-stream - writefile stream
Out of 10 consecutive executions of full test suite I get no more than 3-4 different freezes/deadlocks. I'm running uhttpd, aria2, xupnpd services without issue on this router, since only luvit is affected, I would rule out HW issue. Can you suggest better way to investigate this? Thanks again, sam_

inconsistent_runs.zip
luvit_tests_leaked_fd.png
Reply all
Reply to author
Forward
0 new messages