New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 903998 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocking:
issue 871915



Sign in to add a comment

Kernel 3.8: panic when CONFIG_DEBUG_ATOMIC_SLEEP is enabled

Project Member Reported by gwendal@chromium.org, Nov 9

Issue description

Kernel crash at boot when CONFIG_DEBUG_ATOMIC_SLEEP is set.

[   12.924460] BUG: sleeping function called from invalid context at /mnt/host/source/src/third_party/kernel/v3.8/mm/slub.c:925


[   12.945608] Backtrace:
[   12.947833] [<c01f4a98>] (unwind_backtrace+0x0/0x110) from [<c0750b34>] (dump_stack+0x28/0x30)
[   12.956453] [<c0750b34>] (dump_stack+0x28/0x30) from [<c023ae4c>] (__might_sleep+0x1d4/0x218)
[   12.964977] [<c023ae4c>] (__might_sleep+0x1d4/0x218) from [<c01590dc>] (__kmalloc_track_caller+0xd8/0xc78)
[   12.974578] [<c01590dc>] (__kmalloc_track_caller+0xd8/0xc78) from [<c02c3c30>] (krealloc+0x64/0x9c)
[   12.983694] [<c02c3c30>] (krealloc+0x64/0x9c) from [<c04ca6c0>] (reservation_object_get_fences_rcu+0x15c/0x420)
[   12.993662] [<c04ca6c0>] (reservation_object_get_fences_rcu+0x15c/0x420) from [<c04a2b9c>] (kbase_dma_fence_add_reservation_callback+0x50/0x1b4)
[   13.006614] [<c04a2b9c>] (kbase_dma_fence_add_reservation_callback+0x50/0x1b4) from [<c04a33b8>] (kbase_dma_fence_wait+0x364/0x5a8)
[   13.018421] [<c04a33b8>] (kbase_dma_fence_wait+0x364/0x5a8) from [<c04860f4>] (jd_submit_atom+0x7b4/0x9c0)
[   13.028016] [<c04860f4>] (jd_submit_atom+0x7b4/0x9c0) from [<c048651c>] (kbase_jd_submit+0x21c/0x294)
[   13.037220] [<c048651c>] (kbase_jd_submit+0x21c/0x294) from [<c0498f54>] (kbase_ioctl+0x3dc/0x1860)
[   13.046240] [<c0498f54>] (kbase_ioctl+0x3dc/0x1860) from [<c0168834>] (sys_ioctl+0x4b8/0x5ec)
[   13.054735] [<c0168834>] (sys_ioctl+0x4b8/0x5ec) from [<c01ed938>] (__sys_trace_return+0x0/0x28)

 
screen-exchange
14.4 KB View Download
Summary: Kernel 3.8: panic when CONFIG_DEBUG_ATOMIC_SLEEP is enabled (was: Kernel 3.8: )
Blocking: 871915
Cc: marc...@chromium.org hoegsberg@chromium.org diand...@chromium.org
Components: -OS>Kernel OS>Kernel>Graphics
Labels: Kernel-3.8
That looks like Mali code.
Cc: dbehr@chromium.org
Owner: dbehr@chromium.org
Cc: tfiga@chromium.org
Cc: dbehr@google.com
Cc: -dbehr@google.com
Could you guys try https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1336647 ?
I am still compiling my tree so it will be a while till I can try it myself but I think it should help.

When I backported reservation stuff to our kernel 3.8 it was still unfinished so it looks like we have missed some fixes from final upstream versions.
The patch prevents the panic to happen.
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 20

Labels: merge-merged-chromeos-3.8
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ec5de0b8b45bd7606326b4cc23eb65b05cc61ec8

commit ec5de0b8b45bd7606326b4cc23eb65b05cc61ec8
Author: Dominik Behr <dbehr@chromium.org>
Date: Tue Nov 20 07:43:53 2018

FIXUP: reservation: add suppport for read-only access using rcu

We had an older, unfinished version of this patch. This fixup
is a diff to final upstream commit 3c3b177a9369b26890ced004867fb32708e8ef5b
that fixed krealloc called from atomic context.

BUG=chromium:903998
TEST=boot kernel 3.8 with CONFIG_DEBUG_ATOMIC_SLEEP enabled

Change-Id: I6ced06d99c1227d8a23cdf33dc90cdf2120371dc
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1336647
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/ec5de0b8b45bd7606326b4cc23eb65b05cc61ec8/drivers/base/reservation.c

Status: Assigned (was: Untriaged)
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this.

Sign in to add a comment