KernelSU
KernelSU copied to clipboard
phone freezed during boot
Please check before submitting an issue
- [X] I have searched the issues and haven't found anything relevant
- [X] I will upload bugreport file in KernelSU Manager - Settings - Report log
- [ ] I know how to reproduce the issue which may not be specific to my device
Describe the bug
hi
I have add ksu to my kernel couple of days ago and my phone freezed during boot yesterday (no manager report log). it doesnt freeze on every boot and so far it has been rebooted about 5 times. in last_kmsg it shows:
` <4>[ 31.890726] [6: ksud: 676] CPU: 6 PID: 676 Comm: ksud Tainted: G W 4.9.280.dev #126 <4>[ 31.890730] [6: ksud: 676] Hardware name: Samsung Crown rev0.6 board based on EXYNOS9810 (DT) <4>[ 31.890733] [6: ksud: 676] Call trace: <4>[ 31.890743] [6: ksud: 676] [<00000000c635234f>] dump_backtrace+0x0/0x280 <4>[ 31.890751] [6: ksud: 676] [<0000000011b59283>] show_stack+0x14/0x20 <4>[ 31.890758] [6: ksud: 676] [<0000000019938ff4>] dump_stack+0xa4/0xc4 <4>[ 31.890765] [6: ksud: 676] [<000000009e0daa40>] __might_sleep+0x150/0x17c <4>[ 31.890771] [6: ksud: 676] [<00000000ee73405e>] __might_fault+0x28/0x30 <4>[ 31.890777] [6: ksud: 676] [<00000000d1187a10>] strncpy_from_user+0x13c/0x300 <4>[ 31.890784] [6: ksud: 676] [<00000000602b8d15>] handle_sepolicy+0x17c/0x75c <4>[ 31.890789] [6: ksud: 676] [<0000000087df889e>] ksu_handle_prctl+0x220/0x940 <4>[ 31.890793] [6: ksud: 676] [<00000000e7e26c61>] ksu_task_prctl+0xc/0x20 <4>[ 31.890800] [6: ksud: 676] [<0000000058896447>] security_task_prctl+0x68/0xb0 <4>[ 31.890806] [6: ksud: 676] [<000000004c0c9d23>] SyS_prctl+0x34/0x700 <4>[ 31.890810] [6: ksud: 676] [<000000006f2ad6fa>] el0_svc_naked+0x34/0x38
`
and other cpu tainted message: ` <4>[ 65.767942] [3: jbd2/sda3-8: 492] CPU: 3 PID: 492 Comm: jbd2/sda3-8 Tainted: G W 4.9.280.dev #126 <4>[ 65.767946] [3: jbd2/sda3-8: 492] Hardware name: Samsung Crown rev0.6 board based on EXYNOS9810 (DT) <4>[ 65.767950] [3: jbd2/sda3-8: 492] Call trace: <4>[ 65.767961] [3: jbd2/sda3-8: 492] [<00000000c635234f>] dump_backtrace+0x0/0x280 <4>[ 65.767969] [3: jbd2/sda3-8: 492] [<0000000011b59283>] show_stack+0x14/0x20 <4>[ 65.767978] [3: jbd2/sda3-8: 492] [<0000000019938ff4>] dump_stack+0xa4/0xc4 <4>[ 65.767985] [3: jbd2/sda3-8: 492] [<00000000ff70c447>] warn_alloc+0xe4/0x120 <4>[ 65.767990] [3: jbd2/sda3-8: 492] [<000000007389a6b5>] __alloc_pages_nodemask+0x3d4/0xc90 <4>[ 65.767997] [3: jbd2/sda3-8: 492] [<00000000f3903dae>] sd_init_command+0x94/0xa44 <4>[ 65.768005] [3: jbd2/sda3-8: 492] [<0000000073bf1348>] scsi_setup_cmnd+0xbc/0xfc <4>[ 65.768011] [3: jbd2/sda3-8: 492] [<00000000ef0471ef>] scsi_prep_fn+0x54/0x210 <4>[ 65.768019] [3: jbd2/sda3-8: 492] [<00000000ff9b373a>] blk_peek_request+0x14c/0x30c <4>[ 65.768025] [3: jbd2/sda3-8: 492] [<000000004771ed34>] scsi_request_fn+0x28/0x78c <4>[ 65.768031] [3: jbd2/sda3-8: 492] [<00000000292f27fa>] blk_queue_bio+0x1f4/0x420 <4>[ 65.768037] [3: jbd2/sda3-8: 492] [<00000000877f5be7>] generic_make_request.part.0+0xcc/0x360 <4>[ 65.768042] [3: jbd2/sda3-8: 492] [<000000002122a344>] submit_bio+0x16c/0x280 <4>[ 65.768050] [3: jbd2/sda3-8: 492] [<0000000053de0d49>] submit_bio_wait+0x50/0x6c <4>[ 65.768057] [3: jbd2/sda3-8: 492] [<000000005d288d95>] ext4_process_freed_data+0x1d4/0x4d4 <4>[ 65.768064] [3: jbd2/sda3-8: 492] [<00000000062f532c>] ext4_journal_commit_callback+0x48/0xd0 <4>[ 65.768070] [3: jbd2/sda3-8: 492] [<0000000002e0e243>] jbd2_journal_commit_transaction+0x191c/0x1bb0 <4>[ 65.768077] [3: jbd2/sda3-8: 492] [<00000000db7b0649>] kjournald2+0xa8/0x240 <4>[ 65.768084] [3: jbd2/sda3-8: 492] [<00000000513c2ba4>] kthread+0x16c/0x170 <4>[ 65.768090] [3: jbd2/sda3-8: 492] [<00000000dec88aae>] ret_from_fork+0x10/0x20
`
at line 44 at hastab.c as reported, there is a cond_reseched call:
` int hashtab_insert(struct hashtab *h, void *key, void *datum) ...
cond_resched();
.... `
I have googled cond_resched may cause the 'BUG: sleeping function called from invalid context' problem. however those patches I found on the net have beed applied already
any ideas pls?
regards
To Reproduce
No response
Expected behavior
No response
Screenshots
No response
Logs
No response
Device info
- Device: Samsung Note9
- OS Version: Android S
- KernelSU Version: 0.7.6
- Kernel Version: 4.9.280
Additional context
No response