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

Getting Started - process getting killed #10

Closed
CharithYMendis opened this issue Feb 7, 2020 · 5 comments
Closed

Getting Started - process getting killed #10

CharithYMendis opened this issue Feb 7, 2020 · 5 comments

Comments

@CharithYMendis
Copy link

CharithYMendis commented Feb 7, 2020

I am trying to setup nanoBench and use the kernel space implementation on a Haswell machine.

I built the code for the driver and installed it. However, when I run the example the process gets killed.

sudo ./kernel-nanoBench.sh -asm "ADD RAX, RBX; add RBX, RAX" -config configs/cfg_Haswell_common.txt ./kernel-nanoBench.sh: line 122: 21457 Killed $taskset cat /proc/nanoBench

@andreas-abel
Copy link
Owner

Which OS/kernel are you using?

Can you post the output of dmesg?

@CharithYMendis
Copy link
Author

CharithYMendis commented Feb 7, 2020

OS/kernel

Linux 4.4.0-148-generic #174~14.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

dmesg

[  549.285212] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  549.285378] IP: [<ffff882014800154>] 0xffff882014800154
[  549.285487] PGD 80000000359b3067 PUD 359b4067 PMD 0
[  549.285687] Oops: 0002 [#1] SMP
[  549.285837] Modules linked in: nb(OE) nfsv3 ipmi_devintf ip6table_filter ip6_tables iptable_filter ip_tables x_tables openafs(POE) autofs4 nvidia_uvm(OE) nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) ipmi_ssif intel_rapl x86_pkg_temp_thermal bnep intel_powerclamp coretemp rfcomm kvm_intel bluetooth kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel joydev input_leds cryptd ttm drm_kms_helper drm fb_sys_fops syscopyarea sysfillrect sysimgblt sb_edac edac_core nfsd mei_me ioatdma shpchp mei lpc_ich auth_rpcgss nfs_acl wmi nfs lockd grace binfmt_misc sunrpc fscache mlx5_ib mlx4_ib ipmi_si 8250_fintek ipmi_msghandler mlx4_en vxlan ip6_udp_tunnel udp_tunnel mlx4_core ib_srp scsi_transport_srp ib_ipoib acpi_pad acpi_power_meter mac_hid ib_umad rdma_ucm rdma_cm iw_cm ib_uverbs ib_cm ib_sa ib_mad ib_core ib_addr hid_generic mlx5_core igb usbhid i2c_algo_bit ahci dca hid libahci ptp pps_core fjes [last unloaded: msr]
[  549.290600] CPU: 24 PID: 2855 Comm: cat Tainted: P           OE   4.4.0-148-generic #174~14.04.1-Ubuntu
[  549.290671] Hardware name: Supermicro SYS-1028GR-TR/X10DRG-H, BIOS 1.0c 05/20/2015
[  549.290738] task: ffff880035c76200 ti: ffff8800360d0000 task.ti: ffff8800360d0000
[  549.290822] RIP: 0010:[<ffff882014800154>]  [<ffff882014800154>] 0xffff882014800154
[  549.290973] RSP: 0018:ffffc9000dd95000  EFLAGS: 00010082
[  549.291052] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  549.291135] RDX: 0000000000000000 RSI: ffffc9000dc94000 RDI: ffffc9000da7e000
[  549.291216] RBP: ffffc9000d97d000 R08: 0000000000000000 R09: 0000000000000000
[  549.291298] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  549.291380] R13: 0000000000000000 R14: ffffc9000d87c000 R15: 0000000000000000
[  549.291463] FS:  00007fcd8544b740(0000) GS:ffff88103fb00000(0000) knlGS:0000000000000000
[  549.291565] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  549.291644] CR2: 0000000000000000 CR3: 0000000074e4c000 CR4: 0000000000160670
[  549.291727] Stack:
[  549.291799]  2bfb0769a37930ed d9f2d2187f695cf4 6608ba1bcdfd8b9b c91c428ccc92e2d4
[  549.292087]  56e165874f8cdfe7 3aa3acbe97d732e6 e7b87febb7aedf5f ace53722bb6b9da8
[  549.292376]  bd10c7462c766aa9 d1c7497af6056ed5 ee88c304fa7e933c a24bd133228e3be2
[  549.292665] Call Trace:
[  549.292738]  <UNK>
[  549.292790] Code: c1 e2 20 48 09 c2 49 29 57 10 0f ae e8 41 5f 0f ae e8 5a 0f ae e8 59 0f ae e8 58 0f ae e8 3c 81 0f ae e8 9e 0f ae e8 58 0f ae e8 <00> 00 37 1b 20 88 00 00 37 1b 20 88 00 00 37 1b 20 88 00 00 37
[  549.296050] RIP  [<ffff882014800154>] 0xffff882014800154
[  549.296175]  RSP <ffffc9000dd95000>```

@andreas-abel
Copy link
Owner

Can you also post the dmesg output you get when loading the kernel module? Normally, it should be something like this:

[  107.703159] Initializing nanoBench kernel module...
[  107.703160] Vendor ID: GenuineIntel
[  107.703162] Brand: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz
[  107.703163] DisplayFamily_DisplayModel: 06_3CH
[  107.703163] Stepping ID: 3
[  107.703163] Performance monitoring version: 3
[  107.703164] Number of general-purpose performance counters: 8
[  107.703164] Bit widths of general-purpose performance counters: 48

@CharithYMendis
Copy link
Author

[  444.369938] Initializing nanoBench kernel module...
[  444.369944] Vendor ID: GenuineIntel
[  444.369950] Brand: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
[  444.369953] DisplayFamily_DisplayModel: 06_3FH
[  444.369955] Stepping ID: 2
[  444.369958] Performance monitoring version: 3
[  444.369960] Number of general-purpose performance counters: 4
[  444.369963] Bit widths of general-purpose performance counters: 48
[  490.387103] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[  531.507980] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[  549.285212] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  549.285378] IP: [<ffff882014800154>] 0xffff882014800154
[  549.285487] PGD 80000000359b3067 PUD 359b4067 PMD 0
[  549.285687] Oops: 0002 [#1] SMP

From here on it is what posted before.

@andreas-abel
Copy link
Owner

I cannot reproduce the problem. I just tested it with a 4.4.0 kernel and it's working fine for me. Maybe you are using some non-default kernel option, or there is an incompatibility with some other kernel module. I would suggest booting from a flash drive with Ubuntu 18.04 and trying again in that environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants