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

TestInternals#test_large_payload test failure with Redis 7 #1117

Closed
voxik opened this issue Aug 10, 2022 · 9 comments
Closed

TestInternals#test_large_payload test failure with Redis 7 #1117

voxik opened this issue Aug 10, 2022 · 9 comments

Comments

@voxik
Copy link

voxik commented Aug 10, 2022

Trying the changes #1114, they works just fine with single exception:

  1) Error:
TestInternals#test_large_payload:
Redis::ProtocolError:  Got '' as initial reply byte. If you're in a forking environment, such as Unicorn, you need to connect to Redis after forking. 
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/connection/hiredis.rb:60:in `rescue in read'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/connection/hiredis.rb:53:in `read'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:311:in `block in read'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:299:in `io'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:310:in `read'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:161:in `block in call'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:279:in `block (2 levels) in process'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:420:in `ensure_connected'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:269:in `block in process'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:373:in `logging'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:268:in `process'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/client.rb:161:in `call'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis.rb:269:in `block in send_command'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis.rb:268:in `synchronize'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis.rb:268:in `send_command'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/lib/redis/commands/strings.rb:108:in `setex'
    /builddir/build/BUILD/redis-4.7.1/usr/share/gems/gems/redis-4.7.1/test/internals_test.rb:20:in `test_large_payload'

The test case also fails similarly for redis-rb 4.6.0.

@voxik
Copy link
Author

voxik commented Aug 10, 2022

I should have mentioned that this is the command I am using to execute the test suite:

$ make BINARY=/usr/bin/redis-server REDIS_CLIENT=/usr/bin/redis-cli 'BUILD_DIR=${TMP}' DRIVER=hiredis

@byroot
Copy link
Collaborator

byroot commented Aug 10, 2022

It passes on CI: https://github.com/redis/redis-rb/runs/7762157806?check_suite_focus=true#step:7:503

So whatever the issue is, is likely to be with something on your machine or system.

@byroot byroot closed this as completed Aug 10, 2022
@byroot
Copy link
Collaborator

byroot commented Aug 10, 2022

NB: closing as it's non-actionable for me, if you however figure out a reproduction, I'll happily re-open and fix the issue.

@voxik
Copy link
Author

voxik commented Aug 10, 2022

It passes on CI: https://github.com/redis/redis-rb/runs/7762157806?check_suite_focus=true#step:7:503

Yes, right, I saw that CI is passing. Wonder if that might be different configuration of Redis on Fedora? But I'll probably just disable the test case for now. Thx

@byroot
Copy link
Collaborator

byroot commented Aug 10, 2022

Wonder if that might be different configuration of Redis on Fedora?

Possibly yes. Maybe redis has some kind of max command size or something that is enabled by default on fedora. The error suggest that the server kinda just closed the connection or something like that.

@voxik
Copy link
Author

voxik commented Aug 10, 2022

Just tried to run the test case with disabled hiredis binary extension and the test case succeeds 🤔

@voxik
Copy link
Author

voxik commented Aug 10, 2022

And on Fedora, the rubygem-hiredis is not using the vendored hiredis 1.0.0 but the system hiredis 1.0.2. So there are certainly some differences comparing to the CI ....

@voxik
Copy link
Author

voxik commented Aug 10, 2022

Just tried the pristine upstream hiredis and the test is passing.

@voxik
Copy link
Author

voxik commented Aug 10, 2022

This might be the culprit:

redis/hiredis@76a7b10

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

2 participants