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_trace_too_much_expanded_sql() failed on AMD64 Arch Linux Usan 3.x #91139

Closed
vstinner opened this issue Mar 11, 2022 · 2 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir topic-sqlite3

Comments

@vstinner
Copy link
Member

BPO 46983
Nosy @vstinner, @erlend-aasland

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2022-03-11.23:42:33.487>
created_at = <Date 2022-03-11.12:24:41.756>
labels = ['library', '3.11']
title = 'test_sqlite3: test_trace_too_much_expanded_sql() failed on AMD64 Arch Linux Usan 3.x'
updated_at = <Date 2022-03-11.23:42:33.487>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2022-03-11.23:42:33.487>
actor = 'erlendaasland'
assignee = 'none'
closed = True
closed_date = <Date 2022-03-11.23:42:33.487>
closer = 'erlendaasland'
components = ['Library (Lib)']
creation = <Date 2022-03-11.12:24:41.756>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 46983
keywords = []
message_count = 2.0
messages = ['414900', '414951']
nosy_count = 2.0
nosy_names = ['vstinner', 'erlendaasland']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue46983'
versions = ['Python 3.11']

@vstinner
Copy link
Member Author

AMD64 Arch Linux Usan 3.x:
https://buildbot.python.org/all/#/builders/719/builds/672

Python configured with:

./configure CC=clang LD=clang CFLAGS=-fno-sanitize-recover --with-undefined-behavior-sanitizer

0:12:11 load avg: 1.63 Re-running test_sqlite3 in verbose mode (matching: test_trace_too_much_expanded_sql)
test_sqlite3: testing with version '2.6.0', sqlite_version '3.37.0'
test_trace_too_much_expanded_sql (test.test_sqlite3.test_hooks.TraceCallbackTests) ... FAIL

======================================================================
FAIL: test_trace_too_much_expanded_sql (test.test_sqlite3.test_hooks.TraceCallbackTests)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_sqlite3/test_userfunctions.py", line 62, in check_tracebacks
    yield
    ^^^^^
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_sqlite3/test_userfunctions.py", line 47, in wrapper
    func(self, *args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_sqlite3/test_dbapi.py", line 61, in cx_limit
    yield limit
    ^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_sqlite3/test_hooks.py", line 338, in test_trace_too_much_expanded_sql
    with self.check_stmt_trace(cx, [unexpanded_query]):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/contextlib.py", line 144, in __exit__
    next(self.gen)
    ^^^^^^^^^^^^^^
  File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_sqlite3/test_hooks.py", line 238, in check_stmt_trace
    self.assertEqual(traced, expected)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: ['sel[41 chars] "a"=\'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[39 chars]a\''] != ['sel[41 chars] "a"=?']

First differing element 0:
'sele[40 chars] "a"=\'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[38 chars]aa\''
'sele[40 chars] "a"=?'

  • ['select \'b\' as "a" from sqlite_master where '
    + ['select \'b\' as "a" from sqlite_master where "a"=?']
    ? +++++ +

  • '"a"=\'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\'']

@vstinner vstinner added 3.11 only security fixes stdlib Python modules in the Lib dir labels Mar 11, 2022
@erlend-aasland
Copy link
Contributor

The change that introduced this regression was reverted in #75969

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes stdlib Python modules in the Lib dir topic-sqlite3
Projects
None yet
Development

No branches or pull requests

2 participants