Closed l1t1 closed 1 year ago
after upx
root@localhost:/data/data/com.termux/files/home# file duckdb duckdb: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), statically linked, no section header
before upx root@localhost:/data/data/com.termux/files/home# file duckdb2 duckdb2: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=69bcb930f7aab2c5295cbf4fc2132842f6d5af84,
Please be more specific in indentifying the actual executable which exits silently.
I see Host Operating system: Android 10
, and Host Architecture: aarch64
, yet the directions for reproducing say download arrch64 linux binary
which is not consistent: Linux
versus Android
. Also, on the page https://github.com/duckdb/duckdb/releases/tag/v0.7.1 I do not see any Asset whose name contains android
; the closest name appears to be https://github.com/duckdb/duckdb/releases/download/v0.7.1/duckdb_cli-linux-aarch64.zip which is not an Android thing.
Also, please specify an actual command line that runs duckdb
and exits silently
after being compressed by UPX. When this happens, what is the shell-level exit code from the compressed duckdb? Please check the system log files (such as by running logcat
on the Android system, or dmesg
on a Linux system) to see if there are any relevant messages.
thank you.
the binary file I run was unzip from https://github.com/duckdb/duckdb/releases/download/v0.7.1/duckdb_cli-linux-aarch64.zip, namely
/data/data/com.termux/files/home/duckdb,
I use this one because using this duckdb can install extensions while the termux duckdb package(pkg ins duckdb
)can't.
in order to run this duckdb file,
I also run pkg install proot-distro
in termux,
then run proot-distro install ubuntu
my steps to reproduce the issue are:
~ $ proot-distro login ubuntu
root@localhost:~# cd /data/data/com.termux/files/home
root@localhost:/data/data/com.termux/files/home# ./duckdb
v0.7.1 b00b93f0b1
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D .exit
root@localhost:/data/data/com.termux/files/home# upx duckdb
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
42365144 -> 13154148 31.05% linux/arm64 duckdb
Packed 1 file.
root@localhost:/data/data/com.termux/files/home# ./duckdb
dmesg didn't work in my equipment.
~ $ proot-distro login ubuntu
root@localhost:~# cd /data/data/com.termux/files/home
root@localhost:/data/data/com.termux/files/home# ./duckdb
root@localhost:/data/data/com.termux/files/home# dmesg | tail -f
dmesg: read kernel buffer failed: Function not implemented
logcat the last two logs are today's
root@localhost:/data/data/com.termux/files/home# logcat
--------- beginning of crash
03-07 23:29:16.894 22616 22616 F libc : Fatal signal 31 (SIGSYS), code 1 (SYS_SECCOMP) in tid 22616 (killall), pid 22616 (killall)
03-07 23:29:16.912 22619 22619 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-07 23:29:16.912 22619 22619 F DEBUG : Build fingerprint: 'HONOR/OXF-AN00/HWOXF:10/HUAWEIOXF-AN00/11.0.0.174C00:user/release-keys'
03-07 23:29:16.912 22619 22619 F DEBUG : Revision: '0'
03-07 23:29:16.912 22619 22619 F DEBUG : ABI: 'arm64'
03-07 23:29:16.915 22619 22619 F DEBUG : SYSVMTYPE: Maple
03-07 23:29:16.915 22619 22619 F DEBUG : APPVMTYPE: Art
03-07 23:29:16.915 22619 22619 F DEBUG : Timestamp: 2023-03-07 23:29:16+0800
03-07 23:29:16.915 22619 22619 F DEBUG : pid: 22616, tid: 22616, name: killall >>> killall <<<
03-07 23:29:16.915 22619 22619 F DEBUG : uid: 10200
03-07 23:29:16.915 22619 22619 F DEBUG : signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr --------
03-07 23:29:16.915 22619 22619 F DEBUG : Cause: seccomp prevented call to disallowed arm64 system call 424
03-07 23:29:16.915 22619 22619 F DEBUG : x0 0000000000000003 x1 0000000000000009 x2 0000000000000000 x3 0000000000000000
03-07 23:29:16.915 22619 22619 F DEBUG : x4 4548530000000000 x5 0000000080534845 x6 0000000080534845 x7 444751ff6073646c
03-07 23:29:16.915 22619 22619 F DEBUG : x8 00000000000001a8 x9 0000000000000000 x10 0101010101010101 x11 0000007e55c2d010
03-07 23:29:16.915 22619 22619 F DEBUG : x12 0000000000000000 x13 3338363631393435 x14 0000000000000010 x15 0000007e561d839a
03-07 23:29:16.915 22619 22619 F DEBUG : x16 00000060bd149a38 x17 0000007e5616eae0 x18 0000007e56f26000 x19 00000060bd14a000
03-07 23:29:16.915 22619 22619 F DEBUG : x20 0000000000000000 x21 00000000000039c1 x22 0000000000000001 x23 0000007e55c41000
03-07 23:29:16.915 22619 22619 F DEBUG : x24 0000000000000000 x25 0000007e561d85b0 x26 0000000000000003 x27 0000007e55c41400
03-07 23:29:16.915 22619 22619 F DEBUG : x28 0000000000000003 x29 0000007fe9ceda20
03-07 23:29:16.915 22619 22619 F DEBUG : sp 0000007fe9ced030 lr 00000060bd147614 pc 0000007e5616eb00
03-07 23:29:16.916 22619 22619 F DEBUG :
03-07 23:29:16.916 22619 22619 F DEBUG : backtrace:
03-07 23:29:16.916 22619 22619 F DEBUG : NOTE: Function names and BuildId information is missing for some frames due
03-07 23:29:16.916 22619 22619 F DEBUG : NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
03-07 23:29:16.916 22619 22619 F DEBUG : NOTE: found under the lib/ directory are readable.
03-07 23:29:16.916 22619 22619 F DEBUG : #00 pc 000000000006cb00 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32) (BuildId: 928809e4bdb773b35f649f8fb0d674ce)
03-07 23:29:16.916 22619 22619 F DEBUG : #01 pc 0000000000003610 /data/data/com.termux/files/usr/bin/killall
04-18 10:39:24.313 12111 12111 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 12111 (scws), pid 12111 (scws)
04-18 10:39:24.330 12114 12114 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-18 10:39:24.330 12114 12114 F DEBUG : Build fingerprint: 'HONOR/OXF-AN00/HWOXF:10/HUAWEIOXF-AN00/11.0.0.174C00:user/release-keys'
04-18 10:39:24.330 12114 12114 F DEBUG : Revision: '0'
04-18 10:39:24.330 12114 12114 F DEBUG : ABI: 'arm64'
04-18 10:39:24.333 12114 12114 F DEBUG : SYSVMTYPE: Maple
04-18 10:39:24.333 12114 12114 F DEBUG : APPVMTYPE: Art
04-18 10:39:24.333 12114 12114 F DEBUG : Timestamp: 2023-04-18 10:39:24+0800
04-18 10:39:24.333 12114 12114 F DEBUG : pid: 12111, tid: 12111, name: scws >>> ./scws <<<
04-18 10:39:24.333 12114 12114 F DEBUG : uid: 10200
04-18 10:39:24.333 12114 12114 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
04-18 10:39:24.333 12114 12114 F DEBUG : Cause: null pointer dereference
04-18 10:39:24.333 12114 12114 F DEBUG : x0 0000000000000000 x1 0000007fefcbc578 x2 0000005e2d5e4244 x3 0000000000000000
04-18 10:39:24.333 12114 12114 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 00000074a6166000 x7 00000074a4e6b310
04-18 10:39:24.333 12114 12114 F DEBUG : x8 0000000000000002 x9 000000000000002d x10 0000000000000002 x11 00000000ffffffff
04-18 10:39:24.333 12114 12114 F DEBUG : x12 000000000000002d x13 0000007fefcbce5c x14 00000074a4dae7f5 x15 0000000000000050
04-18 10:39:24.333 12114 12114 F DEBUG : x16 00000074a4e69860 x17 00000074a4e47a3c x18 00000074a5fc2000 x19 00000074a482d000
04-18 10:39:24.333 12114 12114 F DEBUG : x20 0000000000000000 x21 0000000000000000 x22 00000074a4e6319c x23 00000074a4e6b310
04-18 10:39:24.333 12114 12114 F DEBUG : x24 0000007fefcbc578 x25 0000000000000000 x26 0000000000000000 x27 0000000000000000
04-18 10:39:24.333 12114 12114 F DEBUG : x28 0000000000000000 x29 0000007fefcbc4b0
04-18 10:39:24.333 12114 12114 F DEBUG : sp 0000007fefcbbbc0 lr 0000005e2d5e5a58 pc 0000005e2d5e5d44
04-18 10:39:24.333 12114 12114 F DEBUG :
04-18 10:39:24.333 12114 12114 F DEBUG : backtrace:
04-18 10:39:24.333 12114 12114 F DEBUG : NOTE: Function names and BuildId information is missing for some frames due
04-18 10:39:24.333 12114 12114 F DEBUG : NOTE: to unreadable libraries. For unwinds of apps, only shared libraries
04-18 10:39:24.333 12114 12114 F DEBUG : NOTE: found under the lib/ directory are readable.
04-18 10:39:24.333 12114 12114 F DEBUG : #00 pc 0000000000001d44 /data/data/com.termux/files/home/scws-1.2.3/scws/bin/scws
--------- beginning of system
05-03 06:53:18.845 11529 12736 I ActivityThread: Init compatible state: true
05-03 06:53:18.860 11529 11529 I ActivityThread: finishPreloaded preloadStatus 0
05-03 06:53:20.962 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:53:21.386 11529 11529 W HwApsManager: HwApsManagerService, registerCallback, start !
05-03 06:54:07.589 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:54:07.600 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:54:07.697 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:54:43.107 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:54:46.011 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:54:48.719 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:54:48.731 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
05-03 06:54:48.814 11529 11529 I ViewRootImpl: dispatchDetachedFromWindow in doDie
--------- beginning of main
05-03 07:04:42.151 11529 14541 E libc : Access denied finding property "ro.kirin.product.platform"
05-03 07:04:42.151 11529 14541 W HwExtendedCodec: The mime is not in hisi extended mime.
05-03 07:04:42.159 11529 14542 I CCodec : Created component [c2.android.vorbis.decoder]
05-03 07:04:42.161 11529 14542 I CCodecConfig: query failed after returning 7 values (BAD_INDEX)
05-03 07:04:42.162 11529 14542 W Codec2Client: query -- param skipped: index = 1107298332.
05-03 07:04:42.163 11529 14542 W Codec2Client: query -- param skipped: index = 1342179345.
05-03 07:04:42.163 11529 14542 W Codec2Client: query -- param skipped: index = 2415921170.
05-03 07:04:42.166 11529 14542 I CCodecBufferChannel: [c2.android.vorbis.decoder#241] Created output block pool with allocatorID 16 => poolID 8387 - OK
05-03 07:04:42.172 11529 11529 I HwViewRootImpl: removeInvalidNode all the node in jank list is out of time
05-03 07:04:42.178 11529 11529 W InputMethodManager: startInputReason = 1
05-03 07:04:42.439 11529 11529 I InputMethodManager: showSoftInput
05-03 07:04:50.896 12883 12883 W proot : type=1400 audit(0.0:6997835): avc: granted { execute } for pid=12883 name="logcat" dev="sdd74" ino=594644 scontext=u:r:untrusted_app_27:s0:c200,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c200,c256,c512,c768 tclass=file
05-03 07:04:50.900 12883 12883 W proot : type=1400 audit(0.0:6997836): avc: granted { execute } for pid=12883 name="dash" dev="sdd74" ino=171947 scontext=u:r:untrusted_app_27:s0:c200,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c200,c256,c512,c768 tclass=file
^C
Thank you for the logs. The logcat
crash section has Timestamp: 2023-03-07 23:29:16+0800
and Timestamp: 2023-04-18 10:39:24+0800
which are not recent. However, they do contain signal 31 (SIGSYS), code 1 (SYS_SECCOMP)
and signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
which suggests that you should check SELinux security mode:
# This tells the current mode; "Enforcing" means strictest security
$ getenforce
Enforcing
# This shows how to lower the mode: "Permissive" is looser security (not as strict)
$ sudo setenforce 0
[sudo] password for $USER:
$ getenforce
Permissive
# Restore strictest security
$ sudo setenforce 1
$ getenforce
Enforcing
$
The current tip of UPX source-code branch upx-devel4 has recent commits which allow a UPX-compressed shared library to work in SELinux Enforcing mode. Analogous changes have not yet been made for a UPX-compressed main program. That work may begin soon. So you might try sudo setenforce 0
, then see if compressed duckdb runs OK today.
thank you. there is no sudo
in my system.
root@localhost:/data/data/com.termux/files/home# getenforce
getenforce: Couldn't get enforcing status: Permission denied
root@localhost:/data/data/com.termux/files/home# sudo getenforce
-bash: sudo: command not found
root@localhost:/data/data/com.termux/files/home# setenforce 0
setenforce: Couldn't set enforcing status to '0': Permission denied
btw, win32 version duckdb works after upx
D:\duckdb>upx duckdbwin32.exe
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2020
UPX 3.96w Markus Oberhumer, Laszlo Molnar & John Reiser Jan 23rd 2020
File size Ratio Format Name
-------------------- ------ ----------- -----------
25464320 -> 6769664 26.58% win32/pe duckdbwin32.exe
Packed 1 file.
D:\duckdb>duckdbwin32
v0.7.2-dev2675 688b2f1f8c
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D select avg(i) from range(1e6::int)t(i);
┌──────────┐
│ avg(i) │
│ double │
├──────────┤
│ 499999.5 │
└──────────┘
some more information.
the duckdb of pkg ins duckdb
works after upx.
but cannot work in proot-distro ubuntu.
~ $ which duckdb
/data/data/com.termux/files/usr/bin/duckdb
~ $ cp /data/data/com.termux/files/usr/bin/duckdb /data/data/com.termux/files/usr/bin/duckdb2
~ $ /data/data/com.termux/files/usr/bin/duckdb2
v0.7.1 b00b93f
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D .exit
~ $ upx /data/data/com.termux/files/usr/bin/duckdb2
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
29451168 -> 8469404 28.76% linux/arm64 duckdb2
Packed 1 file.
~ $ /data/data/com.termux/files/usr/bin/duckdb2
v0.7.1 b00b93f
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D select avg(i) from range(10000)t(i);
┌────────┐
│ avg(i) │
│ double │
├────────┤
│ 4999.5 │
└────────┘
D .exit
~ $ proot-distro login ubuntu
root@localhost:~# /data/data/com.termux/files/usr/bin/duckdb2
root@localhost:~# exit
logout
~ $ upx -l ./duckdb
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
42365144 -> 13154148 31.05% linux/arm64 ./duckdb
~ $ ./duckdb
if try to run download version duckdb in termux directly, it reported an error. so I guess the upx version crashed before locate ld-linux-aarch64.so.1
~ $ ./duckdb2
bash: ./duckdb2: cannot execute: required file not found
~ $ file duckdb2
duckdb2: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=69bcb930f7aab2c5295cbf4fc2132842f6d5af84,
On Linux “strace -e trace=file ./duckdb2” tells all files that are accessed.
Report issues at https://termux.dev/issues
~ $ strace -e trace=file ./duckdb
The program strace is not installed. Install it by executing:
pkg install strace
~ $ proot-distro login ubuntu
root@localhost:~# cd /data/data/com.termux/files/home/
root@localhost:/data/data/com.termux/files/home# strace -e trace=file ./duckdb
-bash: strace: command not found
root@localhost:/data/data/com.termux/files/home# exit
logout
~ $ pkg ins strace
Testing the available mirrors:
[*] (1) https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main: ok
Picking mirror: (0) /data/data/com.termux/files/usr/etc/termux/mirrors/china/mirrors.tuna.tsinghua.edu.cn
Get:1 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable InRelease [14.0 kB]
Get:2 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main aarch64 Packages [501 kB]
Fetched 515 kB in 1s (462 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
67 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpcreposix openssl-1.1
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
argp libdw libelf
The following NEW packages will be installed:
argp libdw libelf strace
0 upgraded, 4 newly installed, 0 to remove and 67 not upgraded.
Need to get 628 kB of archives.
After this operation, 2765 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main aarch64 argp aarch64 1.5.0 [21.2 kB]
Get:2 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main aarch64 libelf aarch64 0.189 [46.8 kB]
Get:3 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main aarch64 libdw aarch64 0.189 [196 kB]
Get:4 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main aarch64 strace aarch64 6.2 [364 kB]
Fetched 628 kB in 1s (1033 kB/s)
Selecting previously unselected package argp.
(Reading database ... 25094 files and directories currently installed.)
Preparing to unpack .../argp_1.5.0_aarch64.deb ...
Unpacking argp (1.5.0) ...
Selecting previously unselected package libelf.
Preparing to unpack .../libelf_0.189_aarch64.deb ...
Unpacking libelf (0.189) ...
Selecting previously unselected package libdw.
Preparing to unpack .../libdw_0.189_aarch64.deb ...
Unpacking libdw (0.189) ...
Selecting previously unselected package strace.
Preparing to unpack .../strace_6.2_aarch64.deb ...
Unpacking strace (6.2) ...
Setting up argp (1.5.0) ...
Setting up libelf (0.189) ...
Setting up libdw (0.189) ...
Setting up strace (6.2) ...
~ $ proot-distro login ubuntu
root@localhost:~# strace -e trace=file ./duckdb
proot warning: ptrace request 'PTRACE_???' not supported yet
strace: Can't stat './duckdb': No such file or directory
root@localhost:~# cd /data/data/com.termux/files/home/
root@localhost:/data/data/com.termux/files/home# strace -e trace=file ./duckdb
proot warning: ptrace request 'PTRACE_???' not supported yet
execve("./duckdb", ["./duckdb"], 0x7fefad4710 /* 26 vars */) = 0
openat(AT_FDCWD, "/proc/self/exe", O_RDONLY) = 3
readlinkat(AT_FDCWD, "/proc/self/exe", "/data/data/com.termux/files/home"..., 4095) = 39
openat(AT_FDCWD, "/lib/ld-linux-aarch64.so.1", O_RDONLY) = 4
+++ exited with 127 +++
root@localhost:/data/data/com.termux/files/home# strace -e trace=file ./duckdb2
proot warning: ptrace request 'PTRACE_???' not supported yet
execve("./duckdb2", ["./duckdb2"], 0x7fdf71c440 /* 26 vars */) = 0
faccessat(AT_FDCWD, "/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=5063, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=6152, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=13736, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=551064, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1641496, ...}, AT_EMPTY_PATH) = 0
readlinkat(AT_FDCWD, "/etc/malloc.conf", 0x7fdd5fa7e0, 4096) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, ":memory:", F_OK) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=494, ...}, 0) = 0
newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=3488, ...}, 0) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=494, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=494, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=971, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/root/.duckdbrc", O_RDONLY) = -1 ENOENT (No such file or directory)
newfstatat(1, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0), ...}, AT_EMPTY_PATH) = 0
v0.7.1 b00b93f0b1
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
openat(AT_FDCWD, "/root/.duckdb_history", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0600, st_size=6012, ...}, AT_EMPTY_PATH) = 0
D --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL, si_int=-1092415904, si_ptr=0x7dbee30e60} ---
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL, si_int=-1092415904, si_ptr=0x7dbee30e60} ---
D load tpcds;
openat(AT_FDCWD, ":memory:", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
readlinkat(AT_FDCWD, "/etc/localtime", 0x30023b6bf0, 4095) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/zoneinfo/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/root/.duckdb_history", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
newfstatat(3, "", {st_mode=S_IFREG|0600, st_size=6012, ...}, AT_EMPTY_PATH) = 0
faccessat(AT_FDCWD, "/root/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", F_OK) = 0
newfstatat(AT_FDCWD, "/root/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", {st_mode=S_IFREG|0644, st_size=23583320, ...}, 0) = 0
openat(AT_FDCWD, "/root/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", O_RDONLY) = 3
openat(AT_FDCWD, "/root/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=23583320, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=5063, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/lib/aarch64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2190736, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib/aarch64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=84296, ...}, AT_EMPTY_PATH) = 0
readlinkat(AT_FDCWD, "/etc/malloc.conf", 0x7fdd5f7c90, 4096) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
D .exit
openat(AT_FDCWD, "/root/.duckdb_history", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
newfstatat(3, "", {st_mode=S_IFREG|0600, st_size=6024, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/root/.duckdb_history", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fchmodat(AT_FDCWD, "/root/.duckdb_history", 0600) = 0
newfstatat(3, "", {st_mode=S_IFREG|0600, st_size=0, ...}, AT_EMPTY_PATH) = 0
+++ exited with 0 +++
root@localhost:/data/data/com.termux/files/home# exit
logout
~ $ strace -e trace=file duckdb2
execve("/data/data/com.termux/files/usr/bin/duckdb2", ["duckdb2"], 0x7ffa9b3900 /* 22 vars */) = 0
openat(AT_FDCWD, "/proc/self/exe", O_RDONLY) = 3
readlinkat(AT_FDCWD, "/proc/self/exe", "/data/data/com.termux/files/usr/"..., 4095) = 43
openat(AT_FDCWD, "/system/bin/linker64", O_RDONLY) = 4
faccessat(AT_FDCWD, "/dev/urandom", R_OK) = 0
openat(AT_FDCWD, "/dev/null", O_RDWR) = 3
newfstatat(AT_FDCWD, "/dev/__properties__", {st_mode=S_IFDIR|0711, st_size=5460, ...}, 0) = 0
faccessat(AT_FDCWD, "/dev/__properties__/property_info", R_OK) = 0
openat(AT_FDCWD, "/dev/__properties__/property_info", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/__properties__/properties_serial", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/proc/self/cmdline", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:proc_list_hwfix_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:debug_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
newfstatat(AT_FDCWD, "/proc/self/exe", {st_mode=S_IFREG|0700, st_size=8469404, ...}, 0) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/data/data/com.termux/files/usr/"..., 4096) = 43
newfstatat(AT_FDCWD, "/system/etc/ld.config.arm64.txt", 0x7ff8687590, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/dev/__properties__/u:object_r:exported_default_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
newfstatat(AT_FDCWD, "/system/etc/ld.config.29.txt", {st_mode=S_IFREG|0644, st_size=46287, ...}, 0) = 0
openat(AT_FDCWD, "/system/etc/ld.config.29.txt", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
faccessat(AT_FDCWD, "/system/bin", R_OK) = -1 EACCES (Permission denied)
faccessat(AT_FDCWD, "/system/xbin", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/system/product/bin", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/hw_product/bin", R_OK) = 0
newfstatat(AT_FDCWD, "/hw_product", {st_mode=S_IFDIR|0755, st_size=223, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/hw_product/bin", {st_mode=S_IFDIR|0755, st_size=59, ...}, AT_SYMLINK_NOFOLLOW) = 0
faccessat(AT_FDCWD, "/odm/bin", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/vendor/bin", R_OK) = 0
newfstatat(AT_FDCWD, "/vendor", {st_mode=S_IFDIR|0755, st_size=287, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/bin", {st_mode=S_IFDIR|0755, st_size=6255, ...}, AT_SYMLINK_NOFOLLOW) = 0
faccessat(AT_FDCWD, "/data/nativetest/odm", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/nativetest64/odm", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/benchmarktest/odm", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/benchmarktest64/odm", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/nativetest/vendor", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/nativetest64/vendor", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/benchmarktest/vendor", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/benchmarktest64/vendor", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/nativetest/unrestricted", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/nativetest64/unrestricted", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/local/tmp", R_OK) = -1 EACCES (Permission denied)
faccessat(AT_FDCWD, "/postinstall", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data", R_OK) = -1 EACCES (Permission denied)
newfstatat(AT_FDCWD, "/odm", {st_mode=S_IFDIR|0755, st_size=168, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64", {st_mode=S_IFDIR|0755, st_size=1158, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64/vndk-sp", 0x7ff8681f00, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/odm/lib64/vndk-sp", 0x7ff8685080, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/vendor", {st_mode=S_IFDIR|0755, st_size=287, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64", {st_mode=S_IFDIR|0755, st_size=19984, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64/vndk-sp", 0x7ff8681f00, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/vendor/lib64/vndk-sp", 0x7ff8685080, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/system", {st_mode=S_IFDIR|0755, st_size=423, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64", {st_mode=S_IFDIR|0755, st_size=40657, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64/vndk-sp-29", {st_mode=S_IFDIR|0755, st_size=1206, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64/vndk-sp-29", {st_mode=S_IFDIR|0755, st_size=1206, ...}, 0) = 0
newfstatat(AT_FDCWD, "/odm", {st_mode=S_IFDIR|0755, st_size=168, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64", {st_mode=S_IFDIR|0755, st_size=1158, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64", {st_mode=S_IFDIR|0755, st_size=1158, ...}, 0) = 0
newfstatat(AT_FDCWD, "/vendor", {st_mode=S_IFDIR|0755, st_size=287, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64", {st_mode=S_IFDIR|0755, st_size=19984, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64", {st_mode=S_IFDIR|0755, st_size=19984, ...}, 0) = 0
newfstatat(AT_FDCWD, "/vendor", {st_mode=S_IFDIR|0755, st_size=287, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64", {st_mode=S_IFDIR|0755, st_size=19984, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64/hw", {st_mode=S_IFDIR|0755, st_size=4535, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64/hw", {st_mode=S_IFDIR|0755, st_size=4535, ...}, 0) = 0
newfstatat(AT_FDCWD, "/odm", {st_mode=S_IFDIR|0755, st_size=168, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64", {st_mode=S_IFDIR|0755, st_size=1158, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64/vndk-sp", 0x7ff8681f00, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/odm/lib64/vndk-sp", 0x7ff8685080, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/vendor", {st_mode=S_IFDIR|0755, st_size=287, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64", {st_mode=S_IFDIR|0755, st_size=19984, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64/vndk-sp", 0x7ff8681f00, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/vendor/lib64/vndk-sp", 0x7ff8685080, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/system", {st_mode=S_IFDIR|0755, st_size=423, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64", {st_mode=S_IFDIR|0755, st_size=40657, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64/vndk-sp-29", {st_mode=S_IFDIR|0755, st_size=1206, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64/vndk-sp-29", {st_mode=S_IFDIR|0755, st_size=1206, ...}, 0) = 0
newfstatat(AT_FDCWD, "/odm", {st_mode=S_IFDIR|0755, st_size=168, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64", {st_mode=S_IFDIR|0755, st_size=1158, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/odm/lib64", {st_mode=S_IFDIR|0755, st_size=1158, ...}, 0) = 0
newfstatat(AT_FDCWD, "/vendor", {st_mode=S_IFDIR|0755, st_size=287, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64", {st_mode=S_IFDIR|0755, st_size=19984, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/vendor/lib64", {st_mode=S_IFDIR|0755, st_size=19984, ...}, 0) = 0
newfstatat(AT_FDCWD, "/apex", {st_mode=S_IFDIR|0755, st_size=320, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.resolv", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.resolv/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.resolv/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/apex", {st_mode=S_IFDIR|0755, st_size=320, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.runtime", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.runtime/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.runtime/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/apex", {st_mode=S_IFDIR|0755, st_size=320, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.media", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.media/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.media/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/apex", {st_mode=S_IFDIR|0755, st_size=320, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.conscrypt", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.conscrypt/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/apex/com.android.conscrypt/lib64", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/system", {st_mode=S_IFDIR|0755, st_size=423, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64", {st_mode=S_IFDIR|0755, st_size=40657, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/lib64", {st_mode=S_IFDIR|0755, st_size=40657, ...}, 0) = 0
newfstatat(AT_FDCWD, "/hw_product", {st_mode=S_IFDIR|0755, st_size=223, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/hw_product/lib64", {st_mode=S_IFDIR|0755, st_size=537, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/hw_product/lib64", {st_mode=S_IFDIR|0755, st_size=537, ...}, 0) = 0
newfstatat(AT_FDCWD, "/system", {st_mode=S_IFDIR|0755, st_size=423, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/product", {st_mode=S_IFDIR|0755, st_size=116, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/product/lib64", {st_mode=S_IFDIR|0755, st_size=57, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/system/product/lib64", {st_mode=S_IFDIR|0755, st_size=57, ...}, 0) = 0
newfstatat(AT_FDCWD, "/prets", {st_mode=S_IFDIR|0755, st_size=27, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/prets/lib64", 0x7ff8681f00, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/prets/lib64", 0x7ff8685080, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libtermux-exec.so", O_RDONLY|O_CLOEXEC) = 3
readlinkat(AT_FDCWD, "/proc/self/fd/3", "/data/data/com.termux/files/usr/"..., 4096) = 53
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libdl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/system/lib64/libdl.so", O_RDONLY|O_CLOEXEC) = 4
readlinkat(AT_FDCWD, "/proc/self/fd/4", "/apex/com.android.runtime/lib64/"..., 4096) = 47
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libc.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/system/lib64/libc.so", O_RDONLY|O_CLOEXEC) = 5
readlinkat(AT_FDCWD, "/proc/self/fd/5", "/apex/com.android.runtime/lib64/"..., 4096) = 46
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libssl.so.3", O_RDONLY|O_CLOEXEC) = 6
readlinkat(AT_FDCWD, "/proc/self/fd/6", "/data/data/com.termux/files/usr/"..., 4096) = 47
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libcrypto.so.3", O_RDONLY|O_CLOEXEC) = 7
readlinkat(AT_FDCWD, "/proc/self/fd/7", "/data/data/com.termux/files/usr/"..., 4096) = 50
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libc++_shared.so", O_RDONLY|O_CLOEXEC) = 8
readlinkat(AT_FDCWD, "/proc/self/fd/8", "/data/data/com.termux/files/usr/"..., 4096) = 52
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libm.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/system/lib64/libm.so", O_RDONLY|O_CLOEXEC) = 9
readlinkat(AT_FDCWD, "/proc/self/fd/9", "/apex/com.android.runtime/lib64/"..., 4096) = 46
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
faccessat(AT_FDCWD, "/dev/urandom", R_OK) = 0
openat(AT_FDCWD, "/proc/sys/vm/overcommit_memory", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
newfstatat(AT_FDCWD, "/dev/__properties__", {st_mode=S_IFDIR|0711, st_size=5460, ...}, 0) = 0
faccessat(AT_FDCWD, "/dev/__properties__/property_info", R_OK) = 0
openat(AT_FDCWD, "/dev/__properties__/property_info", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/__properties__/properties_serial", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/proc/self/cmdline", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:proc_list_hwfix_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:debug_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:exported2_default_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:dft_logsystemtype_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:heapprofd_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/system/lib64/libnetd_client.so", O_RDONLY|O_CLOEXEC) = 3
readlinkat(AT_FDCWD, "/proc/self/fd/3", "/system/lib64/libnetd_client.so", 4096) = 31
openat(AT_FDCWD, "/system/lib64/libc++.so", O_RDONLY|O_CLOEXEC) = 4
readlinkat(AT_FDCWD, "/proc/self/fd/4", "/system/lib64/libc++.so", 4096) = 23
openat(AT_FDCWD, "/data/data/com.termux/files/usr/etc/tls/openssl.cnf", O_RDONLY) = 3
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libz.so", O_RDONLY|O_CLOEXEC) = 3
readlinkat(AT_FDCWD, "/proc/self/fd/3", "/data/data/com.termux/files/usr/"..., 4096) = 50
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data", {st_mode=S_IFDIR|0771, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files", {st_mode=S_IFDIR|0771, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr", {st_mode=S_IFDIR|0700, st_size=3488, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/usr/lib", {st_mode=S_IFDIR|0700, st_size=24576, ...}, 0) = 0
faccessat(AT_FDCWD, ":memory:", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/data/data/com.termux/files/usr/bin/login", X_OK) = 0
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdbrc", O_RDONLY) = -1 ENOENT (No such file or directory)
v0.7.1 b00b93f
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb_history", O_RDONLY) = 3
D load tpcds;
openat(AT_FDCWD, ":memory:", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/__properties__/u:object_r:exported_system_prop:s0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 3
openat(AT_FDCWD, "/data/misc/zoneinfo/current/tzdata", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/apex/com.android.tzdata/etc/tz/tzdata", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/data/misc/zoneinfo/current/tzdata", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/apex/com.android.tzdata/etc/tz/tzdata", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/apex/com.android.runtime/etc/tz/tzdata", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/system/usr/share/zoneinfo/tzdata", O_RDONLY|O_CLOEXEC) = 3
readlinkat(AT_FDCWD, "/etc/localtime", 0x70469ce172, 4095) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/zoneinfo/", O_RDONLY|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb_history", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
faccessat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", F_OK) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", {st_mode=S_IFREG|0600, st_size=23583320, ...}, 0) = 0
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", O_RDONLY) = 3
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", O_RDONLY|O_CLOEXEC) = 3
readlinkat(AT_FDCWD, "/proc/self/fd/3", "/data/data/com.termux/files/home"..., 4096) = 93
openat(AT_FDCWD, "/system/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/hw_product/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/system/product/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
Error: IO Error: Extension "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension" could not be loaded: dlopen failed: library "libdl.so.2" not found
D .exit
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb_history", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb_history", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fchmodat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb_history", 0600) = 0
+++ exited with 1 +++
~ $
In this case the clue is near the end of the output from strace:
faccessat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", F_OK) = 0
newfstatat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", {st_mode=S_IFREG|0600, st_size=23583320, ...}, 0) = 0
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", O_RDONLY) = 3
openat(AT_FDCWD, "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension", O_RDONLY|O_CLOEXEC) = 3
readlinkat(AT_FDCWD, "/proc/self/fd/3", "/data/data/com.termux/files/home"..., 4096) = 93
openat(AT_FDCWD, "/system/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/hw_product/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/system/product/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
Error: IO Error: Extension "/data/data/com.termux/files/home/.duckdb/extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension" could not be loaded: dlopen failed: library "libdl.so.2" not found
D .exit
Look at the Error
line. An extension built for extensions/v0.7.1/linux_arm64/tpcds.duckdb_extension
was requested, and that extension requested shared library libdl.so.2
The .2
is part of the name for a shared library built for linux_arm64. On Android the corresponding name would be like Android/Sdk/ndk-bundle/platforms/android-24/arch-arm64/usr/lib/libdl.so
with no .2
suffix. So, look at all the exensions that are requested by duckdb2, and make sure that they are Android extensions, and not linux_arm64 extensions. On linux the command ldd ./duckdb2
lists the transitive closure of shared libraries that are requested by ./duckdb2
.
in proot-distro ubuntu, duckdb and duckdb2 are original, duckdb3 is upx compressed
root@localhost:~# ldd /data/data/com.termux/files/home/duckdb
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007acd8c0000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007acd8a0000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007acd800000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007acd650000)
/lib/ld-linux-aarch64.so.1 (0x0000003000000000)
root@localhost:~# /data/data/com.termux/files/home/duckdb
v0.7.2-dev3117 dd0e0da3f0
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D select 1 a;
┌───────┐
│ a │
│ int32 │
├───────┤
│ 1 │
└───────┘
D .exit
root@localhost:~# /data/data/com.termux/files/home/duckdb2
v0.7.1 b00b93f0b1
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D .exit
root@localhost:~# /data/data/com.termux/files/home/duckdb3
root@localhost:~# ldd /data/data/com.termux/files/home/duckdb3
not a dynamic executable
root@localhost:~# upx -l /data/data/com.termux/files/home/duckdb3
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
36285616 -> 11710520 32.27% linux/arm64 /data/data/com.termux/files/home/duckdb3
root@localhost:~#
in termux, both of pkg ins duckdb works, the upx compressed cannot run ldd command
~ $ which duckdb
/data/data/com.termux/files/usr/bin/duckdb
~ $ ldd /data/data/com.termux/files/usr/bin/duckdb
The program ldd is not installed. Install it by executing:
pkg install ldd
~ $ pkg ins ldd
Testing the available mirrors:
[*] (1) https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main: ok
Picking mirror: (0) /data/data/com.termux/files/usr/etc/termux/mirrors/china/mirrors.tuna.tsinghua.edu.cn
Get:1 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable InRelease [14.0 kB]
Get:2 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main aarch64 Packages [502 kB]
Fetched 516 kB in 1s (474 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
68 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpcreposix openssl-1.1
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
ldd
0 upgraded, 1 newly installed, 0 to remove and 68 not upgraded.
Need to get 1808 B of archives.
After this operation, 45.1 kB of additional disk space will be used.
Get:1 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main aarch64 ldd aarch64 0.2 [1808 B]
Fetched 1808 B in 0s (7097 B/s)
Selecting previously unselected package ldd.
(Reading database ... 25136 files and directories currently installed.)
Preparing to unpack .../archives/ldd_0.2_aarch64.deb ...
Unpacking ldd (0.2) ...
Setting up ldd (0.2) ...
~ $ ldd /data/data/com.termux/files/usr/bin/duckdb
libdl.so => /system/lib64/libdl.so
libc.so => /system/lib64/libc.so
libssl.so.3 => /data/data/com.termux/files/usr/lib/libssl.so.3
libcrypto.so.3 => /data/data/com.termux/files/usr/lib/libcrypto.so.3
libc++_shared.so => /data/data/com.termux/files/usr/lib/libc++_shared.so
libm.so => /system/lib64/libm.so
ld-android.so => /system/lib64/ld-android.so
~ $ /data/data/com.termux/files/usr/bin/duckdb
v0.7.1 b00b93f
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D select 1 a;
┌───────┐
│ a │
│ int32 │
├───────┤
│ 1 │
└───────┘
D .exit
~ $ ldd /data/data/com.termux/files/usr/bin/duckdb2
~ $ /data/data/com.termux/files/usr/bin/duckdb2
v0.7.1 b00b93f
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D select 1 a2;
┌───────┐
│ a2 │
│ int32 │
├───────┤
│ 1 │
└───────┘
D .exit
~ $ upx -l /data/data/com.termux/files/usr/bin/duckdb
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
upx: /data/data/com.termux/files/usr/bin/duckdb: NotPackedException: not packed by UPX
~ $ upx -l /data/data/com.termux/files/usr/bin/duckdb2
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
29451168 -> 8469404 28.76% linux/arm64 /data/data/com.termux/files/usr/bin/duckdb2
i tried to use a real aarch64 linux, upx compressed duckdb works, though ldd reports not a dynamic executable
https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-arm64_linux.tar.xz
kylin@kylin:~/duckdb$ uname -a
Linux kylin4.4.131-20210120.kylin.desktop-generic #kylin-KylinOS SMP Wed Jan 20 02:58:45 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
kylin@kylin:~/duckdb$ cp duckdb duckdb2
kylin@kylin:~/duckdb$ ./upx duckdb2
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
42365144 -> 11667072 27.54% linux/arm64 duckdb2
Packed 1 file.
kylin@kylin:~/duckdb$ ldd ./duckdb
linux-vdso.so.1 => (0x0000007f7da6d000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f7b652000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f7b626000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f7b579000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f7b432000)
/lib/ld-linux-aarch64.so.1 (0x0000007f7da42000)
kylin@kylin:~/duckdb$ ldd ./duckdb2
不是动态可执行文件
kylin@kylin:~/duckdb$ ./duckdb2
v0.7.1 b00b93f0b1
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D select 1 a;
┌───────┐
│ a │
│ int32 │
├───────┤
│ 1 │
└───────┘
D .exit
kylin@kylin:~/duckdb$ ./duckdb
v0.7.1 b00b93f0b1
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D select 1 a;
┌───────┐
│ a │
│ int32 │
├───────┤
│ 1 │
└───────┘
D
summary,termux means termux on android
file source | os | upx compress | ldd | work |
---|---|---|---|---|
pkg ins | termux | no | yes | yes |
pkg ins | termux | yes | yes | yes |
pkg ins | termux+proot distro ubuntu | no | yes | yes |
pkg ins | termux+proot distro ubuntu | yes | exit sliently | exit sliently |
download duckdb_cli-linux-aarch64.zip | termux | no | yes, .so file not found | cannot execute,requred file not found |
download duckdb_cli-linux-aarch64.zip | termux | yes | exit sliently | exit sliently |
download duckdb_cli-linux-aarch64.zip | termux+proot distro ubuntu | no | yes | yes |
download duckdb_cli-linux-aarch64.zip | termux+proot distro ubuntu | yes | yes, report not a dynamic executable | exit sliently |
download duckdb_cli-linux-aarch64.zip | linux | no | yes | yes |
download duckdb_cli-linux-aarch64.zip | linux | yes | yes, report not a dynamic executable | yes |
a detail differnet between termux and linux termux upx compressed is bigger
~ $ upx -l ./duckdb
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
42365144 -> 13154148 31.05% linux/arm64 ./duckdb
linux
kylin@kylin:~/duckdb$ ./upx duckdb2
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2023
UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name
-------------------- ------ ----------- -----------
42365144 -> 11667072 27.54% linux/arm64 duckdb2
if i use upx in https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-arm64_linux.tar.xz instead of pkg ins upx, the size of upx compressed duckdb equals to that in linux, but still exit sliently.
This issue is stale because it has been open 60 days with no activity. Please remove the stale label or add a comment or this issue will be closed in 30 days.
There are suspicions that the problem of duckdb.upx not running under proot-distro login ubuntu
may be the fault of proot
, and the prime suspect is the inspection of the symbol table by proot versus the compression of symbol info Sections (ELFXX_Shdr) by upx.
From comment on May 4 (https://github.com/upx/upx/issues/671#issuecomment-1534335892):
the duckdb of "pkg ins duckdb" works after upx.
but cannot work in "proot-distro ubuntu".
So duckdb.upx works under termux, but duckdb.upx fails in proot-distro ubuntu
under termux. Thus the problem is caused by proot-distro
, which delegates to proot
.
Why? From the README.md of proot
: proot hooks every process using ptrace()
. This is slow if done by single-stepping with aptrace
trap for every instruction. The reason for doing this is to substitute the values of file-name arguments and results for system call instructions, in order to "virtualize" the filesystem layout of "-distro name" when running under Android. Any attempt to speed up by ptracing system call symbols only (and not the vast majority of instructions which are not system calls), cannot work after compression by upx. The clue of May 9 (https://github.com/upx/upx/issues/671#issuecomment-1540275280) is instructive. The filename string "libdl.so.2" was sought by the compressed-by-upx app duckdb.upx for Linux, and should have been changed to the Android-specific "libdl.so" (with no suffix ".2") by proot
, but was not. proot
goofed.
Specifically, the duckdb binary (after compression by upx) which succeeds under termux on Android, is the version of duckdb built for Android, for which readelf --dynamic duckdb | grep NEED
shows libdl.so
. The duckdb binary (after compression by upx) which fails to run under proot-distro ubuntu
under termux on Android, is the version of duckdb built for Linux, for which readelf --dynamic duckdb | grep NEED
shows libdl.so.2
. If it's going to work, then some software must effectively remove the .2
.
This issue tracker is ONLY used for reporting bugs. Please use stackoverflow for supporting issues.
What's the problem (or question)?
duckdb exit silently
What should have happened?
duckdb run as normal
Do you have an idea for a solution?
How can we reproduce the issue?
1.run termux on Android phone 2.pkg ins upx 3.download arrch64 linux binaray from https://github.com/duckdb/duckdb/releases/tag/v0.7.1
Please tell us details about your environment.
upx --version
):root@localhost:/data/data/com.termux/files/home# upx --version upx 4.0.2 UCL data compression library 1.03 zlib data compression library 1.2.13.1-motley LZMA SDK version 4.43 doctest C++ testing framework version 2.4.9 Copyright (C) 1996-2023 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2023 Laszlo Molnar Copyright (C) 2000-2023 John F. Reiser Copyright (C) 2002-2023 Jens Medoch Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler Copyright (C) 1999-2006 Igor Pavlov Copyright (C) 2016-2021 Viktor Kirilov UPX comes with ABSOLUTELY NO WARRANTY; for details type 'upx -L'.
Host Operating System and version: Android 10 termux 0.118
Host CPU architecture: root@localhost:/data/data/com.termux/files/home# lscpu Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Vendor ID: ARM Model name: Cortex-A55 Model: 0 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 Stepping: r1p0 CPU max MHz: 1863.0000 CPU min MHz: 554.0000 BogoMIPS: 3.84 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp Model: 0 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 2 Stepping: 0x3 CPU max MHz: 2861.0000 CPU min MHz: 826.0000 BogoMIPS: 3.84 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
Target Operating System and version:
Target CPU architecture: