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

test_sqlite3.test_dbapi: test_deserialize_too_much_data_64bit uses undefined size (and requires 24 Exabytes of RAM) #93117

Closed
The-Compiler opened this issue May 23, 2022 · 3 comments · Fixed by #93154
Labels
tests Tests in the Lib/test dir topic-sqlite3 type-bug An unexpected behavior, bug, or error

Comments

@The-Compiler
Copy link
Contributor

Bug report

In a755124 (GH-26728, v3.11.0a7), @erlend-aasland added a test_deserialize_too_much_data_64bit, which would instantly raise a NameError for size if run:

@unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform')
@bigmemtest(size=2**63, memuse=3, dry_run=False)
def test_deserialize_too_much_data_64bit(self):
with memory_database() as cx:
with self.assertRaisesRegex(OverflowError, "'data' is too large"):
cx.deserialize(b"b" * size)

...however, it's never actually run, because it's skipped on machines with less than 24 Exabytes (!) of RAM:

test_deserialize_too_much_data_64bit (test.test_sqlite3.test_dbapi.SerializeTests.test_deserialize_too_much_data_64bit) ... skipped 'not enough memory: 25769803776.0G minimum needed'

(Found by running flake8 over Lib/ out of curiosity, see #93010 (comment))

@The-Compiler The-Compiler added the type-bug An unexpected behavior, bug, or error label May 23, 2022
@erlend-aasland erlend-aasland added the tests Tests in the Lib/test dir label May 23, 2022
@erlend-aasland erlend-aasland moved this to TODO: Bugs in sqlite3 issues May 23, 2022
@erlend-aasland
Copy link
Contributor

Thanks for the report! Do you want to propose a PR, @The-Compiler?

@The-Compiler
Copy link
Contributor Author

I'm afraid I have no idea how a proper fix would look like. Is the test really supposed to need exabytes of RAM? If so, it should probably just be removed altogether?

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue May 23, 2022
@erlend-aasland erlend-aasland linked a pull request May 23, 2022 that will close this issue
@erlend-aasland
Copy link
Contributor

The test is not needed; see Serhiy's comment: #93154 (comment)

Repository owner moved this from TODO: Bugs to Done in sqlite3 issues May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-sqlite3 type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants