Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests of 1.50.0 are failing on i586 and s390x #751

Open
cryptomilk opened this issue Jan 23, 2025 · 8 comments
Open

Some tests of 1.50.0 are failing on i586 and s390x #751

cryptomilk opened this issue Jan 23, 2025 · 8 comments

Comments

@cryptomilk
Copy link
Contributor

I've packaged 1.50.0.0 for Fedora and one test fails on i586 on rawhide:

ok 112 thread - test thread sleep msecs in main thread
Uncaught Error in thread: thread:1: syntax error near '<\21>'
  { delay = 100, elapsed = 1 }
  ./tests/test-thread.lua:87: elapsed should be at least delay 
  stack traceback:
  	[C]: in function 'assert'
  	./tests/test-thread.lua:87: in field 'fn'
  	./lib/tap.lua:59: in function <./lib/tap.lua:48>
  	[C]: in function 'xpcall'
  	./lib/tap.lua:48: in upvalue 'run'
  	./lib/tap.lua:146: in function 'lib/tap'
  	tests/run.lua:23: in main chunk
  	[C]: in ?
not ok 113 thread - test thread create with options table

on s390x I see:

  ./tests/test-misc.lua:233: assertion failed!
  stack traceback:
  	[C]: in function 'assert'
  	./tests/test-misc.lua:233: in function 'fn'
  	./lib/tap.lua:59: in function <./lib/tap.lua:48>
  	[C]: in function 'xpcall'
  	./lib/tap.lua:48: in function 'run'
  	./lib/tap.lua:146: in function 'tap'
  	tests/run.lua:23: in main chunk
  	[C]: ?
not ok 79 misc - uv.wtf8 and utf16 conversion
  ./tests/test-misc.lua:246: assertion failed!
  stack traceback:
  	[C]: in function 'assert'
  	./tests/test-misc.lua:246: in function 'fn'
  	./lib/tap.lua:59: in function <./lib/tap.lua:48>
  	[C]: in function 'xpcall'
  	./lib/tap.lua:48: in function 'run'
  	./lib/tap.lua:146: in function 'tap'
  	tests/run.lua:23: in main chunk
  	[C]: ?
not ok 80 misc - uv.wtf8<->utf16 unpaired surrogate

https://koji.fedoraproject.org/koji/taskinfo?taskID=128366040

@Bilal2453
Copy link
Contributor

The failure in luv.sleep is likely a regression in libuv 1.50, since that code haven't been touched on our side.

@squeek502
Copy link
Member

squeek502 commented Jan 24, 2025

Uncaught Error in thread: thread:1: syntax error near '<\21>'

This is a strange error. I'm unable to reproduce that particular error even when intentionally inserting a NAK control character into the thread function:

$ ./build/lua tests/test-thread.lua
./build/lua: tests/test-thread.lua:68: unexpected symbol near '<\21>'

EDIT: I think that error has to be coming from here:

fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1));

on s390x

Assuming this is an endianness issue, unsure if it's on our side or Libuv's; will check it out.

squeek502 added a commit to squeek502/luv that referenced this issue Jan 24, 2025
@squeek502
Copy link
Member

The s390x failure should be addressed by #753

Would appreciate if you could double-check that it will fix it; I don't currently have a good way of running the tests while targeting a big-endian architecture.

@cryptomilk
Copy link
Contributor Author

#753 fixes running the tests on s390x: https://koji.fedoraproject.org/koji/taskinfo?taskID=128411469

Thanks.

@cryptomilk
Copy link
Contributor Author

About the issue on 32bit:

Uncaught Error in thread: thread:1: unexpected symbol near '<\4>'
  { elapsed = 0, delay = 100 }
  ./tests/test-thread.lua:87: elapsed should be at least delay 
not ok 113 thread - test thread create with options table

Any idea what that Uncaught error is?

@squeek502
Copy link
Member

Any idea what that Uncaught error is?

No, but it's definitely the root cause, and the fact that it's a different control character this time (\4 now vs \21 in the OP) is not good news.

It's coming from here:

fprintf(stderr, "Uncaught Error in thread: %s\n", lua_tostring(L, -1));

Will likely need to reproduce it locally to understand what might be happening.

@cryptomilk
Copy link
Contributor Author

My guess would be some memory overwrite. Building libuv with AddressSanitizer might catch it.

@clason
Copy link

clason commented Jan 24, 2025

Would appreciate if you could double-check that it will fix it; I don't currently have a good way of running the tests while targeting a big-endian architecture.

This might help:
https://github.com/neovim/neovim/blob/2470db02c5136525b8abce1ee0889d94f8d81d98/.github/workflows/optional.yml#L19-L48

(Running this with luv HEAD right now; seems to pass.)

My guess would be some memory overwrite. Building libuv with AddressSanitizer might catch it.

ASAN is indeed throwing a fit over the update, both on Linux and Windows. Haven't got any useful logs out of it, though:

(This is specific to the Luv bump; ASAN passed for the earlier libuv update itself.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants