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

**Describe the bug**
Clickhouse server crashes with `signal 11` message after executing following:

**Does it reproduce on recent release?**
Reproducible on `yandex/clickhouse-server:20.12.6.29` Docker image from dockerhub.

**How to reproduce**
* Which ClickHouse server version to use
`20.12.6.29`

* Which interface to use, if matters
clickhouse client
* Non-default settings, if any
`none`
* `CREATE TABLE` statements for all tables involved
`see below`
* Queries to run that lead to unexpected result
``` SQL
CREATE DATABASE ch_crash_test;

CREATE TABLE ch_crash_test.table
(
	i UInt8, s String
)
ENGINE = MergeTree PARTITION BY tuple() ORDER BY tuple();

CREATE DICTIONARY ch_crash_test.dictionary (key UInt64, value UInt64) PRIMARY KEY key SOURCE(CLICKHOUSE(DB 'ch_crash_test' TABLE 'table' HOST hostName() PORT tcpPort())) LIFETIME(0) LAYOUT(FLAT());
```


**Expected behavior**
CH gives an error message or creates a dictionary.

**Error message and/or stacktrace**
```
[3d980a87c6db] 2021.02.17 10:27:10.046906 [ 104 ] <Fatal> BaseDaemon: ########################################
[3d980a87c6db] 2021.02.17 10:27:10.047020 [ 104 ] <Fatal> BaseDaemon: (version 20.12.6.29 (official build), build id: 3EBB7402D1E5864D) (from thread 74) (query_id: 7ecb645a-e37b-478e-bcd1-c49fb6c066a1) Received signal Segmentation fault (11)
[3d980a87c6db] 2021.02.17 10:27:10.047078 [ 104 ] <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
[3d980a87c6db] 2021.02.17 10:27:10.047150 [ 104 ] <Fatal> BaseDaemon: Stack trace: 0xd92e4b2 0xba40111 0x93efd5e 0x941bbb0 0x941c251 0x94238dd 0xd5ed41d 0xd5e9bb0 0xda66115 0xdc3f2e4 0xdc400af 0xe01ffe7 0xe01ebbd 0xe6f7f46 0xe704447 0x10eaec1f 0x10eb0631 0x10fddc09 0x10fd9b9a 0x7fe33d652609 0x7fe33d568293
[3d980a87c6db] 2021.02.17 10:27:10.047244 [ 104 ] <Fatal> BaseDaemon: 2. DB::IDataType::createColumnConst(unsigned long, DB::Field const&) const @ 0xd92e4b2 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047305 [ 104 ] <Fatal> BaseDaemon: 3. ? @ 0xba40111 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047374 [ 104 ] <Fatal> BaseDaemon: 4. DB::DefaultExecutable::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x93efd5e in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047439 [ 104 ] <Fatal> BaseDaemon: 5. DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x941bbb0 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047510 [ 104 ] <Fatal> BaseDaemon: 6. DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x941c251 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047581 [ 104 ] <Fatal> BaseDaemon: 7. DB::IFunctionBase::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x94238dd in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047633 [ 104 ] <Fatal> BaseDaemon: 8. ? @ 0xd5ed41d in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047683 [ 104 ] <Fatal> BaseDaemon: 9. DB::getDictionaryConfigurationFromAST(DB::ASTCreateQuery const&, DB::Context const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xd5e9bb0 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047746 [ 104 ] <Fatal> BaseDaemon: 10. DB::DatabaseWithDictionaries::createDictionary(DB::Context const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<DB::IAST> const&) @ 0xda66115 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047809 [ 104 ] <Fatal> BaseDaemon: 11. DB::InterpreterCreateQuery::createDictionary(DB::ASTCreateQuery&) @ 0xdc3f2e4 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047864 [ 104 ] <Fatal> BaseDaemon: 12. DB::InterpreterCreateQuery::execute() @ 0xdc400af in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047921 [ 104 ] <Fatal> BaseDaemon: 13. ? @ 0xe01ffe7 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.047969 [ 104 ] <Fatal> BaseDaemon: 14. DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::Context&, bool, DB::QueryProcessingStage::Enum, bool) @ 0xe01ebbd in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048030 [ 104 ] <Fatal> BaseDaemon: 15. DB::TCPHandler::runImpl() @ 0xe6f7f46 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048091 [ 104 ] <Fatal> BaseDaemon: 16. DB::TCPHandler::run() @ 0xe704447 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048150 [ 104 ] <Fatal> BaseDaemon: 17. Poco::Net::TCPServerConnection::start() @ 0x10eaec1f in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048212 [ 104 ] <Fatal> BaseDaemon: 18. Poco::Net::TCPServerDispatcher::run() @ 0x10eb0631 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048252 [ 104 ] <Fatal> BaseDaemon: 19. Poco::PooledThread::run() @ 0x10fddc09 in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048311 [ 104 ] <Fatal> BaseDaemon: 20. Poco::ThreadImpl::runnableEntry(void*) @ 0x10fd9b9a in /usr/bin/clickhouse
[3d980a87c6db] 2021.02.17 10:27:10.048367 [ 104 ] <Fatal> BaseDaemon: 21. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
[3d980a87c6db] 2021.02.17 10:27:10.048424 [ 104 ] <Fatal> BaseDaemon: 22. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
```

**Additional context**
Looks like related to `hostName()` function, since both queries without it work just fine:
``` SQL
CREATE DICTIONARY ch_crash_test.dictionary (key UInt64, value UInt64) PRIMARY KEY key SOURCE(CLICKHOUSE(DB 'ch_crash_test' TABLE 'table' HOST 'localhost' PORT 9001)) LIFETIME(0) LAYOUT(FLAT());
CREATE DICTIONARY ch_crash_test.dictionary (key UInt64, value UInt64) PRIMARY KEY key SOURCE(CLICKHOUSE(DB 'ch_crash_test' TABLE 'table' HOST 'localhost' PORT tcpPort())) LIFETIME(0) LAYOUT(FLAT());
```


AutoPtr<Poco::XML::Element> database_element(xml_document->createElement("database"));
    current_dictionary->appendChild(database_element);
    AutoPtr<Text> database(xml_document->createTextNode(!database_.empty() ? database_ : query.database));
    database_element->appendChild(database);
    if (query.uuid != UUIDHelpers::Nil)
    {
        AutoPtr<Poco::XML::Element> uuid_element(xml_document->createElement("uuid"));
        current_dictionary->appendChild(uuid_element);
        AutoPtr<Text> uuid(xml_document->createTextNode(toString(query.uuid)));
        uuid_element->appendChild(uuid);
    }
    AutoPtr<Element> structure_element(xml_document->createElement("structure"));
    current_dictionary->appendChild(structure_element);
    Names pk_attrs = getPrimaryKeyColumns(query.dictionary->primary_key);
    auto * dictionary_layout = query.dictionary->layout;
    bool complex = DictionaryFactory::instance().isComplex(dictionary_layout->layout_type);
    auto all_attr_names_and_types = buildDictionaryAttributesConfiguration(
        xml_document, structure_element, query.dictionary_attributes_list, pk_attrs);
    checkPrimaryKey(all_attr_names_and_types, pk_attrs);
    buildPrimaryKeyConfiguration(xml_document, structure_element, complex, pk_attrs, query.dictionary_attributes_list);
    buildLayoutConfiguration(xml_document, current_dictionary, dictionary_layout);
    buildSourceConfiguration(xml_document, current_dictionary, query.dictionary->source, query.dictionary->dict_settings, context);
    buildLifetimeConfiguration(xml_document, current_dictionary, query.dictionary->lifetime);
    if (query.dictionary->range)
        buildRangeConfiguration(xml_document, structure_element, query.dictionary->range, all_attr_names_and_types);
    conf->load(xml_document);
    return conf;
}
}