Skip to content

Bus error on CREATE SECRET on aarch64 #81

Open
@aschereT

Description

@aschereT

On aarch64, specifying URL_STYLE causes a bus error:

[ec2-user@ip-10-220-0-218 tmp]$ uname -a
Linux ip-10-220-0-218.ec2.internal 6.1.131-143.221.amzn2023.aarch64 #1 SMP Mon Mar 24 15:34:49 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux
[ec2-user@ip-10-220-0-218 tmp]$ duckdb
v1.2.2 7c039464e4
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D pragma extension_versions;
┌──────────────────┬───────────────────┬───────────────────┬────────────────┐
│  extension_name  │ extension_version │   install_mode    │ installed_from │
│     varchar      │      varchar      │      varchar      │    varchar     │
├──────────────────┼───────────────────┼───────────────────┼────────────────┤
│ autocomplete     │ v1.2.2            │ STATICALLY_LINKED │                │
│ aws              │ e92e45b           │ REPOSITORY        │ core           │
│ core_functions   │ v1.2.2            │ STATICALLY_LINKED │                │
│ httpfs           │ c225324           │ REPOSITORY        │ core           │
│ icu              │ v1.2.2            │ STATICALLY_LINKED │                │
│ jemalloc         │ v1.2.2            │ STATICALLY_LINKED │                │
│ json             │ v1.2.2            │ STATICALLY_LINKED │                │
│ parquet          │ v1.2.2            │ STATICALLY_LINKED │                │
│ postgres_scanner │ 98482ce           │ REPOSITORY        │ core           │
│ shell            │ v1.2.2            │ STATICALLY_LINKED │                │
├──────────────────┴───────────────────┴───────────────────┴────────────────┤
│ 10 rows                                                         4 columns │
└───────────────────────────────────────────────────────────────────────────┘
D CREATE OR REPLACE SECRET secret (TYPE s3, PROVIDER credential_chain, URL_STYLE 'path');
Bus error (core dumped)

GDB says:

0x0000ffffe717b4c8 in duckdb::LogicalType::LogicalType(duckdb::LogicalType const&) () from /home/ec2-user/.duckdb/extensions/v1.2.2/linux_arm64/aws.duckdb_extension

Running on my Mac provides a stack trace:

INTERNAL Error:
Invalid PhysicalType for GetTypeIdSize

Stack Trace:

0        _ZN6duckdb9ExceptionC2ENS_13ExceptionTypeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 64
1        _ZN6duckdb13GetTypeIdSizeENS_12PhysicalTypeE + 288
2        _ZN6duckdb12VectorBuffer20CreateConstantVectorENS_12PhysicalTypeE + 28
3        _ZN6duckdb6Vector9ReferenceERKNS_5ValueE + 60
4        _ZNK6duckdb5Value9TryCastAsERNS_15CastFunctionSetERNS_20GetCastFunctionInputERKNS_11LogicalTypeERS0_PNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEEb + 264
5        _ZNK6duckdb5Value6CastAsERNS_15CastFunctionSetERNS_20GetCastFunctionInputERKNS_11LogicalTypeEb + 204
6        _ZNK6duckdb5Value8ToStringEv + 136
7        _ZN6duckdbL34CreateAWSSecretFromCredentialChainERNS_13ClientContextERNS_17CreateSecretInputE + 6900
8        duckdb::SecretManager::CreateSecret(duckdb::ClientContext&, duckdb::CreateSecretInfo const&) + 520
9        duckdb::PhysicalCreateSecret::GetData(duckdb::ExecutionContext&, duckdb::DataChunk&, duckdb::OperatorSourceInput&) const + 56
10       duckdb::PipelineExecutor::FetchFromSource(duckdb::DataChunk&) + 124
11       duckdb::PipelineExecutor::Execute(unsigned long long) + 236
12       duckdb::PipelineTask::ExecuteTask(duckdb::TaskExecutionMode) + 236
13       duckdb::ExecutorTask::Execute(duckdb::TaskExecutionMode) + 192
14       duckdb::Executor::ExecuteTask(bool) + 252
15       duckdb::ClientContext::ExecuteTaskInternal(duckdb::ClientContextLock&, duckdb::BaseQueryResult&, bool) + 64
16       duckdb::PendingQueryResult::ExecuteInternal(duckdb::ClientContextLock&) + 60
17       duckdb::PendingQueryResult::Execute() + 56
18       duckdb_shell_sqlite3_print_duckbox + 368
19       duckdb_shell::ShellState::ExecutePreparedStatement(sqlite3_stmt*) + 932
20       duckdb_shell::ShellState::ExecuteSQL(char const*, char**) + 452
21       duckdb_shell::ShellState::RunOneSqlLine(char*) + 104
22       duckdb_shell::ShellState::ProcessInput() + 916
23       main + 3140
24       start + 6000

This error signals an assertion failure within DuckDB. This usually occurs due to unexpected conditions or errors in the program's logic.
For more information, see https://duckdb.org/docs/dev/internal_errors

On x86_64 it works as expected

[ec2-user@ip-10-220-0-223 ~]$ uname -a
Linux ip-10-220-0-223.ec2.internal 6.1.132-147.221.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr  8 13:14:54 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
[ec2-user@ip-10-220-0-223 ~]$ duckdb
v1.2.2 7c039464e4
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D pragma extension_versions;
┌──────────────────┬───────────────────┬───────────────────┬────────────────┐
│  extension_name  │ extension_version │   install_mode    │ installed_from │
│     varchar      │      varchar      │      varchar      │    varchar     │
├──────────────────┼───────────────────┼───────────────────┼────────────────┤
│ autocomplete     │ v1.2.2            │ STATICALLY_LINKED │                │
│ aws              │ e92e45b           │ REPOSITORY        │ core           │
│ core_functions   │ v1.2.2            │ STATICALLY_LINKED │                │
│ httpfs           │ c225324           │ REPOSITORY        │ core           │
│ icu              │ v1.2.2            │ STATICALLY_LINKED │                │
│ jemalloc         │ v1.2.2            │ STATICALLY_LINKED │                │
│ json             │ v1.2.2            │ STATICALLY_LINKED │                │
│ parquet          │ v1.2.2            │ STATICALLY_LINKED │                │
│ postgres_scanner │ 98482ce           │ REPOSITORY        │ core           │
│ shell            │ v1.2.2            │ STATICALLY_LINKED │                │
├──────────────────┴───────────────────┴───────────────────┴────────────────┤
│ 10 rows                                                         4 columns │
└───────────────────────────────────────────────────────────────────────────┘
D CREATE OR REPLACE SECRET secret (TYPE s3, PROVIDER credential_chain, URL_STYLE 'path');
┌─────────┐
│ Success │
│ boolean │
├─────────┤
│ true    │
└─────────┘

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions