termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.73k stars 2.93k forks source link

[Bug]: blink malloc issue in proot-distro #19180

Open mcagabe19 opened 5 months ago

mcagabe19 commented 5 months ago

Problem description

Screenshot_20240209_182018_Termux

What steps will reproduce the bug?

PROOT_DISTRO_X64_EMULATOR=BLINK pd install debian-x86_64 (used my x86_64 patch)

What is the expected behavior?

to work

System information

termux-info:

Termux Variables:
TERMUX_API_APP__VERSION_NAME=0.50.1+4a711e9
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP__APK_PATH=/data/app/~~KhZ9LhzlaAAzKJu7ufC60g==/com.termux-6UFDz9WMpwyyrxn_aYvMfw==/base.apk
TERMUX_APP__APK_RELEASE=UNKNOWN
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=true
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=5910
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c130,c257,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c130,c257,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=10386
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=118
TERMUX_APP__VERSION_NAME=0.118.0+55cdef0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0+55cdef0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/21 termux extras
deb https://its-pointless.github.io/files/24 termux extras
# root-repo (sources.list.d/root.list)
deb https://packages.termux.dev/apt/termux-root root stable
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.dev/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.40.6
Android version:
13
Kernel build information:
Linux localhost 4.14.113-25950142 #1 SMP PREEMPT Thu Mar 30 07:43:28 +07 2023 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-A515F
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.x11 versionCode:14
com.termux.api versionCode:51
mcagabe19 commented 5 months ago

forget to send this Screenshot_20240209_205434_Termux

jart commented 2 months ago

Is your program using MAP_FIXED? You can use blink -s to system call trace and find out. Chances are it's requesting fixed memory that overlaps with memory Android OS or Bionic Libc inserted into the address space. You need to pass the -m flag to disable the linear memory optimization when running such programs.