Skip to content
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

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

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

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

Mubanjun opened this issue Oct 20, 2024 · 71 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.

@ascopes
Copy link

ascopes commented Nov 24, 2024

Can confirm the Google Play version worked for me.

@laughingwater
Copy link

laughingwater commented Nov 26, 2024

Screenshot_2024-11-26-22-31-55-91_9492aa3750dca76abb7c25b39a5f1e8e.jpg

Guys, I just got the .305 update, termux and winlator work as before again!!

@Arkuarius
Copy link

Awesome

@carbolymer
Copy link

@laughingwater which version is this? from play store or standalone?

@laughingwater
Copy link

laughingwater commented Nov 27, 2024

@laughingwater which version is this? from play store or standalone?

Fdroid version, they definitely fixed the issue since winlator is working too

@agnostic-apollo
Copy link
Member

What's output for getprop ro.build.date?

@agnostic-apollo
Copy link
Member

Closing as resolved.

@Arkuarius
Copy link

@laughingwater which version is this? from play store or standalone?

Fdroid version, they definitely fixed the issue since winlator is working too

"since Winlator is working too" just GlibC Winlator, or regular/Proot Winlator as well?

@haldi4803
Copy link

haldi4803 commented Nov 27, 2024

Guys, I just got the .305 update, termux and winlator work as before again!!

Not yet available for OnePlus Pad 2 :(

@inko16

This comment was marked as off-topic.

@laughingwater
Copy link

laughingwater commented Nov 27, 2024

What's output for getprop ro.build.date?

Screenshot_2024-11-27-19-19-32-21_84d3000e3f4017145260f7618db1d683.jpg

The update is now also available in Oxygen updater (available on the playstore)

@laughingwater
Copy link

@laughingwater which version is this? from play store or standalone?

Fdroid version, they definitely fixed the issue since winlator is working too

"since Winlator is working too" just GlibC Winlator, or regular/Proot Winlator as well?

https://github.com/brunodev85/Winlator/releases , honestly I am not knowledgeable about all the winlator versions, but this is the one I used.

@inko16

This comment was marked as off-topic.

@laughingwater

This comment was marked as off-topic.

@Arkuarius
Copy link

@laughingwater which version is this? from play store or standalone?

Fdroid version, they definitely fixed the issue since winlator is working too

"since Winlator is working too" just GlibC Winlator, or regular/Proot Winlator as well?

https://github.com/brunodev85/Winlator/releases , honestly I am not knowledgeable about all the winlator versions, but this is the one I used.

That's Proot. Did you try any games inside Winlator?

@agnostic-apollo
Copy link
Member

@laughingwater Thanks

@laughingwater
Copy link

laughingwater commented Nov 27, 2024

@laughingwater which version is this? from play store or standalone?

Fdroid version, they definitely fixed the issue since winlator is working too

"since Winlator is working too" just GlibC Winlator, or regular/Proot Winlator as well?

https://github.com/brunodev85/Winlator/releases , honestly I am not knowledgeable about all the winlator versions, but this is the one I used.

That's Proot. Did you try any games inside Winlator?

Not yet, I'll get steam real quick and test out some games I do have

(Ok future me here, my "real quick" turned into half an hour of 0 progress since steam doesn't want to co-operate, I'll test out a game later by putting it on a harddisk and connecting it externally so I wouldn't have to bother with steam, sorry guys.)

@SplicedNZ
Copy link

@laughingwater which version is this? from play store or standalone?

Fdroid version, they definitely fixed the issue since winlator is working too

"since Winlator is working too" just GlibC Winlator, or regular/Proot Winlator as well?

https://github.com/brunodev85/Winlator/releases , honestly I am not knowledgeable about all the winlator versions, but this is the one I used.

That's Proot. Did you try any games inside Winlator?

Not yet, I'll get steam real quick and test out some games I do have

(Ok future me here, my "real quick" turned into half an hour of 0 progress since steam doesn't want to co-operate, I'll test out a game later by putting it on a harddisk and connecting it externally so I wouldn't have to bother with steam, sorry guys.)

Yeah steam not working within winlator is a known issue not specific to Oppo/ OnePlus. Usually the original winlator version will let you launch the container but will exit out when a game is launched, if that's fixed then that would be great news

@Arkuarius
Copy link

@laughingwater which version is this? from play store or standalone?

Fdroid version, they definitely fixed the issue since winlator is working too

"since Winlator is working too" just GlibC Winlator, or regular/Proot Winlator as well?

https://github.com/brunodev85/Winlator/releases , honestly I am not knowledgeable about all the winlator versions, but this is the one I used.

That's Proot. Did you try any games inside Winlator?

Not yet, I'll get steam real quick and test out some games I do have

(Ok future me here, my "real quick" turned into half an hour of 0 progress since steam doesn't want to co-operate, I'll test out a game later by putting it on a harddisk and connecting it externally so I wouldn't have to bother with steam, sorry guys.)

Oh lmao I forgot to tell you that Steam won't work on official Winlator. Just save yourself the trouble and get a SMALL DRM free from GOG just for testing purposes at this point.

@btwiuse
Copy link

btwiuse commented Dec 5, 2024

I'm experiencing the same problem with Realme UI 6.0 version 15.0.0.130

image

They haven't released an update yet for the Realme GT7 Pro device

Suggest adding Realme to the title in addition to Oppo.

I believe they are all backed by Oppo, even the bugs are the same...

@haldi4803
Copy link

OnePlus Pad 2 got Update 15.0.0.300
Screenshot_2024-12-09-19-01-45-93_9492aa3750dca76abb7c25b39a5f1e8e

Problem Solved.
Winlator@Frost runs again.

@ascopes
Copy link

ascopes commented Dec 9, 2024

Still waiting on my side... maybe one day

@laughingwater
Copy link

Still waiting on my side... maybe one day

You can use Oxygen updater to get this update early, yes this is safe and it simply gets you to download the update package which you can then use the local install function to install

@ascopes
Copy link

ascopes commented Dec 9, 2024

TIL... will take a look. Thanks

@DvdBr3o
Copy link

DvdBr3o commented Dec 10, 2024

Solved with update on OnePlus Pad Pro :)

@osiktech
Copy link

Just install OPD2403_15.0.0.300(EX01) on my OnePlus Pad2 and Termux is working without a flaw again.

@bfcns
Copy link

bfcns commented Dec 11, 2024

Just install OPD2403_15.0.0.300(EX01) on my OnePlus Pad2 and Termux is working without a flaw again.

I have OnePlus Pad2, but doesnt show me 300, only 202 with the updater.

@DJTommek
Copy link

I had the same problem on my OnePlus 12 after updating to CPH2581_15.0.0.2xx (don't remember exact version) and no new version was available for me via official updater.

Then I used that Oxygen Updater mentioned earlier here allowed me to update to CPH2581_15.0.0.305(EX01) and that fixed my issue and Termux is working fine again. Thanks for the tip.

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