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

*Error in ResultReturner* #34

Open
Benjamin-Loison opened this issue Dec 21, 2024 · 5 comments
Open

*Error in ResultReturner* #34

Benjamin-Loison opened this issue Dec 21, 2024 · 5 comments

Comments

@Benjamin-Loison
Copy link
Owner

Benjamin-Loison commented Dec 21, 2024

tree/c553bc2ba7de37ad5c42df23d71e699d2785d7c5

image

image

I am pretty sure that I have an app up-to-date with last commit, see termux/termux-api/pull/711.

On my Fairphone 4 LineageOS but why?

+3

Problem description

Steps to reproduce

Expected behavior

Additional information

  • termux-api application version:
  • termux-api package version (installed through apt):
  • Android OS version:
  • Device model:
@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Dec 21, 2024

As I notifications capped to 50, I suspect crontab to be involved.

OverClock3000/issues/4 should help.

So to avoid any bias should temporarily disable crontab, can verify ~/bens_folder/termux/battery.txt filled by:

* * * * * (date && timeout 50 termux-battery-status) >> bens_folder/termux/battery.txt

wiki.termux.com: Termux-services (6180)

Package Daemon Port Description
... ... ... ...
cronie crond Daemon that runs specified programs at scheduled times cron
... ... ... ...
ls $PREFIX/var/service/
busybox-httpd  crond  dockerd  ftpd  httpd  postgres  sshd  telnetd  tor
ls $PREFIX/var/service/crond/
log  run  supervise
~/bens_folder/termux/battery.txt:
...
Sat Dec 21 15:38:00 CET 2024
Sat Dec 21 15:39:17 CET 2024
sv-disable crond

No new line at:

date
Sat Dec 21 15:43:05 CET 2024

so it seems disabled.

There may still be some background process, possibly started at Termux start. These may be the source of the issue.

So let us comment in ~/.termux/boot/start.sh ~/.termux/actual_start.sh.

As ./execute_crontab.py does not trigger the issue, as well as ~/.termux/actual_start.sh, I restored these two.

sv-enable crond
ls $PREFIX/var/service/crond/
log  run  supervise
date
Sun Dec 22 00:45:31 CET 2024
~/bens_folder/termux/battery.txt:
...
Sun Dec 22 00:45:29 CET 2024
{
  "health": "GOOD",
  "percentage": 35,
  "plugged": "UNPLUGGED",
  "status": "DISCHARGING",
  "temperature": 26.700000762939453,
  "current": -877075
}
Sun Dec 22 00:46:02 CET 2024

So things seem to work back fine without any crash report.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Dec 21, 2024

/sdcard/termux-plugin_execution_command.log:

Report Info

User Action: plugin execution command
Sender: ResultReturner
Report Timestamp: 2024-12-20 17:38:40.406 UTC

Termux:API Error

Error in ResultReturner:
java.io.IOException: Connection refused
	at android.net.LocalSocketImpl.connectLocal(Native Method)
	at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:259)
	at android.net.LocalSocket.connect(LocalSocket.java:162)
	at com.termux.api.util.ResultReturner.lambda$returnData$0(ResultReturner.java:199)
	at com.termux.api.util.ResultReturner$$ExternalSyntheticLambda0.run(Unknown Source:10)
	at java.lang.Thread.run(Thread.java:1012)

Termux:API App Info (Current)

APP_NAME: Termux:API
PACKAGE_NAME: com.termux.api
VERSION_NAME: 0.50.1
VERSION_CODE: 51
UID: 10210
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: true
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c210,c256,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c210,c256,c512,c768
SE_INFO: default:targetSdkVersion=28:complete
APK_RELEASE: Github
SIGNING_CERTIFICATE_SHA256_DIGEST: B6DA01480EEFD5FBF2CD3771B8D1021EC791304BDD6C4BF41D3FAABAD48EE5E1

Termux App Info

APP_NAME: Termux
PACKAGE_NAME: com.termux
VERSION_NAME: 0.118.0+c2d57f2
VERSION_CODE: 118
UID: 10210
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: true
SE_PROCESS_CONTEXT: u:r:untrusted_app_27:s0:c210,c256,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c210,c256,c512,c768
SE_INFO: default:targetSdkVersion=28:complete
TERMUX_APP_PACKAGE_MANAGER: -
TERMUX_APP_PACKAGE_VARIANT: -
APK_RELEASE: Github
SIGNING_CERTIFICATE_SHA256_DIGEST: B6DA01480EEFD5FBF2CD3771B8D1021EC791304BDD6C4BF41D3FAABAD48EE5E1

Device Info

Software

OS_VERSION: 4.19.322-perf-g1b745eae0308
SDK_INT: 34
RELEASE: 14
ID: AP2A.240905.003
DISPLAY: lineage_FP4-userdebug 14 AP2A.240905.003 5eb0466ea7
INCREMENTAL: 5eb0466ea7
SECURITY_PATCH: 2024-12-01
IS_TREBLE_ENABLED: true
TYPE: userdebug
TAGS: release-keys
MAX_PHANTOM_PROCESSES: - (Requires DUMP and PACKAGE_USAGE_STATS permission)
MONITOR_PHANTOM_PROCS: false
DEVICE_CONFIG_SYNC_DISABLED: -

Hardware

MANUFACTURER: Fairphone
BRAND: Fairphone
MODEL: FP4
PRODUCT: FP4eea
BOARD: FP4
HARDWARE: qcom
DEVICE: FP4
SUPPORTED_ABIS: arm64-v8a, armeabi-v7a, armeabi

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Dec 21, 2024

APT packages are up-to-date. What about Termux itself?

termux-app/compare/c2d57f2ed810b6fa854a6c9ab0ecee4aac38a0cc...fb01127ff2c95f6fa5f86a77956ca2d68afad9a9 (source: termux/termux-api/pull/711#issue-2536822210 and last Termux commit)

Well new commits based on their titles do not seem to help.

@Benjamin-Loison
Copy link
Owner Author

image

@Benjamin-Loison
Copy link
Owner Author

Search upstream and when issue is actually happening (ps aux, crontab and ~/.termux/boot/start.sh).

Precisely when occurred the first error?
People upstream also mention that it happens randomly.
Termux jobs cheduler investigate.
Update LineageOS. Now done.

Search other issues and pull requests mentioning ResultReturner.

termux#573
termux#607

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

No branches or pull requests

1 participant