* [syzbot] [kernel?] WARNING in enqueue_dl_entity @ 2024-09-28 17:15 syzbot 2024-11-22 22:48 ` syzbot 0 siblings, 1 reply; 6+ messages in thread From: syzbot @ 2024-09-28 17:15 UTC (permalink / raw) To: akpm, linux-kernel, linux-mm, syzkaller-bugs Hello, syzbot found the following issue on: HEAD commit: 13882369ceb9 Merge tag 'hid-for-linus-2024092601' of git:/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17334507980000 kernel config: https://syzkaller.appspot.com/x/.config?x=f1af1dc2e43cf22f dashboard link: https://syzkaller.appspot.com/bug?extid=00a022dc9979d67df050 compiler: aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: arm64 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/384ffdcca292/non_bootable_disk-13882369.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/a1a2db588faf/vmlinux-13882369.xz kernel image: https://storage.googleapis.com/syzbot-assets/a3f594a63d31/Image-13882369.gz.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+00a022dc9979d67df050@syzkaller.appspotmail.com ------------[ cut here ]------------ WARNING: CPU: 1 PID: 34 at kernel/sched/deadline.c:1995 enqueue_dl_entity+0x47c/0x590 kernel/sched/deadline.c:2029 Modules linked in: CPU: 1 UID: 0 PID: 34 Comm: kcompactd0 Tainted: G B 6.11.0-syzkaller-10729-g13882369ceb9 #0 Tainted: [B]=BAD_PAGE Hardware name: linux,dummy-virt (DT) pstate: a14000c9 (NzCv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : enqueue_dl_entity+0x47c/0x590 kernel/sched/deadline.c:1995 lr : dl_server_start+0x44/0x12c kernel/sched/deadline.c:1650 sp : ffff800082eab970 x29: ffff800082eab970 x28: f3f0000004f45c00 x27: 0000000000000000 x26: 0000000000000001 x25: 0000000000000000 x24: 0000000000000048 x23: fff000007f8ee800 x22: 0000000000000001 x21: 000000000016e360 x20: 0000000000000001 x19: fff000007f8ef168 x18: 0000000000000000 x17: fff07ffffd1e0000 x16: ffff800080008000 x15: 0000000000000000 x14: 00000000000002e1 x13: 0000000000000377 x12: 0000000000000001 x11: fff000007f8ee880 x10: 0000000000000001 x9 : 0000000000000048 x8 : 0000000000100000 x7 : 0000000000000001 x6 : f3f0000004f45bc0 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000001 Call trace: enqueue_dl_entity+0x47c/0x590 kernel/sched/deadline.c:2029 dl_server_start+0x44/0x12c kernel/sched/deadline.c:1650 enqueue_task_fair+0x11c/0x3a4 kernel/sched/fair.c:7040 enqueue_task+0x58/0xbc kernel/sched/core.c:2020 activate_task+0x68/0x80 kernel/sched/core.c:2062 attach_task+0x4c/0x74 kernel/sched/fair.c:9631 attach_tasks kernel/sched/fair.c:9666 [inline] sched_balance_rq+0x488/0xc74 kernel/sched/fair.c:11743 sched_balance_newidle.constprop.0+0x1b0/0x3e4 kernel/sched/fair.c:12785 pick_next_task_fair+0x50/0x320 kernel/sched/fair.c:8933 __pick_next_task kernel/sched/core.c:5955 [inline] pick_next_task kernel/sched/core.c:6477 [inline] __schedule+0x158/0x8e8 kernel/sched/core.c:6629 __schedule_loop kernel/sched/core.c:6752 [inline] schedule+0x34/0x104 kernel/sched/core.c:6767 schedule_timeout+0x80/0xf4 kernel/time/timer.c:2615 kcompactd+0x204/0x374 mm/compaction.c:3181 kthread+0x114/0x118 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 ---[ end trace 0000000000000000 ]--- --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [kernel?] WARNING in enqueue_dl_entity 2024-09-28 17:15 [syzbot] [kernel?] WARNING in enqueue_dl_entity syzbot @ 2024-11-22 22:48 ` syzbot 2024-11-23 2:10 ` Hillf Danton 2024-12-13 11:03 ` Hillf Danton 0 siblings, 2 replies; 6+ messages in thread From: syzbot @ 2024-11-22 22:48 UTC (permalink / raw) To: akpm, bsegall, dietmar.eggemann, juri.lelli, linux-kernel, linux-mm, mgorman, mingo, peterz, rostedt, syzkaller-bugs, vincent.guittot, vschneid syzbot has found a reproducer for the following issue on: HEAD commit: 28eb75e178d3 Merge tag 'drm-next-2024-11-21' of https://gi.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1402175f980000 kernel config: https://syzkaller.appspot.com/x/.config?x=5606b6814de0f638 dashboard link: https://syzkaller.appspot.com/bug?extid=00a022dc9979d67df050 compiler: aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: arm64 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1016fec0580000 Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/384ffdcca292/non_bootable_disk-28eb75e1.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/4053ed867efd/vmlinux-28eb75e1.xz kernel image: https://storage.googleapis.com/syzbot-assets/903039310aac/Image-28eb75e1.gz.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+00a022dc9979d67df050@syzkaller.appspotmail.com ------------[ cut here ]------------ WARNING: CPU: 0 PID: 10 at kernel/sched/deadline.c:1995 enqueue_dl_entity+0x478/0x58c kernel/sched/deadline.c:2029 Modules linked in: CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.12.0-syzkaller-07749-g28eb75e178d3 #0 Hardware name: linux,dummy-virt (DT) Workqueue: 0x0 (events) pstate: a14000c9 (NzCv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--) pc : enqueue_dl_entity+0x478/0x58c kernel/sched/deadline.c:1995 lr : dl_server_start+0x44/0x12c kernel/sched/deadline.c:1650 sp : ffff800082b33a10 x29: ffff800082b33a10 x28: fdf0000004e5dc00 x27: 0000000000000000 x26: 0000000000000001 x25: 0000000000000000 x24: 0000000000000048 x23: fff000007f8d7600 x22: 0000000000000001 x21: 000000000016e360 x20: 0000000000000001 x19: fff000007f8d7f68 x18: 0000000000000000 x17: 0000000000000004 x16: 0000000000000002 x15: 0000000000000000 x14: 0000000000000142 x13: 00000000000003db x12: 0000000000000001 x11: fff000007f8d7680 x10: 0000000000000284 x9 : 0000000000000048 x8 : 0000000000100000 x7 : 0000000000000000 x6 : fdf0000004e5dbc0 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 x2 : 0000000000000001 x1 : 0000000000000001 x0 : 0000000000000001 Call trace: enqueue_dl_entity+0x478/0x58c kernel/sched/deadline.c:2029 (P) dl_server_start+0x44/0x12c kernel/sched/deadline.c:1650 (L) dl_server_start+0x44/0x12c kernel/sched/deadline.c:1650 enqueue_task_fair+0x11c/0x3a4 kernel/sched/fair.c:7038 enqueue_task+0x3c/0xe4 kernel/sched/core.c:2061 activate_task+0x68/0x80 kernel/sched/core.c:2108 attach_task+0x4c/0x74 kernel/sched/fair.c:9635 attach_tasks kernel/sched/fair.c:9670 [inline] sched_balance_rq+0x580/0xc74 kernel/sched/fair.c:11747 sched_balance_newidle.constprop.0+0x1b0/0x3e4 kernel/sched/fair.c:12789 pick_next_task_fair+0x50/0x320 kernel/sched/fair.c:8937 __pick_next_task kernel/sched/core.c:6023 [inline] pick_next_task kernel/sched/core.c:6542 [inline] __schedule+0x15c/0x900 kernel/sched/core.c:6709 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x34/0x104 kernel/sched/core.c:6848 worker_thread+0x19c/0x354 kernel/workqueue.c:3406 kthread+0x114/0x118 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 ---[ end trace 0000000000000000 ]--- --- If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [kernel?] WARNING in enqueue_dl_entity 2024-11-22 22:48 ` syzbot @ 2024-11-23 2:10 ` Hillf Danton 2024-11-23 2:12 ` syzbot 2024-12-13 11:03 ` Hillf Danton 1 sibling, 1 reply; 6+ messages in thread From: Hillf Danton @ 2024-11-23 2:10 UTC (permalink / raw) To: syzbot; +Cc: linux-kernel, syzkaller-bugs On Fri, 22 Nov 2024 14:48:23 -0800 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 28eb75e178d3 Merge tag 'drm-next-2024-11-21' of https://gi.. > git tree: upstream > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1016fec0580000 #syz test upstream master --- x/kernel/sched/fair.c +++ y/kernel/sched/fair.c @@ -7151,8 +7151,11 @@ static int dequeue_entities(struct rq *r idle_h_nr_running = h_nr_running; /* end evaluation on encountering a throttled cfs_rq */ - if (cfs_rq_throttled(cfs_rq)) + if (cfs_rq_throttled(cfs_rq)) { + if (rq_h_nr_running && !rq->cfs.h_nr_running) + dl_server_stop(&rq->fair_server); return 0; + } } sub_nr_running(rq, h_nr_running); -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [kernel?] WARNING in enqueue_dl_entity 2024-11-23 2:10 ` Hillf Danton @ 2024-11-23 2:12 ` syzbot 0 siblings, 0 replies; 6+ messages in thread From: syzbot @ 2024-11-23 2:12 UTC (permalink / raw) To: hdanton, linux-kernel, syzkaller-bugs Hello, syzbot tried to test the proposed patch but the build/boot failed: syzkaller build failed: failed to run ["make" "target"]: exit status 2 tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified Makefile:31: run command via tools/syz-env for best compatibility, see: Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen go: error obtaining buildID for go tool compile: fork/exec /syzkaller/jobs/linux/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.1.linux-amd64/pkg/tool/linux_amd64/compile: resource temporarily unavailable error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping. make: *** [Makefile:147: descriptions] Error 1 go env (err=<nil>) GO111MODULE='auto' GOARCH='amd64' GOBIN='' GOCACHE='/syzkaller/.cache/go-build' GOENV='/syzkaller/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMODCACHE='/syzkaller/jobs/linux/gopath/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/syzkaller/jobs/linux/gopath' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/syzkaller/jobs/linux/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.1.linux-amd64' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/syzkaller/jobs/linux/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.1.linux-amd64/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.22.1' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='gcc' CXX='g++' CGO_ENABLED='1' GOMOD='/syzkaller/jobs/linux/gopath/src/github.com/google/syzkaller/go.mod' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build10930050=/tmp/go-build -gno-record-gcc-switches' git status (err=<nil>) HEAD detached at 4dfba2774 nothing to commit, working tree clean tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified Makefile:31: run command via tools/syz-env for best compatibility, see: Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen go: error obtaining buildID for go tool compile: fork/exec /syzkaller/jobs/linux/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.1.linux-amd64/pkg/tool/linux_amd64/compile: resource temporarily unavailable error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping. make: *** [Makefile:147: descriptions] Error 1 Tested on: commit: [unknown git tree: upstream kernel config: https://syzkaller.appspot.com/x/.config?x=5606b6814de0f638 dashboard link: https://syzkaller.appspot.com/bug?extid=00a022dc9979d67df050 compiler: userspace arch: arm64 patch: https://syzkaller.appspot.com/x/patch.diff?x=174836e8580000 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [kernel?] WARNING in enqueue_dl_entity 2024-11-22 22:48 ` syzbot 2024-11-23 2:10 ` Hillf Danton @ 2024-12-13 11:03 ` Hillf Danton 2024-12-13 11:32 ` syzbot 1 sibling, 1 reply; 6+ messages in thread From: Hillf Danton @ 2024-12-13 11:03 UTC (permalink / raw) To: syzbot; +Cc: linux-kernel, syzkaller-bugs On Fri, 22 Nov 2024 14:48:23 -0800 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 28eb75e178d3 Merge tag 'drm-next-2024-11-21' of https://gi.. > git tree: upstream > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1016fec0580000 Test fix (https://lore.kernel.org/lkml/20241213032244.877029-1-vineeth@bitbyteword.org/ ) #syz test upstream master diff -pur x/include/linux/sched.h y/include/linux/sched.h --- x/include/linux/sched.h 2024-12-13 18:53:21.592682100 +0800 +++ y/include/linux/sched.h 2024-12-13 18:55:17.754180400 +0800 @@ -656,6 +656,12 @@ struct sched_dl_entity { * @dl_defer_armed tells if the deferrable server is waiting * for the replenishment timer to activate it. * + * @dl_server_active tells if the dlserver is active(started). + * dlserver is started on first cfs enqueue on an idle runqueue + * and is stopped when a dequeue results in 0 cfs tasks on the + * runqueue. In other words, dlserver is active only when cpu's + * runqueue has atleast one cfs task. + * * @dl_defer_running tells if the deferrable server is actually * running, skipping the defer phase. */ @@ -664,6 +670,7 @@ struct sched_dl_entity { unsigned int dl_non_contending : 1; unsigned int dl_overrun : 1; unsigned int dl_server : 1; + unsigned int dl_server_active : 1; unsigned int dl_defer : 1; unsigned int dl_defer_armed : 1; unsigned int dl_defer_running : 1; diff -pur x/kernel/sched/deadline.c y/kernel/sched/deadline.c --- x/kernel/sched/deadline.c 2024-12-13 18:51:17.093081100 +0800 +++ y/kernel/sched/deadline.c 2024-12-13 18:55:17.770211500 +0800 @@ -1647,6 +1647,7 @@ void dl_server_start(struct sched_dl_ent if (!dl_se->dl_runtime) return; + dl_se->dl_server_active = 1; enqueue_dl_entity(dl_se, ENQUEUE_WAKEUP); if (!dl_task(dl_se->rq->curr) || dl_entity_preempt(dl_se, &rq->curr->dl)) resched_curr(dl_se->rq); @@ -1661,6 +1662,7 @@ void dl_server_stop(struct sched_dl_enti hrtimer_try_to_cancel(&dl_se->dl_timer); dl_se->dl_defer_armed = 0; dl_se->dl_throttled = 0; + dl_se->dl_server_active = 0; } void dl_server_init(struct sched_dl_entity *dl_se, struct rq *rq, @@ -2421,8 +2423,10 @@ again: if (dl_server(dl_se)) { p = dl_se->server_pick_task(dl_se); if (!p) { - dl_se->dl_yielded = 1; - update_curr_dl_se(rq, dl_se, 0); + if (dl_server_active(dl_se)) { + dl_se->dl_yielded = 1; + update_curr_dl_se(rq, dl_se, 0); + } goto again; } rq->dl_server = dl_se; diff -pur x/kernel/sched/fair.c y/kernel/sched/fair.c --- x/kernel/sched/fair.c 2024-12-13 18:50:13.649803300 +0800 +++ y/kernel/sched/fair.c 2024-12-13 18:56:11.779225700 +0800 @@ -1159,8 +1159,6 @@ static inline void update_curr_task(stru trace_sched_stat_runtime(p, delta_exec); account_group_exec_runtime(p, delta_exec); cgroup_account_cputime(p, delta_exec); - if (p->dl_server) - dl_server_update(p->dl_server, delta_exec); } static inline bool did_preempt_short(struct cfs_rq *cfs_rq, struct sched_entity *curr) @@ -1237,11 +1235,16 @@ static void update_curr(struct cfs_rq *c update_curr_task(p, delta_exec); /* - * Any fair task that runs outside of fair_server should - * account against fair_server such that it can account for - * this time and possibly avoid running this period. + * If the fair_server is active, we need to account for the + * fair_server time whether or not the task is running on + * behalf of fair_server or not: + * - If the task is running on behalf of fair_server, we need + * to limit its time based on the assigned runtime. + * - Fair task that runs outside of fair_server should account + * against fair_server such that it can account for this time + * and possibly avoid running this period. */ - if (p->dl_server != &rq->fair_server) + if (dl_server_active(&rq->fair_server)) dl_server_update(&rq->fair_server, delta_exec); } diff -pur x/kernel/sched/sched.h y/kernel/sched/sched.h --- x/kernel/sched/sched.h 2024-12-13 18:50:42.985005300 +0800 +++ y/kernel/sched/sched.h 2024-12-13 18:55:17.801793100 +0800 @@ -398,6 +398,11 @@ extern void __dl_server_attach_root(stru extern int dl_server_apply_params(struct sched_dl_entity *dl_se, u64 runtime, u64 period, bool init); +static inline bool dl_server_active(struct sched_dl_entity *dl_se) +{ + return dl_se->dl_server_active; +} + #ifdef CONFIG_CGROUP_SCHED extern struct list_head task_groups; -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [syzbot] [kernel?] WARNING in enqueue_dl_entity 2024-12-13 11:03 ` Hillf Danton @ 2024-12-13 11:32 ` syzbot 0 siblings, 0 replies; 6+ messages in thread From: syzbot @ 2024-12-13 11:32 UTC (permalink / raw) To: hdanton, linux-kernel, syzkaller-bugs Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-by: syzbot+00a022dc9979d67df050@syzkaller.appspotmail.com Tested-by: syzbot+00a022dc9979d67df050@syzkaller.appspotmail.com Tested on: commit: f932fb9b Merge tag 'v6.13-rc2-ksmbd-server-fixes' of g.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14a12d44580000 kernel config: https://syzkaller.appspot.com/x/.config?x=a42226445f75136a dashboard link: https://syzkaller.appspot.com/bug?extid=00a022dc9979d67df050 compiler: aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: arm64 patch: https://syzkaller.appspot.com/x/patch.diff?x=1567c4f8580000 Note: testing is done by a robot and is best-effort only. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-13 11:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-09-28 17:15 [syzbot] [kernel?] WARNING in enqueue_dl_entity syzbot 2024-11-22 22:48 ` syzbot 2024-11-23 2:10 ` Hillf Danton 2024-11-23 2:12 ` syzbot 2024-12-13 11:03 ` Hillf Danton 2024-12-13 11:32 ` syzbot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox