Repository navigation
zlib brotli fails unit tests #25568
Copy link
Copy link
Closed
Labels
brotliIssues and PRs related to the Brotli dependency.Issues and PRs related to the Brotli dependency.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.zlibIssues and PRs related to the zlib module and its compression dependencies.Issues and PRs related to the zlib module and its compression dependencies.
Description
- Version: v11.x-staging, master
- Platform: openSUSE Tumbleweed i586
- Subsystem:
Problem only happens with i586 platform. It's not visible on other architectures. You can see the complete buildlog,
[ 1447s] not ok 2059 parallel/test-zlib-brotli-from-string
[ 1447s] ---
[ 1447s] duration_ms: 2.512
[ 1447s] severity: fail
[ 1447s] exitcode: 1
[ 1447s] stack: |-
[ 1447s] assert.js:86
[ 1447s] throw new AssertionError(obj);
[ 1447s] ^
[ 1447s]
[ 1447s] AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
[ 1447s] + actual - expected
[ 1447s]
[ 1447s] + 'G/gBQBwHdky2aHV5KK9Snf05//1pPdmNw/7232fnIm1IBK1AA2Td3fAg/P/+HQqStshSigva4jwMAg9qm5sIgqt95AXhlmWj13XEoDvKxv1fQxNkko2Xh3BK1gEN3RqsfodMzf62zqW4UbFeFW3XqQAl7oeeOghDOcva1EvOAh0u8PInzamBSVzR1MHLbI21cmGSFZCCa2j/kTqQebe5PErgwrguHRDKoWyKE0gkbnJMPMtAdS9pT02Sk81T5qxA0FbxfrXwoL+ICzl8OYaSYR3W/nmWOh6lAZmayDpbo//UcwAxRCQ8a9UkjF52eZ0tB2vo6v8SqVfNMkBmmhhr0OT9LkYF69aEjlYzj7IEKmEUQf1HBogRYiGkW0ZTomgQDoKZnREi7w=='
[ 1447s] - 'G/gBQBwHdky2aHV5KK9Snf05//1pPdmNw/7232fnIm1IBK1AA8RsN8OB8Nb7Lpgk3UWWUlzQXZyHQeBBbXMTQXC1j7wg3LJs9LqOGHRH2bj/a2iCTLLx8hBOyTqgoVuD1e+Qqdnf1rkUNyrWq6LtOhWgxP3QUwdhKGdZm3rJWaDDBV7+pDk1MIkrmjp4ma2xVi5MsgJScA3tP1I7mXeby6MELozrwoBQDmVTnEAicZNj4lkGqntJe2qSnGyeMmcFgraK94vCg/4iLuTw5RhKhnVY++dZ6niUBmRqIutsjf5TzwF5iAg8a9UkjF52eZ0tB2vo6v8SqVfNMkBmmhxr0NT9LkYF69aEjlYzj7IEKmEUQf1HBogRYhFIt4ymRNEgHAIzOyNEsQM='
[ 1447s] at BrotliCompress.zlib.brotliCompress.common.mustCall (/home/abuild/rpmbuild/BUILD/node-git.8e84ccb502/test/parallel/test-zlib-brotli-from-string.js:28:10)
[ 1447s] at BrotliCompress.cb (/home/abuild/rpmbuild/BUILD/node-git.8e84ccb502/test/common/index.js:389:15)
[ 1447s] at BrotliCompress.zlibBufferOnEnd (zlib.js:131:10)
[ 1447s] at BrotliCompress.emit (events.js:193:15)
[ 1447s] at endReadableNT (_stream_readable.js:1129:12)
[ 1447s] at processTicksAndRejections (internal/process/next_tick.js:76:17)
[ 1447s] ...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
brotliIssues and PRs related to the Brotli dependency.Issues and PRs related to the Brotli dependency.testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.zlibIssues and PRs related to the zlib module and its compression dependencies.Issues and PRs related to the zlib module and its compression dependencies.
Activity
addaleax commentedon Jan 18, 2019
@AdamMajer Can you check whether other brotli compressors yield the same result on this machine (e.g. the Python one in https://github.com/google/brotli aka
pip install brotli)?bnoordhuis commentedon Jan 21, 2019
Is that really i586? No SSE2, etc.? That's not a supported (let alone tested) configuration. I'm surprised it even builds.
bnoordhuis commentedon Jan 25, 2019
As there's been no follow-up, and because it looks like an unsupported configuration, I'm going to close out the issue. Let me know if I should reopen.
AdamMajer commentedon Jan 25, 2019
Don't close it. This is not "unsupported configuration." It's running on a modern CPU and passes all the unit tests except for this one. I just didn't have time yet to reproduce the problem with the
pipinstalled brotli. I should be able to do this shortly.For example, this test fails in a 32-bit chroot (so no VM) on a Xeon E5-1620.
addaleax commentedon Jan 25, 2019
Fwiw, we could also just skip this particular test or allow two different outputs (as long as they decompress to the same result).
My request for checking another implementation is that it’s pretty uncommon for compressions algorithms to yield machine-dependent results?
AdamMajer commentedon Jan 25, 2019
Ok, I've looked at the actual test now 😊 I think it was a little naive to assume that each machine will result in same output. Consider padding. But we should always get same output.
I'll make a quick patch that I think will satisfy everyone here.
AdamMajer commentedon Jan 25, 2019
Basically, on 32-bit x86, the compressed string is 1 byte shorter than the provided version. Of course, the 64-bit compressed string still decompresses correctly. The slightly modified test just verifies both.
I wonder if I should include the 32-bit compressed buffer as an alternative to test decompression on 64-bit machines? 😄
test: fix zlib-brotli output assumptions
bnoordhuis commentedon Jan 26, 2019
Can you elaborate on what 'i586' means? gcc with
-mcpu=i586?I thought that was the difference between opensuse's i586 and i686 flavors and the former is not a configuration we support (or even expect to work.)
AdamMajer commentedon Jan 26, 2019
If you look in the logs, v8 is compiled with these settings,
So, -m32
openSUSE doesn't really have i586 and i686 flavours anymore. There is only i586 which is 32-bit x86 and it's only available on Tumbleweed now. 32-bit not supported in SLE 15 anymore, for example, but it's good for testing corner cases.
Anyway, the point is that all unit tests pass except for this one. It seems to related to 1 byte difference in compressed output of this compression algorithm.
test: fix zlib-brotli output assumptions
test: fix zlib-brotli output assumptions
test: fix zlib-brotli output assumptions
test: fix zlib-brotli output assumptions
test: fix zlib-brotli output assumptions