Skip to content

[NOTICE]: Termux Processes Killed On Android 15 For OnePlus Devices #4219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Mubanjun opened this issue Oct 20, 2024 · 87 comments
Closed

[NOTICE]: Termux Processes Killed On Android 15 For OnePlus Devices #4219

Mubanjun opened this issue Oct 20, 2024 · 87 comments

Comments

@Mubanjun
Copy link

Mubanjun commented Oct 20, 2024

Update: ColorOS update with build date of 9th Nov 2024 and OxygenOS with build date of 23rd Nov 2024 has fixed the issue. Build date can be checked with getprop ro.build.date. Disabling phantom process killer will not work and that is a separate issue.


Problem description

When opening Termux,it will throw "signal 9"directly.
Screenshot_2024-10-20-10-57-35-62_84d3000e3f4017145260f7618db1d683

Steps to reproduce the behavior.

Open Termux

What is the expected behavior?

No response

System information

  • Termux application version: latest
  • Android OS version:15
  • Device model: OnePlus 12 with ColorOS 15
@agnostic-apollo
Copy link
Member

agnostic-apollo commented Oct 20, 2024

@leafmoes
Copy link

I have this problem too
termux-report_issue_from_transcript.log

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Oct 28, 2024

TERMUX_APP_PACKAGE_VARIANT: APT_ANDROID_5

Read the installation docs again.

@leafmoes
Copy link

TERMUX_APP_PACKAGE_VARIANTAPT_ANDROID_5

再次阅读安装文档。

But it still says Killed.

termux-report_issue_from_transcript.log

@agnostic-apollo
Copy link
Member

Disable phantom process killer as mentioned above.

@agnostic-apollo
Copy link
Member

@leafmoes
Copy link

I executed this command, but it had no effect:

adb shell "settings put global settings_enable_monitor_phantom_procs false"

@leafmoes
Copy link

The result of this command returns false

adb shell "settings get global settings_enable_monitor_phantom_procs"

@agnostic-apollo
Copy link
Member

libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6273 (init), pid 6273 (init)
libc    : crash_dump helper failed to exec, or was killed
linker  : error: unable to open file "/data/data/com.termux/files/usr/bin/bash
"

There is unexpected newline at end of bash path, might be related.

But your logs didn't contain execution history. Exit termux, then run adb shell "logcat -c", then restart termux again and wait for killing and then generate log again.

@leafmoes
Copy link

logcat.txt

@agnostic-apollo
Copy link
Member

W login   : type=1400 audit(0.0:6583): avc:  granted  { execute } for  path="/data/data/com.termux/files/usr/bin/dash" dev="dm-74" ino=602426 scontext=u:r:untrusted_app_27:s0:c57,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c57,c258,c512,c768 tclass=file app=com.termux
E OPLUS_KEVENT_RECORD: oplus_kevent Receive message from kernel, event_type=3
E OPLUS_KEVENT_RECORD: OPLUS_KEVENT payload:10569,path@@/data/data/com.termux/files/usr/bin/dash
I OPLUS_KEVENT_RECORD: oplus_put_exec_kevent_to_list
W login   : type=1400 audit(0.0:6584): avc:  granted  { execute } for  name="bash" dev="dm-74" ino=602768 scontext=u:r:untrusted_app_27:s0:c57,c258,c512,c768 tcontext=u:object_r:app_data_file:s0:c57,c258,c512,c768 tclass=file app=com.termux
E OPLUS_KEVENT_RECORD: oplus_kevent Receive message from kernel, event_type=3
E OPLUS_KEVENT_RECORD: OPLUS_KEVENT payload:10569,path@@/data/data/com.termux/files/usr/bin/dash
I OPLUS_KEVENT_RECORD: oplus_put_exec_kevent_to_list
E OPLUS_KEVENT_RECORD: oplus_kevent Receive message from kernel, event_type=3
E OPLUS_KEVENT_RECORD: OPLUS_KEVENT payload:10569,path@@/data/data/com.termux/files/usr/bin/dash
I OPLUS_KEVENT_RECORD: oplus_put_exec_kevent_to_list

The logs didn't reveal anything new. The linker error doesn't exist now. It could be OnePlus specific killer via OPLUS_KEVENT_RECORD that's killing the process, its known to kill processes running with proot, but there should be some additional entries for the killing, maybe they are not being logged due to rate limit. If its a OnePlus issue like it is for proot, there is nothing we can do, report to OnePlus.

Run adb shell "logcat -c" again and then get bash killed 5-6 times and then generate a dump again. Also try going into failsafe session and running /system/bin/ls and $PREFIX/bin/ls and see if they work.

@Mubanjun
Copy link
Author

Mubanjun commented Oct 31, 2024 via email

@agnostic-apollo
Copy link
Member

Another report. Report to OnePlus.

Bootstrap Error
/data/data/com.termux/files/usr/etc/termux/bootstrap/termux-bootstrap-second-stage.sh: line 91: 26680 Killed ln -s "termux-bootstrap-second-stage.sh" "/data/data/com.termux/files/usr/etc/termux/bootstrap/termux-bootstrap-second-stage.sh.lock" 2> /dev/null
RELEASE: 15
BRAND: OnePlus
MODEL: CPH2619

@agnostic-apollo agnostic-apollo changed the title [Bug]: Android 15 will directly print "killed" and return signal 9 [Bug]: Termux Processes Killed On Android 15 For OnePlus Devices Nov 6, 2024
@agnostic-apollo agnostic-apollo changed the title [Bug]: Termux Processes Killed On Android 15 For OnePlus Devices [NOTICE]: Termux Processes Killed On Android 15 For OnePlus Devices Nov 6, 2024
@agnostic-apollo agnostic-apollo pinned this issue Nov 6, 2024
@256-1
Copy link

256-1 commented Nov 8, 2024

I had the same issue on my OnePlus 13 with ColorOS 15 when using the github version Termux. After trying GooglePlayStore version it now works, no killed info.
But when I tried to use proot-distro to intall ubuntu, it failed. Here enclosed with the capture and log when using the GooglePlayStore version.
Screenshot_2024-11-08-10-50-46-61_84d3000e3f4017145260f7618db1d683
Screenshot_2024-11-08-10-48-28-64_6431dcd7adc47d9b8b1ef172f656a796
Screenshot_2024-11-08-10-18-43-91_84d3000e3f4017145260f7618db1d683.jpg

@agnostic-apollo
Copy link
Member

proot-distro is not going to work, it unsets $LD_PRELOAD that has libtermux-exec.so, which internally is what uses the system_linker_exec hack to normally run executables so that they appear to be run from the system partition instead of the app data directory, the later is what's detected to be malicious, and proot-distro would be running processes the same way.

https://github.com/termux/proot-distro/blob/2abfb39d2e3e17e00a9a57187a036cd10a1e3742/proot-distro.sh#L96

@chongxs
Copy link

chongxs commented Nov 9, 2024

在使用 github 版本 Termux 时,我在装有 ColorOS 13 的 OnePlus 15 上遇到了同样的问题。尝试 GooglePlayStore 版本后,它现在可以工作了,没有杀死的信息。但是当我尝试使用 proot-distro 来安装 ubuntu 时,它失败了。此处包含使用 GooglePlayStore 版本时的捕获和日志。 Screenshot_2024-11-08-10-50-46-61_84d3000e3f4017145260f7618db1d683 Screenshot_2024-11-08-10-48-28-64_6431dcd7adc47d9b8b1ef172f656a796 Screenshot_2024-11-08-10-18-43-91_84d3000e3f4017145260f7618db1d683.jpg

google play 安装的版本比 F-droid 的版本低,但至少能打开。F-droid 安装版本受限于网络,需要bootstrap……同一加13用户,还没找到比较好用方式

@dipankr
Copy link

dipankr commented Nov 9, 2024

在使用 github 版本 Termux 时,我在装有 ColorOS 13 的 OnePlus 15 上遇到了同样的问题。尝试 GooglePlayStore 版本后,它现在可以工作了,没有杀死的信息。但是当我尝试使用 proot-distro 来安装 ubuntu 时,它失败了。此处包含使用 GooglePlayStore 版本时的捕获和日志。 Screenshot_2024-11-08-10-50-46-61_84d3000e3f4017145260f7618db1d683 Screenshot_2024-11-08-10-48-28-64_6431dcd7adc47d9b8b1ef172f656a796 Screenshot_2024-11-08-10-18-43-91_84d3000e3f4017145260f7618db1d683.jpg

google play 安装的版本比 F-droid 的版本低,但至少能打开。F-droid 安装版本受限于网络,需要bootstrap……同一加13用户,还没找到比较好用方式

Avoid using the play store version as it is clearly mentioned on the termux github repo that there are some known issues with that version and it is suggested to use the version from github or fdroid

@ascopes
Copy link

ascopes commented Nov 11, 2024

Is there a way to get this working without ADB? Or is this a complete issue with running subprocesses on any Android device now with OxygenOS?

Disabling process restrictions in developer settings makes zero difference for me.

Screenshot_2024-11-11-07-38-58-33_84d3000e3f4017145260f7618db1d683
Screenshot_2024-11-11-07-38-46-01_fc704e6b13c4fb26bf5e411f75da84f2

@ascopes
Copy link

ascopes commented Nov 11, 2024

Crash log:
termux-crash_report.log

@rjose-evertz
Copy link

The latest update to termux from Google Play Store (not f droid) seems. To resolve the issues

@SplicedNZ
Copy link

proot-distro is not going to work, it unsets $LD_PRELOAD that has libtermux-exec.so, which internally is what uses the system_linker_exec hack to normally run executables so that they appear to be run from the system partition instead of the app data directory, the later is what's detected to be malicious, and proot-distro would be running processes the same way.

https://github.com/termux/proot-distro/blob/2abfb39d2e3e17e00a9a57187a036cd10a1e3742/proot-distro.sh#L96

Do you think it's possible to prevent proot-distro from overriding $LD_PRELOAD? or is that required for proot to work?

I wonder if rooted, moving termux to the system partition might be a quick fix?

@hamjin
Copy link

hamjin commented Nov 13, 2024

Unlock the Bootloader and everything goes well on OnePlus 13

@SplicedNZ
Copy link

SplicedNZ commented Nov 13, 2024

Unlock the Bootloader and everything goes well on OnePlus 13

Which version did you install, playstore? Do you mind testing if proot works?

@256-1
Copy link

256-1 commented Nov 13, 2024

Good news ! I just received the latest OS update, termux(github version) works again, seems OnePlus fixed this issue.Screenshot_2024-11-13-22-46-35-03_84d3000e3f4017145260f7618db1d683.jpg

Screenshot_2024-11-13-22-45-00-18_9492aa3750dca76abb7c25b39a5f1e8e.jpg

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Nov 13, 2024

That's great news, what's the security update/patch date? You should likely be able to see it by clicking the right arrow in your last image or in Termux settings about.

agnostic-apollo added a commit to termux/termux-packages that referenced this issue Dec 20, 2024
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Dec 20, 2024
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Dec 20, 2024
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Dec 21, 2024
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Dec 21, 2024
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Dec 21, 2024
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Dec 27, 2024
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
@henkiewie
Copy link

Although closed if someone reads this. I am on the latest release candidate on the oneplus pad.
And i use the app squeezelite in termux. Can someone aknowledge there is a problem with sound?
Squeezelite -l only gives me a dummy soundcard.

Screenshot_2024-12-29-07-51-34-89_9492aa3750dca76abb7c25b39a5f1e8e

~ $ squeezelite -l Output devices: auto_null Dummy Output

agnostic-apollo added a commit to termux/termux-packages that referenced this issue Jan 5, 2025
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Mar 5, 2025
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Mar 22, 2025
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
agnostic-apollo added a commit to termux/termux-packages that referenced this issue Mar 22, 2025
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed

Related termux/termux-app#4219
@ghost
Copy link

ghost commented Apr 10, 2025

من جاي ينزل فيديو ما اقدر استخدمه في اي برنامج تصميم او اعدل علي بنفس هاتف ما يسمح بذلاك لماذا

@ghost
Copy link

ghost commented Apr 10, 2025

Why can't I use the video with design programs after downloading it so that I can edit it without programs from the same phone? They don't allow it. They say it doesn't allow that. Why?

@ascopes
Copy link

ascopes commented Apr 10, 2025

Does this have anything to do with termux? @mnbjhk

if not you probably need to contact the distributor

@ghost
Copy link

ghost commented Apr 10, 2025

لازم اكو حل مشكلة ما بعدا تنزيل الفيديو لان من ينزل فيديو بالهاتف ما يمكنك استخدامه باي تعديل حتى من تريد تعدل عليه من داخل هاتفك بدون برامج ما تفدر

@ascopes
Copy link

ascopes commented Apr 10, 2025

@mnbjhk [translated] There must be a solution to the problem of not downloading the video, because if you download a video on your phone, you cannot use it in any way, even if you want to edit it from within your phone without programs, you cannot.

it is not clear what you are referencing, or how this relates to Termux, the terminal emulator.

@ghost
Copy link

ghost commented Apr 10, 2025

اخي تحميل الفيديوهات روعه سلس بس المشكله من ينزل فيديو بالهاتف تريد تعدل على فيديو مثلا تسخدم ادوات هاتف مالك تعديل فيديو ضيف فلاتر مثلا او حركات الفيديو يقول هذا فيديو غير مسموح الي بالتعديل اما نفس فيديو تنزله من غير برنامج تنزيل يسمح الك بالتعديل

@ascopes
Copy link

ascopes commented Apr 10, 2025

Brother, downloading videos is great and easy, but the problem is when you download a video on your phone and want to edit a video, for example, you use your phone’s tools to edit the video, add filters, for example, or video movements, and it says this is a video that I am not allowed to edit. But if you download the same video without a download program that allows you to edit it

...either off topic or possibly trolling? Either way this thread isn't the right place for this... I'd consider asking your device vendor or app vendor.

@Jobians
Copy link

Jobians commented May 14, 2025

Enable developer option and this two options

Image

@agnostic-apollo
Copy link
Member

agnostic-apollo commented May 14, 2025

Those are related to phantom process, not current issue.

@Jobians
Copy link

Jobians commented May 14, 2025

@agnostic-apollo Did you manage to solve it?

@agnostic-apollo
Copy link
Member

The current issue of oneplus and related devices can only be solved with system update, which should have been released long ago.

Phantom process killer will cause similar killing on all android 12+ devices, and needs to be disabled too, but not related to OnePlus issue.

@Jobians
Copy link

Jobians commented May 14, 2025

How to fix

Image

@agnostic-apollo
Copy link
Member

If you have a recent system update, then no solution for commands getting killed in proot, like apt, etc. I don't think the system update fixed all commands in proot. Oneplus users would know better. You will likely need a custom kernel and ROM to fix the issue if it wasn't fixed.

@Arkuarius
Copy link

I'm plenty certain it's all fixed in the latest updates.

@Jobians
Copy link

Jobians commented May 14, 2025

Image

@weaponmasterjax
Copy link

weaponmasterjax commented May 14, 2025 via email

@GerbillLife
Copy link

Unpin the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests