Skip to content

test_sqlite3 failure with SQLite 3.40.1 #101947

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

Closed
kulikjak opened this issue Feb 16, 2023 · 5 comments · Fixed by #102914
Closed

test_sqlite3 failure with SQLite 3.40.1 #101947

kulikjak opened this issue Feb 16, 2023 · 5 comments · Fixed by #102914
Assignees
Labels
topic-sqlite3 type-bug An unexpected behavior, bug, or error

Comments

@kulikjak
Copy link
Contributor

kulikjak commented Feb 16, 2023

Since we recently updated from SQLite 3.35.5 to 3.40.1, I am seeing the following test failure:

======================================================================
FAIL: test_serialize_deserialize (test.test_sqlite3.test_dbapi.SerializeTests.test_serialize_deserialize)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/.../Python-3.11.0/Lib/test/test_sqlite3/test_dbapi.py", line 607, in test_serialize_deserialize
    self.assertEqual(len(data), 8192)
AssertionError: 65536 != 8192

It seems that the size of serialized data changed between those two SQLite versions, causing this issue; when I remove this assert, the test passes.

This is on Oracle Solaris (both SPARC and Intel); in both 3.11.0 and the latest changes cloned from GitHub (both 3.11 and main branches).

Linked PRs

@kulikjak kulikjak added the type-bug An unexpected behavior, bug, or error label Feb 16, 2023
@erlend-aasland erlend-aasland self-assigned this Feb 16, 2023
@erlend-aasland
Copy link
Contributor

Is there a Docker image for Solaris so I can try to reproduce this?

@kulikjak
Copy link
Contributor Author

Sadly, there isn't an Oracle Solaris docker image available.

At first, I thought that this would be an issue on all systems, but I did some testing on RHEL yesterday and cannot reproduce it there. Let me do some more digging and I'll let you know once I find something.

@erlend-aasland
Copy link
Contributor

Sadly, there isn't an Oracle Solaris docker image available.

At first, I thought that this would be an issue on all systems, but I did some testing on RHEL yesterday and cannot reproduce it there. Let me do some more digging and I'll let you know once I find something.

Thanks; without a system to reproduce this on, I'm unable to make progress here.

@kulikjak
Copy link
Contributor Author

I think I found the issue; It's not about Solaris/Linux platform differences, it's about the way SQLite is being compiled.

We are compiling SQLite with -DSQLITE_DEFAULT_PAGE_SIZE=32768 on Solaris, which is much higher than the default of 4096. When I add the same define on Linux, I can see the same issue (and when I remove it on Solaris, it's gone).

@erlend-aasland
Copy link
Contributor

We are compiling SQLite with -DSQLITE_DEFAULT_PAGE_SIZE=32768 on Solaris, which is much higher than the default of 4096. When I add the same define on Linux, I can see the same issue (and when I remove it on Solaris, it's gone).

Thanks for debugging; that makes sense! So our test is wrong. We should compare with that constant, not some arbitrary value.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Mar 22, 2023
The size of the returned data is too implementation specific.
@github-project-automation github-project-automation bot moved this from TODO: Bugs to Done in sqlite3 issues Mar 22, 2023
erlend-aasland added a commit that referenced this issue Mar 22, 2023
The size of the returned data is too implementation specific.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Mar 22, 2023
…nGH-102914)

The size of the returned data is too implementation specific.
(cherry picked from commit 61405da)

Co-authored-by: Erlend E. Aasland <[email protected]>
miss-islington added a commit that referenced this issue Mar 22, 2023
The size of the returned data is too implementation specific.
(cherry picked from commit 61405da)

Co-authored-by: Erlend E. Aasland <[email protected]>
Fidget-Spinner pushed a commit to Fidget-Spinner/cpython that referenced this issue Mar 27, 2023
…n#102914)

The size of the returned data is too implementation specific.
warsaw pushed a commit to warsaw/cpython that referenced this issue Apr 11, 2023
…n#102914)

The size of the returned data is too implementation specific.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-sqlite3 type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants