3 #text |
request = <SubRequest 'db' for <Function test_1>>
db_path = WindowsPath('H:/QA/temp/qa2024.tmp/fbqa/test_11684')
db_cache = <firebird.qa.plugin.DbCache pytest object at [hex]>
@pytest.fixture
def database_fixture(request: pytest.FixtureRequest, db_path, db_cache) -> Database:
db = Database(db_path, filename, user, password, charset, debug=str(request.module),
config_name=config_name, utf8filename=utf8filename)
if not do_not_create:
if from_backup is None and copy_of is None:
db.create(page_size, sql_dialect, db_cache)
elif from_backup is not None:
db.restore(from_backup)
elif copy_of is not None:
db.copy(copy_of)
if async_write:
db.set_async_write()
if init: # Do not check for None, we want to skip empty scripts as well
try:
db.init(init)
except Error as exc:
if hasattr(exc, 'stderr'):
request.node.user_properties.append(("dbinit-stderr", exc.stderr))
raise
yield db
if not do_not_drop:
> db.drop()
src\firebird\qa\plugin.py:987:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
server = 'qa_rundaily_hq50'
def connect_server(server: str, *, user: str=None, password: str=None,
crypt_callback: iCryptKeyCallbackImpl=None,
expected_db: str=None, role: str=None, encoding: str=None,
encoding_errors: str=None) -> Server:
"""Establishes a connection to server's service manager.
Arguments:
server: Server host machine or Server configuration name.
user: User name.
password: User password.
crypt_callback: Callback that provides encryption key.
expected_db: Database that would be accessed (for using services with non-default
security database)
role: SQL role used for connection.
encoding: Encoding for string values passed in parameter buffer. Default is
`.ServerConfig.encoding`.
encoding_errors: Error handler used for encoding errors. Default is
`.ServerConfig.encoding_errors`.
Hooks:
Event `.ServerHook.ATTACHED`: Executed before `Service` instance is
returned. Hook must have signature::
hook_func(server: Server) -> None
Any value returned by hook is ignored.
"""
srv_config = driver_config.get_server(server)
if srv_config is None:
srv_config = driver_config.server_defaults
host = server or None
port = None
else:
host = srv_config.host.value
port = srv_config.port.value
if host is None:
host = 'service_mgr'
if not host.endswith('service_mgr'):
if host and not host.endswith(':'):
if port:
host += f"/{port}"
host += ':'
host += 'service_mgr'
if user is None:
user = srv_config.user.value
if password is None:
password = srv_config.password.value
spb = SPB_ATTACH(user=user, password=password, config=srv_config.config.value,
trusted_auth=srv_config.trusted_auth.value,
auth_plugin_list=srv_config.auth_plugin_list.value,
expected_db=expected_db, encoding=srv_config.encoding.value,
errors=srv_config.encoding_errors.value, role=role)
spb_buf = spb.get_buffer()
with a.get_api().master.get_dispatcher() as provider:
if crypt_callback is not None:
provider.set_dbcrypt_callback(crypt_callback)
> svc = provider.attach_service_manager(host, spb_buf)
C:\Python3x\Lib\site-packages\firebird\driver\core.py:5692:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <firebird.driver.interfaces.iProvider pytest object at [hex]>
service = 'localhost/33337:service_mgr'
spb = b'\x02\x02\x1c\x06SYSDBA\x1d\tmasterkey'
def attach_service_manager(self, service: str, spb: bytes) -> iService:
"Replaces `isc_service_attach()`"
result = self.vtable.attachServiceManager(self, self.status, service.encode(), len(spb), spb)
> self._check()
C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:1310:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <firebird.driver.interfaces.iProvider pytest object at [hex]>
def _check(self) -> None:
state = self.status.get_state()
if StateFlag.ERRORS in state:
> raise self.__report(DatabaseError, self.status.get_errors())
E firebird.driver.types.DatabaseError: Unable to complete network request to host "localhost".
E -Failed to establish a connection.
C:\Python3x\Lib\site-packages\firebird\driver\interfaces.py:113: DatabaseError
|
4 #stack |
# 00000`00224000 Unfrozen
# Call Site
00 ntdll!NtWaitForMultipleObjects+0x14
01 KERNELBASE!WaitForMultipleObjectsEx+0xf0
02 KERNELBASE!WaitForMultipleObjects+0xe
03 kernel32!WerpLaunchAeDebug+0x2cba
04 kernel32!WerpLaunchAeDebug+0x26f6
05 KERNELBASE!UnhandledExceptionFilter+0x3d9
06 ntdll!memset+0x1218
07 ntdll!_C_specific_handler+0x96
08 ntdll!_chkstk+0x11f
09 ntdll!RtlRaiseException+0x484
0a ntdll!KiUserExceptionDispatcher+0x2e
0b engine13!Jrd::nodeAs(void)+0x8 [H:\SNAPSHOTS\HQbird\src\dsql\Nodes.h @ 375]
0c engine13!Jrd::SysFuncCallNode::parse(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Firebird::MemoryPool * pool = 0x00000000`028cb770, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0, unsigned char __formal = 0xa0 '')+0x197 [H:\SNAPSHOTS\HQbird\src\dsql\ExprNodes.cpp @ 12302]
0d engine13!PAR_parse_node(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0)+0xc2 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1651]
0e engine13!PAR_parse_value(class Jrd::thread_db * tdbb = <Value unavailable error>, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0)+0x12 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1583]
0f engine13!Jrd::ComparativeBoolNode::parse(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Firebird::MemoryPool * pool = 0x00000000`0000002f, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0, unsigned char blrOp = 0x2f '/')+0x89 [H:\SNAPSHOTS\HQbird\src\dsql\BoolNodes.cpp @ 333]
10 engine13!PAR_parse_node(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0)+0xc2 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1651]
11 engine13!PAR_parse_boolean(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68)+0xb [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1570]
12 engine13!PAR_rse(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0, short rse_op = 0n67)+0x290 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1342]
13 engine13!PAR_rse(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0)+0xa2 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1482]
14 engine13!Jrd::ForNode::parse(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Firebird::MemoryPool * pool = 0x00000000`00000007, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0, unsigned char blrOp = 0x07 '')+0x23d [H:\SNAPSHOTS\HQbird\src\dsql\StmtNodes.cpp @ 4998]
15 engine13!PAR_parse_node(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0)+0xc2 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1651]
16 engine13!PAR_parse_stmt(class Jrd::thread_db * tdbb = <Value unavailable error>, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0)+0x12 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1594]
17 engine13!Jrd::CompoundStmtNode::parse(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Firebird::MemoryPool * pool = 0x00000000`0292ad10, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0, unsigned char __formal = 0x50 'P')+0x98 [H:\SNAPSHOTS\HQbird\src\dsql\StmtNodes.cpp @ 790]
18 engine13!PAR_parse_node(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::CompilerScratch * csb = 0x00000000`01601dc0)+0xc2 [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 1651]
19 engine13!PAR_parse(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, unsigned char * blr = 0x00000000`0658e8d8 "???", unsigned long blr_length = 0x50, bool internal_flag = false, unsigned long dbginfo_length = 0, unsigned char * dbginfo = 0x00000000`0658ecf8 "@%"???")+0xbd [H:\SNAPSHOTS\HQbird\src\jrd\par.cpp @ 702]
1a engine13!CMP_compile(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, unsigned char * blr = 0x00000000`0658e8d8 "???", unsigned long blrLength = 0x50, bool internalFlag = false, unsigned long dbginfoLength = 0, unsigned char * dbginfo = 0x00000000`0658ecf8 "@%"???")+0xac [H:\SNAPSHOTS\HQbird\src\jrd\cmp.cpp @ 161]
1b engine13!Jrd::DsqlDmlStatement::dsqlPass(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::DsqlCompilerScratch * scratch = 0x00000000`0658e8c0, unsigned int * traceResult = 0x00000000`0b3be7a4)+0x1dc [H:\SNAPSHOTS\HQbird\src\dsql\DsqlStatements.cpp @ 187]
1c engine13!prepareStatement(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::dsql_dbb * database = 0x00000000`06b51e30, class Jrd::jrd_tra * transaction = 0x00000000`a846a1e0, unsigned long textLength = 0x3a, char * text = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned short clientDialect = 3, bool isInternalRequest = false, unsigned int * traceResult = 0x00000000`0b3be7a4)+0x858 [H:\SNAPSHOTS\HQbird\src\dsql\dsql.cpp @ 650]
1d engine13!prepareRequest(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::dsql_dbb * database = 0x00000000`06b51e30, class Jrd::jrd_tra * transaction = 0x00000000`02921dc0, unsigned long textLength = 0, char * text = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned short clientDialect = 3, bool isInternalRequest = false)+0x3ee [H:\SNAPSHOTS\HQbird\src\dsql\dsql.cpp @ 518]
1e engine13!safePrepareRequest(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::dsql_dbb * database = 0x00007ff8`55b768b5, class Jrd::jrd_tra * transaction = 0x00000000`00000047, unsigned long textLength = 0xcfbb5a0, char * text = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned short clientDialect = 3, bool isInternalRequest = false)+0x86 [H:\SNAPSHOTS\HQbird\src\dsql\dsql.cpp @ 461]
1f engine13!DSQL_prepare(class Jrd::thread_db * tdbb = 0x00000000`0b3beb68, class Jrd::Attachment * attachment = 0x00000000`05070040, class Jrd::jrd_tra * transaction = 0x00000000`02921dc0, unsigned long length = 0x3a, char * string = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned short dialect = 3, unsigned int prepareFlags = 0x47, class Firebird::Array<unsigned char,Firebird::EmptyStorage<unsigned char> > * items = 0x00000000`0b3bea50, class Firebird::Array<unsigned char,Firebird::EmptyStorage<unsigned char> > * buffer = 0x00000000`0b3bea38, bool isInternalRequest = false)+0xee [H:\SNAPSHOTS\HQbird\src\dsql\dsql.cpp @ 272]
20 engine13!Jrd::JAttachment::prepare(class Firebird::CheckStatusWrapper * user_status = 0x00000000`0b3bed30, class Firebird::ITransaction * apiTra = 0x00000000`05006848, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0x259 [H:\SNAPSHOTS\HQbird\src\jrd\jrd.cpp @ 5693]
21 engine13!Firebird::IAttachmentBaseImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Jrd::JAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IAttachment> > > > >::cloopprepareDispatcher(class Firebird::IAttachment * self = 0x00000000`10e77e98, class Firebird::IStatus * status = 0x00000000`a7208cd0, class Firebird::ITransaction * tra = 0x00000000`05006848, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0x6a [H:\SNAPSHOTS\HQbird\src\include\firebird\IdlFbInterfaces.h @ 11954]
22 fbclient!Firebird::IAttachment::prepare(void)+0x5a [H:\SNAPSHOTS\HQbird\src\include\firebird\IdlFbInterfaces.h @ 2661]
23 fbclient!Why::YAttachment::prepare(class Firebird::CheckStatusWrapper * status = 0x00000000`0b3bee50, class Firebird::ITransaction * transaction = 0x00000000`18da8ce8, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0xda [H:\SNAPSHOTS\HQbird\src\yvalve\why.cpp @ 5647]
24 fbclient!Firebird::IAttachmentBaseImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::IReferenceCountedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IVersionedImpl<Why::YAttachment,Firebird::CheckStatusWrapper,Firebird::Inherit<Firebird::IAttachment> > > > >::cloopprepareDispatcher(class Firebird::IAttachment * self = 0x00000000`a7208cd8, class Firebird::IStatus * status = 0x00000000`a7208cd8, class Firebird::ITransaction * tra = 0x00000000`18da8ce8, unsigned int stmtLength = 0x3a, char * sqlStmt = 0x00000000`a846a1e0 "select 1 from rdb$database where rdb$db_key = make_dbkey()C", unsigned int dialect = 3, unsigned int flags = 0x47)+0x6a [H:\SNAPSHOTS\HQbird\src\include\firebird\IdlFbInterfaces.h @ 11954]
25 firebird!Firebird::IAttachment::prepare(void)+0x4c [H:\SNAPSHOTS\HQbird\src\include\firebird\IdlFbInterfaces.h @ 2661]
26 firebird!rem_port::prepare_statement(struct p_sqlst * prepareL = 0x00000000`a4e90928, struct packet * sendL = <Value unavailable error>)+0x3d7 [H:\SNAPSHOTS\HQbird\src\remote\server\server.cpp @ 5014]
27 firebird!process_packet(struct rem_port * port = 0x00000000`5be59440, struct packet * sendL = 0x00000000`a4e90058, struct packet * receive = 0x00000000`a4e90628, struct rem_port ** result = 0x00000000`0b3bfee0)+0x4e4 [H:\SNAPSHOTS\HQbird\src\remote\server\server.cpp @ 5315]
28 firebird!loopThread(void * __formal = 0x00000000`009b53d0)+0x338 [H:\SNAPSHOTS\HQbird\src\remote\server\server.cpp @ 6995]
29 firebird!`anonymous-namespace'::ThreadArgs::run(void)+0x5 [H:\SNAPSHOTS\HQbird\src\common\ThreadStart.cpp @ 78]
2a firebird!threadStart(void * arg = 0x00000000`01a87a90)+0x67 [H:\SNAPSHOTS\HQbird\src\common\ThreadStart.cpp @ 97]
2b ucrtbase!configthreadlocale+0x92
2c kernel32!BaseThreadInitThunk+0x14
2d ntdll!RtlUserThreadStart+0x21
|