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

Issue 643260 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

CPU stall leading to reboot after calling perf_event_open() on Pixel C

Project Member Reported by glider@chromium.org, Sep 1 2016

Issue description

The following program:

#include <linux/perf_event.h>
#include <sys/syscall.h>
#include <unistd.h>

#ifndef __NR_perf_event_open
#define __NR_perf_event_open 298
#endif


int main()
{
  struct perf_event_attr *attr = mmap(0, 0x1000, 0x3, 0x32, -1, 0);
  //memset(attr, 0, sizeof(struct perf_event_attr));
  //attr->size = 0x78;
  attr->sample_freq = 0x7;
  attr->sample_type = 0x7ff;
  syscall(__NR_perf_event_open, attr, 0x0ul, -1, -1,
                          0x3, 0, 0, 0, 0);
  return 0;
}


 causes a soft lockup error on Pixel C (see the full log attached):

[  101.828138] sdhci: ===========================================
[  116.270112] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [stall:2140]
[  116.277354] irq event stamp: 0
[  116.280413] hardirqs last  enabled at (0): [<          (null)>]           (null)
[  116.287825] hardirqs last disabled at (0): [<ffffffc000228c94>] copy_process.part.51+0x7a4/0x2668
[  116.296733] softirqs last  enabled at (0): [<ffffffc000228c94>] copy_process.part.51+0x7a4/0x2668
[  116.305625] softirqs last disabled at (0): [<          (null)>]           (null)
[  116.313032] 
[  116.314541] CPU: 0 PID: 2140 Comm: stall Tainted: G     U         3.18.0 #89
[  116.321588] Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT)
[  116.327426] task: ffffffc036df82c0 ti: ffffffc036dfc000 task.ti: ffffffc036dfc000
[  116.334913] PC is at __do_softirq+0x14c/0x824
[  116.339277] LR is at __do_softirq+0x148/0x824
[  116.343639] pc : [<ffffffc000200844>] lr : [<ffffffc000200840>] pstate: 20000145
[  116.351029] sp : ffffffc036dff9f0
...
[  117.957883] Kernel panic - not syncing: softlockup: hung tasks
[  117.963725] CPU: 0 PID: 2140 Comm: stall Tainted: G     U       L 3.18.0 #89
[  117.970774] Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT)
[  117.976607] Call trace:
[  117.979076] [<ffffffc00020b064>] dump_backtrace+0x0/0x17c
[  117.984486] [<ffffffc00020b1f8>] show_stack+0x18/0x24
[  117.989548] [<ffffffc00118b540>] dump_stack+0x94/0x100
[  117.994698] [<ffffffc001188e94>] panic+0x124/0x2c0
[  117.999502] [<ffffffc00031eb50>] watchdog_timer_fn+0x4d4/0x590
[  118.005348] [<ffffffc0002cc4c4>] __run_hrtimer+0x460/0xac4
[  118.010846] [<ffffffc0002ce508>] hrtimer_interrupt+0x1d4/0x368
[  118.016692] [<ffffffc000d10f80>] tegra210_timer_isr+0x40/0x54
[  118.022449] [<ffffffc0002b0170>] handle_irq_event_percpu+0x1f4/0x778
[  118.028810] [<ffffffc0002b075c>] handle_irq_event+0x68/0xa0
[  118.034393] [<ffffffc0002b53b8>] handle_fasteoi_irq+0x134/0x224
[  118.040319] [<ffffffc0002af4b4>] generic_handle_irq+0x40/0x60
[  118.046073] [<ffffffc0002af5b0>] __handle_domain_irq+0xdc/0x12c
[  118.051999] [<ffffffc0002005cc>] gic_handle_irq+0x60/0xa4
[  118.057403] Exception stack(0xffffffc036dff8a0 to 0xffffffc036dff9c0)

 
dmesg-from-pixel.txt
43.5 KB View Download
Components: OS>Kernel

Sign in to add a comment