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

[Bug]: Termux terminates after ~ 4to5 Hours on Android 9 #3106

Closed
NEBELWAENDE opened this issue Nov 20, 2022 · 18 comments
Closed

[Bug]: Termux terminates after ~ 4to5 Hours on Android 9 #3106

NEBELWAENDE opened this issue Nov 20, 2022 · 18 comments

Comments

@NEBELWAENDE
Copy link

NEBELWAENDE commented Nov 20, 2022

Problem description

Launching Termux 0.118.0, lauching sshd and crond via Termux-Boot, doing some work via crond every 5 min and monitor/visualize results of work in 9 to 10 tmux panes. Wake-Lock is held. Battery optimisazion is disabled. Wireguard VPN active. Not Rooted.

Steps to reproduce the behavior.

Start Termux on Android 9. Wait 4 to 5 Hours. After that Time Termux dies or gets terminated.

What is the expected behavior?

Run 24/7

System information

  • Termux application version: 0.118.0
  • Android OS version: 9
  • Device model: Lenovo TB-X605L
@Grimler91
Copy link
Member

Check adb logcat after it has been killed to see what the reason was.

Maybe android runs out of memory, is the cronjob you are running slowly eating up available memory? Should be easy to check with for example htop

@NEBELWAENDE
Copy link
Author

-------- beginning of events 11-20 11:12:27.555 I/am_on_create_called(21961): [0,com.termux.app.TermuxActivity,performCreate]
11-20 11:12:27.560 I/am_on_start_called(21961): [0,com.termux.app.TermuxActivity,handleStartActivity]
11-20 11:12:27.569 I/am_on_resume_called(21961): [0,com.termux.app.TermuxActivity,RESUME_ACTIVITY]
11-20 11:12:28.064 I/auditd (22006): type=1400 audit(0.0:449): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=3942495 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 11:12:28.084 I/auditd (22009): type=1400 audit(0.0:450): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=3942495 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 11:12:28.504 I/auditd (22047): type=1400 audit(0.0:451): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=3942495 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 11:12:28.524 I/auditd (22052): type=1400 audit(0.0:452): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=3942495 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0 11-20 11:12:28.544 I/auditd (22055): type=1400 audit(0.0:453): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=3942495 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 11:12:28.554 I/auditd (22058): type=1400 audit(0.0:454): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=3942495 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 11:12:29.774 I/auditd (22113): type=1400 audit(0.0:473): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0 11-20 11:12:29.794 I/auditd (22129): type=1400 audit(0.0:475): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0 11-20 11:12:29.794 I/auditd (22092): type=1400 audit(0.0:474): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 11:12:29.824 I/auditd (22123): type=1400 audit(0.0:476): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0 11-20 11:12:29.824 I/auditd (22119): type=1400 audit(0.0:477): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 15:27:49.718 I/am_on_create_called( 4300): [0,com.termux.app.TermuxActivity,performCreate]
11-20 15:27:49.723 I/am_on_start_called( 4300): [0,com.termux.app.TermuxActivity,handleStartActivity]
11-20 15:27:49.735 I/am_on_resume_called( 4300): [0,com.termux.app.TermuxActivity,RESUME_ACTIVITY]
11-20 15:27:50.244 I/auditd ( 4346): type=1400 audit(0.0:490): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 15:27:50.274 I/auditd ( 4349): type=1400 audit(0.0:491): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 15:27:50.684 I/auditd ( 4387): type=1400 audit(0.0:492): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 15:27:50.724 I/auditd ( 4394): type=1400 audit(0.0:493): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 15:27:50.734 I/auditd ( 4395): type=1400 audit(0.0:494): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 15:27:50.754 I/auditd ( 4402): type=1400 audit(0.0:495): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 15:27:51.964 I/auditd ( 4470): type=1400 audit(0.0:514): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 15:27:51.964 I/auditd ( 4456): type=1400 audit(0.0:515): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 15:27:51.964 I/auditd ( 4440): type=1400 audit(0.0:517): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 15:27:51.964 I/auditd ( 4435): type=1400 audit(0.0:516): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 15:27:51.974 I/auditd ( 4478): type=1400 audit(0.0:518): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:24:02.634 I/auditd ( 5881): type=1400 audit(0.0:531): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:24:02.654 I/auditd ( 5882): type=1400 audit(0.0:532): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:24:06.764 I/auditd ( 5968): type=1400 audit(0.0:533): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:24:20.354 I/auditd ( 6412): type=1400 audit(0.0:534): avc: denied { read } for comm="find" name="/" dev="rootfs" ino=2 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
11-20 19:24:23.024 I/auditd ( 6515): type=1400 audit(0.0:535): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:24:24.094 I/auditd ( 6563): type=1400 audit(0.0:536): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:33:11.376 I/am_on_create_called(17622): [0,com.termux.app.TermuxActivity,performCreate]
11-20 19:33:11.381 I/am_on_start_called(17622): [0,com.termux.app.TermuxActivity,handleStartActivity]
11-20 19:33:11.386 I/am_on_resume_called(17622): [0,com.termux.app.TermuxActivity,RESUME_ACTIVITY]
11-20 19:33:11.824 I/auditd (17666): type=1400 audit(0.0:537): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:33:11.844 I/auditd (17669): type=1400 audit(0.0:538): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:33:12.224 I/auditd (17706): type=1400 audit(0.0:539): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:33:12.234 I/auditd (17709): type=1400 audit(0.0:540): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:33:12.264 I/auditd (17714): type=1400 audit(0.0:541): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:33:12.314 I/auditd (17728): type=1400 audit(0.0:544): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 19:33:13.324 I/auditd (17774): type=1400 audit(0.0:561): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:33:13.334 I/auditd (17792): type=1400 audit(0.0:562): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:33:13.404 I/auditd (17777): type=1400 audit(0.0:563): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:33:13.414 I/auditd (17751): type=1400 audit(0.0:564): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 19:33:13.424 I/auditd (17798): type=1400 audit(0.0:565): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
--------- beginning of main
11-20 19:41:09.687 I/CROND (29500): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 19:45:01.695 I/CROND ( 6963): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 19:45:01.695 I/CROND ( 6965): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 19:45:01.695 I/CROND ( 6966): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 19:45:01.701 I/CROND ( 6964): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 19:45:20.719 I/CROND ( 6962): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 19:45:25.658 I/CROND ( 6961): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 19:45:56.578 I/CROND ( 6960): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 19:46:10.127 I/CROND ( 6959): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 19:50:01.133 I/CROND (15428): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 19:50:01.135 I/CROND (15431): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 19:50:01.136 I/CROND (15432): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 19:50:01.141 I/CROND (15433): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 19:50:20.228 I/CROND (15430): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 19:50:26.159 I/CROND (15429): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 19:50:56.048 I/CROND (15427): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 19:51:09.532 I/CROND (15426): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 19:55:01.538 I/CROND (24078): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 19:55:01.539 I/CROND (24079): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 19:55:01.539 I/CROND (24081): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 19:55:01.539 I/CROND (24080): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 19:55:20.553 I/CROND (24077): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 19:55:25.460 I/CROND (24076): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 19:55:56.414 I/CROND (24075): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 19:56:09.958 I/CROND (24074): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:00:01.964 I/CROND (32609): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:00:01.965 I/CROND (32611): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:00:01.966 I/CROND (32612): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:00:01.972 I/CROND (32613): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:00:20.975 I/CROND (32610): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:00:25.907 I/CROND (32608): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:00:56.850 I/CROND (32607): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:01:10.340 I/CROND (32606): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:05:01.346 I/CROND (10205): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:05:01.347 I/CROND (10208): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:05:01.348 I/CROND (10209): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:05:01.356 I/CROND (10210): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:05:20.343 I/CROND (10207): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:05:25.999 I/CROND (10206): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:05:56.137 I/CROND (10204): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:06:09.760 I/CROND (10203): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:10:01.766 I/CROND (18674): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:10:01.767 I/CROND (18677): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:10:01.767 I/CROND (18678): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:10:01.777 I/CROND (18679): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:10:20.723 I/CROND (18676): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:10:25.718 I/CROND (18675): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:10:57.326 I/CROND (18673): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:11:10.231 I/CROND (18672): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:11:42.411 I//data/data/com.termux/files/usr/bin/sshd(22014): Accepted password for u_129a from 192.168.2.149 port 39096 ssh2
11-20 20:11:42.814 I/auditd (22224): type=1400 audit(0.0:576): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 20:11:42.814 W/pgrep (22224): type=1400 audit(0.0:576): avc: denied { read } for name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 20:11:42.844 I/auditd (22225): type=1400 audit(0.0:577): avc: denied { read } for comm="pgrep" name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 20:11:42.844 W/pgrep (22225): type=1400 audit(0.0:577): avc: denied { read } for name="osrelease" dev="proc" ino=8558565 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0
11-20 20:11:46.294 D/AndroidRuntime(22295): >>>>>> START com.android.internal.os.RuntimeInit uid 10129 <<<<<<
11-20 20:11:46.458 D/ICU (22295): Timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
11-20 20:11:46.544 I/auditd (22295): type=1400 audit(0.0:578): avc: denied { read } for comm="main" name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 20:11:46.544 W/main (22295): type=1400 audit(0.0:578): avc: denied { read } for name="u:object_r:vendor_mpctl_prop:s0" dev="tmpfs" ino=5483 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:vendor_mpctl_prop:s0 tclass=file permissive=0
11-20 20:11:46.559 E/libc (22295): Access denied finding property "ro.vendor.at_library"
11-20 20:11:46.572 D/AndroidRuntime(22295): Calling main entry com.termux.termuxam.Am
11-20 20:11:46.618 D/AndroidRuntime(22295): Shutting down VM
11-20 20:12:21.654 I/auditd (23324): type=1400 audit(0.0:579): avc: denied { read } for comm="find" name="/" dev="rootfs" ino=2 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
11-20 20:12:21.654 W/find (23324): type=1400 audit(0.0:579): avc: denied { read } for name="/" dev="rootfs" ino=2 scontext=u:r:untrusted_app:s0:c129,c256,c512,c768 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0
11-20 20:15:01.237 I/CROND (27492): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:15:01.238 I/CROND (27494): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)
11-20 20:15:01.245 I/CROND (27495): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:15:01.255 I/CROND (27496): (u0_a129) CMD (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:15:20.319 I/CROND (27493): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/PingZeit.sh 0 > /dev/null 2>&1)
11-20 20:15:25.329 I/CROND (27491): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SNMPRunTime.sh 15 > /dev/null 2>&1)
11-20 20:15:56.062 I/CROND (27490): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/WebUi.sh 45 > /dev/null 2>&1)
11-20 20:16:09.670 I/CROND (27489): (u0_a129) CMDEND (/data/data/com.termux/files/home/NEBELWAENDE/Schulkinderhaus/Scripts/SSH.sh 60 > /dev/null 2>&1)

@agnostic-apollo
Copy link
Member

Run adb shell dumpsys activity exit-info com.termux

@NEBELWAENDE
Copy link
Author

NEBELWAENDE commented Nov 21, 2022

adb shell dumpsys activity exit-info com.termux

adb: no devices/emulators found

(probably syntax typo ?-) )

@2096779623
Copy link
Member

adb shell dumpsys activity exit-info com.termux

adb: no devices/emulators found

(probably syntax typo ?-) )

https://developer.android.com/studio/command-line/adb

Connect to your phone first.

@NEBELWAENDE
Copy link
Author

NEBELWAENDE commented Nov 21, 2022

Okay, thank you for you advice - will try to install android sdk on my Ubuntu 20.04 and then go further with this topic.
1.)
sudo apt update
sudo apt upgrade
2.)
sudo apt install android-tools-adb
sudo apt install android-tools-fastboot
3.)
$ adb version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5ubuntu2
Installed as /usr/lib/android-sdk/platform-tools/adb
4.) sudo adb start-server

  • daemon not running; starting now at tcp:5037
  • daemon started successfully

Next I'll try to Connect Device via USB and USB Debugging on : Takes some times, will get back here

@NEBELWAENDE
Copy link
Author

NEBELWAENDE commented Nov 21, 2022

adb shell dumpsys activity exit-info com.termux

Unknown command: exit-info
Bad activity command, or no activities match: exit-info
Use -h for help.

(exit.info com.termux) did not work ?-)

adb shell dumpsys activity

dumpsys.log

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Nov 21, 2022

That commands must have been added after android 9. But your termux has been running even after 4hrs. Android does not guarantee that processes with foreground services will never get killed, OOM kills do happen.

Active foreground apps - user 0:
  #2: com.termux
    mNumActive=1 mAppOnTop=false mShownWhileTop=true mShownWhileScreenOn=true
    mStartTime=-4h8m25s658ms mStartVisibleTime=-4h8m25s658ms

To find exact reason, you can instead turn on wireless debugging and run adb logcat | grep -E "(ActivityManager: Killing )|(libprocessgroup: Successfully killed)" > kills.txt on your pc and you should see entries like ActivityManager: Killing 4451:com.termux/u0a212 (adj 985): empty #17 and libprocessgroup: Successfully killed process cgroup uid 10147 pid 5683 in 0ms

A more general command could be adb logcat | grep -iE "kill" | grep -v "NotificationService" > kills.txt for non-aosp manufacturer killings.

https://cs.android.com/android/platform/superproject/+/android-9.0.0_r1:system/core/libprocessgroup/processgroup.cpp;l=260

https://cs.android.com/android/platform/superproject/+/android-9.0.0_r1:frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java;l=669

Anyways, this is not something termux itself can fix, since termux is getting killed even with a foreground service.

@agnostic-apollo agnostic-apollo closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2022
@NEBELWAENDE
Copy link
Author

NEBELWAENDE commented Nov 21, 2022

Thank you - I will turn on Wireless Debugging and do so...

Seems that Android 9 does not offer the wireless debugging feature - i did not find ist in the developer settings.

I'll try your command anyway...

@agnostic-apollo
Copy link
Member

Welcome.

@NEBELWAENDE
Copy link
Author

adb logcat | grep -E "(ActivityManager: Killing )|(libprocessgroup: Successfully killed)" > kills.txt
kills.txt

@agnostic-apollo
Copy link
Member

Seems that Android 9 does not offer the wireless debugging feature - i did not find ist in the developer settings.

https://developer.android.com/studio/command-line/adb#wireless

kills.txt

Does not list com.termux killing. Check it once termux gets killed automatically.

@NEBELWAENDE
Copy link
Author

NEBELWAENDE commented Nov 21, 2022

adb.txt
okay - waiting for termination and afterwards send to here

Termination / Kill happend at ~ 18:40

@sylirre
Copy link
Member

sylirre commented Nov 21, 2022

I don't see any relevant information that points on kill of Termux app. According to the log, it crashed (sigabrt):

11-21 18:40:29.390  5617  5617 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 5617 (com.termux), pid 5617 (com.termux)
11-21 18:40:29.538 18119 18119 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-21 18:40:29.538 18119 18119 F DEBUG   : Build fingerprint: 'Lenovo/LenovoTB-X605L/X605L:9/PKQ1.190319.001/S210224_200910_ROW:user/release-keys'
11-21 18:40:29.538 18119 18119 F DEBUG   : Revision: '0'
11-21 18:40:29.538 18119 18119 F DEBUG   : ABI: 'arm64'
11-21 18:40:29.538 18119 18119 F DEBUG   : pid: 5617, tid: 5617, name: com.termux  >>> com.termux <<<
11-21 18:40:29.538 18119 18119 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
11-21 18:40:29.538 18119 18119 F DEBUG   :     x0  0000000000000000  x1  00000000000015f1  x2  0000000000000006  x3  0000000000000008
11-21 18:40:29.538 18119 18119 F DEBUG   :     x4  000000000e41d117  x5  000000000e41d117  x6  000000000e41d117  x7  0000000000000076
11-21 18:40:29.538 18119 18119 F DEBUG   :     x8  0000000000000083  x9  81dcecc7ad5de63f  x10 0000000000000000  x11 fffffffc7ffffbdf
11-21 18:40:29.538 18119 18119 F DEBUG   :     x12 0000000000000001  x13 000000000e78d653  x14 00000000f1d22253  x15 0000000000000000
11-21 18:40:29.538 18119 18119 F DEBUG   :     x16 0000007850ef32b8  x17 0000007850e14a50  x18 00000000d15adf9b  x19 00000000000015f1
11-21 18:40:29.538 18119 18119 F DEBUG   :     x20 00000000000015f1  x21 0000000000000000  x22 00000078567155e0  x23 0000007fee5e7e48
11-21 18:40:29.538 18119 18119 F DEBUG   :     x24 00000078511f86e0  x25 0000000000000000  x26 0000000000000000  x27 00000077b1b941fa
11-21 18:40:29.538 18119 18119 F DEBUG   :     x28 0000000000000000  x29 0000007fee5e7da0
11-21 18:40:29.538 18119 18119 F DEBUG   :     sp  0000007fee5e7d60  lr  0000007850e06084  pc  0000007850e060ac
11-21 18:40:29.581 18119 18119 F DEBUG   : 
11-21 18:40:29.581 18119 18119 F DEBUG   : backtrace:
11-21 18:40:29.581 18119 18119 F DEBUG   :     #00 pc 00000000000220ac  /system/lib64/libc.so (abort+116)
11-21 18:40:29.581 18119 18119 F DEBUG   :     #01 pc 000000000001d2f8  /system/lib64/libminikin.so (void minikin::LayoutCache::getOrCreate<minikin::LayoutAppendFunctor>(minikin::U16StringPiece const&, minikin::Range const&, minikin::MinikinPaint const&, bool, minikin::StartHyphenEdit, minikin::EndHyphenEdit, minikin::LayoutAppendFunctor&)+880)
11-21 18:40:29.581 18119 18119 F DEBUG   :     #02 pc 000000000001cce4  /system/lib64/libminikin.so (minikin::Layout::doLayoutWord(unsigned short const*, unsigned long, unsigned long, unsigned long, bool, minikin::MinikinPaint const&, unsigned long, minikin::StartHyphenEdit, minikin::EndHyphenEdit, minikin::LayoutPieces const*, minikin::Layout*, float*, minikin::MinikinExtent*, minikin::MinikinRect*, minikin::LayoutPieces*) [clone .cfi]+324)
11-21 18:40:29.581 18119 18119 F DEBUG   :     #03 pc 000000000001c93c  /system/lib64/libminikin.so (minikin::Layout::doLayoutRunCached(minikin::U16StringPiece const&, minikin::Range const&, bool, minikin::MinikinPaint const&, unsigned long, minikin::StartHyphenEdit, minikin::EndHyphenEdit, minikin::LayoutPieces const*, minikin::Layout*, float*, minikin::MinikinExtent*, minikin::MinikinRect*, minikin::LayoutPieces*) [clone .cfi]+652)
11-21 18:40:29.581 18119 18119 F DEBUG   :     #04 pc 000000000001c658  /system/lib64/libminikin.so (minikin::Layout::doLayout(minikin::U16StringPiece const&, minikin::Range const&, minikin::Bidi, minikin::MinikinPaint const&, minikin::StartHyphenEdit, minikin::EndHyphenEdit)+324)
11-21 18:40:29.581 18119 18119 F DEBUG   :     #05 pc 0000000000354f5c  /system/lib64/libhwui.so (android::MinikinUtils::doLayout(android::Paint const*, minikin::Bidi, android::Typeface const*, unsigned short const*, unsigned long, unsigned long, unsigned long, minikin::MeasuredText*)+156)

However bug apparently in the OS, specifically UI rendering part...

@agnostic-apollo
Copy link
Member

You must be the guy who emailed to our contact email. Sorry, didn't get time to look into it.

Try to find when exactly does this crash happen and what's running. You could try reducing what you normally run, like don't run tmux or don't run anything and see if crash happens. Also enable verbose log level and terminal view key logging in termux settings and it should log entries before the crash happens to give you a clue. Also revert back to default fonts since you have changed those.

https://github.com/termux/termux-app#Debugging

https://cs.android.com/android/platform/superproject/+/android-9.0.0_r1:frameworks/base/libs/hwui/hwui/MinikinUtils.cpp;l=50

https://cs.android.com/android/platform/superproject/+/android-9.0.0_r1:frameworks/minikin/libs/minikin/Layout.cpp;l=417

https://cs.android.com/android/platform/superproject/+/android-9.0.0_r1:frameworks/minikin/include/minikin/LayoutCache.h;l=138

@NEBELWAENDE
Copy link
Author

NEBELWAENDE commented Nov 22, 2022

Hi Thanks for your advice. I have 4 Apps installed myself that run in Background.

  • AutoStart - (no root) - (Brings up Termux App)
  • Anydesk Remote Destop ( I ' ll probably need this in future for remote assistance )
  • Wireguard ( Connect's after Boot automaticly into Customers Infrastructure via VPN while I am Testing )
  • Discreet Launcher ( Hide all unused Apps and Only make Termux visible as App)

It is predictable that Termux that I run in Foreground as visible App terminates after 4 to 5 Hours. While Wireguard, Anydesk, Discreet Launcher still kept alive and running.

(PS: I could live with a workaround that would stops and starts Termux after 3 hours via Reboot or Restart, but I don't know how to enable this Workaround while I am not rooted. Tablet reboots once a Day between 23:57 and 23:59 via Android Reboot plan... )

@agnostic-apollo
Copy link
Member

Issue is very unlikely to be other apps, issue is likely whatever you are running inside termux terminal or possibly the os.

@NEBELWAENDE
Copy link
Author

NEBELWAENDE commented Nov 23, 2022

Currently I think about to run top or htop periodically in batch mode and dump results into log.txt until termux terminates. The last minutes before termination would be interesting in focus of the running processes inside termux that might cause this behaviour...

(* In the meantime, found an app that schedules restart of termux and brings it into foreground: every 5 minutes

[Open App Scheduler] )

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

5 participants