Skip to content

Dictionary over ODBC is broken after v20.4.7.67 #13861

@x052bb

Description

@x052bb

(you don't have to strictly follow this form)

Describe the issue
Dictionary over ODBC (unixodbc, Oracle) doesn't work after Clickhouse version upgrade. Works in v20.4.6.53, doesn't work in v20.4.7.67 and above

How to reproduce

  1. Create dictionary:
CREATE DICTIONARY IF NOT EXISTS default.test_dictionary
(
    TEST_ID UInt64,
    TEST_VERSION UInt64,
    TEST_VALUE String
)
PRIMARY KEY TEST_ID, TEST_VERSION
SOURCE(ODBC(db 'X_OWNER' table 'X_TEST' connection_string 'DSN=X_ORCL'))
LAYOUT(complex_key_hashed())
LIFETIME(MIN 10800 MAX 14400)
  1. Direct ODBC query works:
SELECT TEST_VALUE FROM odbc('DSN=X_ORCL', 'X_OWNER', 'X_TEST')
  1. Try to query dictionary:
SELECT dictHas('default.test_dictionary', tuple(toUInt64(1), toUInt64(1)))`
  1. Error

4.1. Server log:

2020.08.18 14:32:32.045725 [ 6757 ] {} <Trace> ReadWriteBufferFromHTTP: Sending request to http://localhost:9018/ping
2020.08.18 14:32:32.047007 [ 6757 ] {} <Trace> ReadWriteBufferFromHTTP: Sending request to http://localhost:9018/schema_allowed?connection_string=DSN%3DX_ORCL
2020.08.18 14:32:42.229338 [ 6757 ] {} <Trace> ExternalDictionariesLoader: Supposed update time for unspecified object  is 2020-08-18 14:32:51 (backoff, 3 errors.
2020.08.18 14:32:42.229631 [ 6757 ] {} <Error> ExternalDictionariesLoader: Could not load external dictionary 'default.test_dictionary', next update is scheduled at 2020-08-18 14:32:51: Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = No message received, Stack trace (when copying this message, always include the lines below):
0. Poco::IOException::IOException(int) @ 0x10471ecf in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
1. Poco::Net::NoMessageException::NoMessageException(int) @ 0x10330a8d in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
2. ? @ 0x10317891 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
3. Poco::Net::HTTPClientSession::receiveResponse(Poco::Net::HTTPResponse&) @ 0x1030ab52 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
4. DB::receiveResponse(Poco::Net::HTTPClientSession&, Poco::Net::HTTPRequest const&, Poco::Net::HTTPResponse&, bool) @ 0x9112fcf in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
5. DB::detail::ReadWriteBufferFromHTTPBase<std::__1::shared_ptr<DB::UpdatableSession> >::call(Poco::URI, Poco::Net::HTTPResponse&) @ 0xaef3e44 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
6. DB::detail::ReadWriteBufferFromHTTPBase<std::__1::shared_ptr<DB::UpdatableSession> >::ReadWriteBufferFromHTTPBase(std::__1::shared_ptr<DB::UpdatableSession>, Poco::URI, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::function<void (std::__1::basic_ostream<char, std::__1::char_traits<char> >&)>, Poco::Net::HTTPBasicCredentials const&, unsigned long, std::__1::vector<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, DB::RemoteHostFilter const&) @ 0xaef43ab in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
7. DB::ReadWriteBufferFromHTTP::ReadWriteBufferFromHTTP(Poco::URI, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::function<void (std::__1::basic_ostream<char, std::__1::char_traits<char> >&)>, DB::ConnectionTimeouts const&, DB::SettingNumber<unsigned long>, Poco::Net::HTTPBasicCredentials const&, unsigned long, std::__1::vector<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const&, DB::RemoteHostFilter const&) @ 0xaef4da9 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
8. DB::XDBCBridgeHelper<DB::ODBCBridgeMixin>::isSchemaAllowed() @ 0xaef53d0 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
9. DB::XDBCDictionarySource::XDBCDictionarySource(DB::DictionaryStructure const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Block const&, DB::Context const&, std::__1::shared_ptr<DB::IXDBCBridgeHelper>) @ 0xaee9239 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
10. ? @ 0xaeeae80 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
11. ? @ 0xaeeb343 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
12. DB::DictionarySourceFactory::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::DictionaryStructure const&, DB::Context const&, bool) const @ 0xcc78f35 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
13. DB::DictionaryFactory::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context const&, bool) const @ 0xcc74988 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
14. DB::ExternalDictionariesLoader::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const @ 0xd09743e in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
15. DB::ExternalLoader::createObject(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) const @ 0xd098340 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
16. DB::ExternalLoader::LoadingDispatcher::doLoading(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, bool, unsigned long, bool) @ 0xd0a224e in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
17. ThreadFromGlobalPool::ThreadFromGlobalPool<void (DB::ExternalLoader::LoadingDispatcher::*)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, bool, unsigned long, bool), DB::ExternalLoader::LoadingDispatcher*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned long&, bool&, unsigned long&, bool>(void (DB::ExternalLoader::LoadingDispatcher::*&&)(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, bool, unsigned long, bool), DB::ExternalLoader::LoadingDispatcher*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned long&, bool&, unsigned long&, bool&&)::'lambda'()::operator()() const @ 0xd09c39c in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
18. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x9073267 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
19. ? @ 0x9071753 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse
20. start_thread @ 0x7ea5 in /usr/lib64/libpthread-2.17.so
21. clone @ 0xfe8dd in /usr/lib64/libc-2.17.so
 (version 20.4.7.67 (official build))

4.2. ODBC bridge log:

2020.08.18 14:34:32.062449 [ 31171 ] {} <Trace> ODBCRequestHandlerFactory-factory: Request URI: /ping
2020.08.18 14:34:32.063079 [ 31171 ] {} <Trace> ODBCRequestHandlerFactory-factory: Request URI: /schema_allowed?connection_string=DSN%3DX_ORCL
2020.08.18 14:34:32.063174 [ 31171 ] {} <Trace> SchemaAllowedHandler: Request URI: /schema_allowed?connection_string=DSN%3DX_ORCL
2020.08.18 14:34:32.209685 [ 31170 ] {} <Trace> BaseDaemon: Received signal 11
2020.08.18 14:34:32.210126 [ 31176 ] {} <Fatal> BaseDaemon: ########################################
2020.08.18 14:34:32.210348 [ 31176 ] {} <Fatal> BaseDaemon: (version 20.4.7.67 (official build)) (from thread 31171) (no query) Received signal Segmentation fault (11).
2020.08.18 14:34:32.210545 [ 31176 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: write. Address not mapped to object.
2020.08.18 14:34:32.210581 [ 31176 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f8de7f8482f 0x7f8de7fbb924 0x6aeec69 0x2f687fb 0x615c733 0x619639b 0x619682b 0x6cb3bf6 0x6caeeb0 0x7f8dec0b1ea5 0x7f8dec6c68dd
2020.08.18 14:34:32.230562 [ 31176 ] {} <Fatal> BaseDaemon: 3. bcoSQLGetInfo @ 0x4982f in /home/x/deploy/oracle-instant-client-x64/12.2.0.1.0/oracle-instant-client-x64/libsqora.so.12.1
2020.08.18 14:34:32.230656 [ 31176 ] {} <Fatal> BaseDaemon: 4. SQLGetInfoW @ 0x80924 in /home/x/deploy/oracle-instant-client-x64/12.2.0.1.0/oracle-instant-client-x64/libsqora.so.12.1
2020.08.18 14:34:32.230691 [ 31176 ] {} <Fatal> BaseDaemon: 5. ? @ 0x6aeec69 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse-odbc-bridge
2020.08.18 14:34:32.230719 [ 31176 ] {} <Fatal> BaseDaemon: 6. ? @ 0x2f687fb in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse-odbc-bridge
2020.08.18 14:34:32.230748 [ 31176 ] {} <Fatal> BaseDaemon: 7. ? @ 0x615c733 in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse-odbc-bridge
2020.08.18 14:34:32.230766 [ 31176 ] {} <Fatal> BaseDaemon: 8. ? @ 0x619639b in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse-odbc-bridge
2020.08.18 14:34:32.230782 [ 31176 ] {} <Fatal> BaseDaemon: 9. ? @ 0x619682b in /home/x/apps/releases/clickhouse-rhel/20.4.7.67/clickhouse/bin/clickhouse-odbc-bridge
2020.08.18 14:34:32.230797 [ 31176 ] {} <Fatal> BaseDaemon: 10. ? @ 0x6cb3bf6 in ?
2020.08.18 14:34:32.230819 [ 31176 ] {} <Fatal> BaseDaemon: 11. ? @ 0x6caeeb0 in ?
2020.08.18 14:34:32.230862 [ 31176 ] {} <Fatal> BaseDaemon: 12. start_thread @ 0x7ea5 in /usr/lib64/libpthread-2.17.so
2020.08.18 14:34:32.230902 [ 31176 ] {} <Fatal> BaseDaemon: 13. __clone @ 0xfe8dd in /usr/lib64/libc-2.17.so

Metadata

Metadata

Assignees

Labels

backward compatibilitybugConfirmed user-visible misbehaviour in official releasecomp-dictionaryDictionaries (in-memory key-value, periodically refreshed from sources).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions