Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel panics during emerge of gentoo-sources
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
SDubb
n00b
n00b


Joined: 06 Dec 2016
Posts: 7

PostPosted: Wed Feb 08, 2017 9:52 pm    Post subject: Kernel panics during emerge of gentoo-sources Reply with quote

I imagine I have totally messed something up somewhere; but I could use a hand figuring out exactly where.
I am trying to emerge gentoo-sources to setup a crash kernel since CONFIG_PROC_VMCORE depends on !CONFIG_GRKERNSEC.
It consistently dies on the extracting step:
Code:
server ~ $ emerge -av gentoo-sources

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-kernel/gentoo-sources-4.9.6-r1:4.9.6-r1::gentoo  USE="-build -experimental -symlink" 91,236 KiB

Total: 1 package (1 new), Size of downloads: 91,236 KiB

Would you like to merge these packages? [Yes/No] Yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) sys-kernel/gentoo-sources-4.9.6-r1::gentoo
>>> Downloading 'ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/linux-4.9.tar.xz'
pathconf: Permission denied
--2017-02-08 15:44:16--  ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/linux-4.9.tar.xz
           => ‘/usr/portage/distfiles/linux-4.9.tar.xz’
Resolving ftp.ussg.iu.edu... 156.56.247.193
Connecting to ftp.ussg.iu.edu|156.56.247.193|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/linux/gentoo/distfiles ... done.
==> SIZE linux-4.9.tar.xz ... 93192404
==> PASV ... done.    ==> RETR linux-4.9.tar.xz ... done.
Length: 93192404 (89M) (unauthoritative)

linux-4.9.tar.xz    100%[===================>]  88.88M  10.7MB/s    in 8.6s

2017-02-08 15:44:26 (10.4 MB/s) - ‘/usr/portage/distfiles/linux-4.9.tar.xz’ saved [93192404]

 * linux-4.9.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                             [ ok ]
>>> Downloading 'ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/genpatches-4.9-8.base.tar.xz'
pathconf: Permission denied
--2017-02-08 15:44:28--  ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/genpatches-4.9-8.base.tar.xz
           => ‘/usr/portage/distfiles/genpatches-4.9-8.base.tar.xz’
Resolving ftp.ussg.iu.edu... 156.56.247.193
Connecting to ftp.ussg.iu.edu|156.56.247.193|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/linux/gentoo/distfiles ... done.
==> SIZE genpatches-4.9-8.base.tar.xz ... 215420
==> PASV ... done.    ==> RETR genpatches-4.9-8.base.tar.xz ... done.
Length: 215420 (210K) (unauthoritative)

genpatches-4.9-8.ba 100%[===================>] 210.37K  1.08MB/s    in 0.2s

2017-02-08 15:44:28 (1.08 MB/s) - ‘/usr/portage/distfiles/genpatches-4.9-8.base.tar.xz’ saved [215420]

 * genpatches-4.9-8.base.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                 [ ok ]
>>> Downloading 'ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/genpatches-4.9-8.extras.tar.xz'
pathconf: Permission denied
--2017-02-08 15:44:28--  ftp://ftp.ussg.iu.edu/pub/linux/gentoo/distfiles/genpatches-4.9-8.extras.tar.xz
           => ‘/usr/portage/distfiles/genpatches-4.9-8.extras.tar.xz’
Resolving ftp.ussg.iu.edu... 156.56.247.193
Connecting to ftp.ussg.iu.edu|156.56.247.193|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/linux/gentoo/distfiles ... done.
==> SIZE genpatches-4.9-8.extras.tar.xz ... 17300
==> PASV ... done.    ==> RETR genpatches-4.9-8.extras.tar.xz ... done.
Length: 17300 (17K) (unauthoritative)

genpatches-4.9-8.ex 100%[===================>]  16.89K  --.-KB/s    in 0.06s

2017-02-08 15:44:29 (295 KB/s) - ‘/usr/portage/distfiles/genpatches-4.9-8.extras.tar.xz’ saved [17300]

 * genpatches-4.9-8.extras.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                               [ ok ]
>>> Preparing to unpack ...
>>> Unpacking source...
>>> Unpacking linux-4.9.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-4.9.6-r1/work
 * The ebuild phase 'unpack' has been killed by signal 9.

For the two most recent trys, I was monitoring dmesg:
Code:
[  158.580619] PAX: From 172.16.36.1: refcount overflow detected in: tar:6846, uid/euid: 250/250
[  158.589183] ------------[ cut here ]------------
[  158.593818] kernel BUG at fs/exec.c:2189!
[  158.597851] PAX: overwritten function pointer or return address detected: 0000 [#1] SMP
[  158.605876] Modules linked in: dm_mod uvcvideo kvm_amd kvm irqbypass videobuf2_vmalloc aesni_intel aes_x86_64 videobuf2_memops lrw gf128mul glue_helper videobuf2_v4l2 videobuf2_core ablk_helper cryptd videodev cdc_acm k10temp e1000e
[  158.627376] CPU: 0 PID: 6846 Comm: tar Not tainted 4.7.10-hardened #7
[  158.633835] Hardware name: System manufacturer System Product Name/F2A85-V PRO, BIOS 6104 05/08/2013
[  158.643080] task: ffff8800650e1400 ti: ffff8800650e1dc8 task.ti: ffff8800650e1dc8
[  158.650673] RIP: 0010:[<ffffffff811c693f>]  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[  158.660213] RSP: 0018:ffff88042766b8f0  EFLAGS: 00010283
[  158.665591] RAX: 0000000000000051 RBX: ffff8800650e1400 RCX: 0000000000000000
[  158.672795] RDX: 0000000000000051 RSI: ffff88045ec0ba08 RDI: ffff88045ec0ba08
[  158.679997] RBP: ffff88042766b900 R08: 0000000000000000 R09: ffffffff81554180
[  158.687203] R10: ffffffff8145a827 R11: 00000000000004df R12: 00000000000000fa
kern  :emerg :  R13: ffffffff81dded36 R14: 0000000000000001 R15: ffff8800650e1400
[32m[Wed Feb  8 [  158.687206] FS:  0000038740e12700(0000) GS:ffff88045ec00000(0000) knlGS:0000000000000000
10:08:35 2017 < [  158.687206] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  67.123027>]   158.687207] CR2: 0000038740d9d000 CR3: 0000000001e94000 CR4: 00000000000406f0
0mPAX: [  158.687207] Stack:
From 172.16.36.1[  158.687209]  0000000000000004 ffff88042766ba38 ffff88042766b950 ffffffff8101916d
: refcount overf[  158.687211]  ffffffff81dded36 0000000000000000 0000000b00000004 0000000000000004
low detected in:[  158.687220]  ffff88042766ba38 000000000000000b ffffffff81dded36 0000000000000000
 tar:6846, uid/e[  158.687222] Call Trace:
uid: 250/250
ke[  158.687230]  [<ffffffff8101916d>] do_trap+0xad/0x180
rn  :warn  :   158.687235]  [<ffffffff810192c5>] do_error_trap+0x85/0x110
2m[Wed Feb  8 10[  158.687242]  [<ffffffff810195ff>] do_overflow+0x2f/0x50
:08:35 2017 <   [  158.687247]  [<ffffffff81a1e968>] overflow+0x18/0x20
 0.008564>] [  158.687254]  [<ffffffff8145a827>] ? ulist_add_merge+0x57/0x140
------------[  158.687258]  [<ffffffff8145f14b>] ? btrfs_qgroup_reserve_meta+0x8b/0xa0
[  158.687263]  [<ffffffff813eb3a2>] start_transaction+0x372/0x4e0
[  158.687268]  [<ffffffff813ec1a9>] ? btrfs_permission+0x49/0x90
[  158.687272]  [<ffffffff813eb535>] btrfs_start_transaction+0x25/0x40
[  158.687275]  [<ffffffff813fcef1>] btrfs_create+0x41/0x200
[  158.687280]  [<ffffffff814e6c58>] ? gr_acl_handle_creat+0x88/0x190
[  158.687285]  [<ffffffff811cf5a4>] path_openat+0x1654/0x17a0
[  158.687292]  [<ffffffff811d0c94>] do_filp_open+0xb4/0x130
[  158.687301]  [<ffffffff811b9231>] do_sys_open+0x121/0x2a0
[  158.687309]  [<ffffffff811b9441>] sys_openat+0x31/0x60
[  158.687313]  [<ffffffff81a1d1a4>] entry_SYSCALL_64_fastpath+0x13/0xa3
[  158.687384] Code: 07 00 00 8b 8b 68 04 00 00 48 8d 93 00 06 00 00 41 89 c0 45 89 e1 48 c7 c7 58 73 de 81 31 c0 48 81 c6 e0 03 00 00 e8 fe 61 f8 ff <0f> 0b e8 8a 86 f3 ff 41 89 c4 48 8b 83 78 08 00 00 48 c7 c7 40
[  158.687393] RIP  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[  158.687393]  RSP <ffff88042766b8f0>
[  158.687452] ---[ end trace 0bc553ef1cf93aff ]---
[  158.687454] grsec: banning user with uid 250 until system restart for suspicious kernel crash
[  158.801957] PAX: From 172.16.36.1: refcount overflow detected in: misc-functions.:6854, uid/euid: 0/0
[  158.801968] ------------[ cut here ]------------
[  158.801969] kernel BUG at fs/exec.c:2189!
[  158.801970] PAX: overwritten function pointer or return address detected: 0000 [#2] SMP
[  158.801977] Modules linked in: dm_mod uvcvideo kvm_amd kvm irqbypass videobuf2_vmalloc aesni_intel aes_x86_64 videobuf2_memops lrw gf128mul glue_helper videobuf2_v4l2 videobuf2_core ablk_helper cryptd videodev cdc_acm k10temp e1000e
[  158.801979] CPU: 0 PID: 6854 Comm: misc-functions. Tainted: G      D         4.7.10-hardened #7
[  158.801980] Hardware name: System manufacturer System Product Name/F2A85-V PRO, BIOS 6104 05/08/2013
[  158.801981] task: ffff88043726da00 ti: ffff88043726e3c8 task.ti: ffff88043726e3c8
[  158.801986] RIP: 0010:[<ffffffff811c693f>]  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[  158.801987] RSP: 0018:ffff88042772f8b0  EFLAGS: 00010287
[  158.801987] RAX: 0000000000000059 RBX: ffff88043726da00 RCX: 0000000000000000
[  158.801988] RDX: 0000000000000059 RSI: 0000000000000286 RDI: ffffffff8201e930
[  158.801988] RBP: ffff88042772f8c0 R08: 0000002d73aa5d70 R09: ffffffff829fe2e9
[  158.801989] R10: ffffffff8145a827 R11: 0000000000000000 R12: 0000000000000000
[  158.801990] R13: ffffffff81dded36 R14: 0000000000000001 R15: ffff88043726da00
[  158.801991] FS:  0000033d523c7700(0000) GS:ffff88045ec00000(0000) knlGS:0000000000000000
[  158.801991] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  158.801992] CR2: 0000033d5235a000 CR3: 0000000001e94000 CR4: 00000000000406f0
[  158.801992] Stack:
[  158.801994]  0000000000000004 ffff88042772f9f8 ffff88042772f910 ffffffff8101916d
[  158.801995]  ffffffff81dded36 0000000000000000 0000000b00000004 0000000000000004
[  158.801996]  ffff88042772f9f8 000000000000000b ffffffff81dded36 0000000000000000
[  158.801996] Call Trace:
[  158.802000]  [<ffffffff8101916d>] do_trap+0xad/0x180
[  158.802001]  [<ffffffff810192c5>] do_error_trap+0x85/0x110
[  158.802003]  [<ffffffff811a8cb4>] ? __slab_free+0xa4/0x270
[  158.802005]  [<ffffffff810195ff>] do_overflow+0x2f/0x50
[  158.802007]  [<ffffffff81a1e968>] overflow+0x18/0x20
[  158.802010]  [<ffffffff8145a827>] ? ulist_add_merge+0x57/0x140
[  158.802011]  [<ffffffff8145f14b>] ? btrfs_qgroup_reserve_meta+0x8b/0xa0
[  158.802013]  [<ffffffff813eb3a2>] start_transaction+0x372/0x4e0
[  158.802015]  [<ffffffff8106bc6b>] ? capable_wrt_inode_uidgid+0x6b/0x90
[  158.802016]  [<ffffffff813eb535>] btrfs_start_transaction+0x25/0x40
[  158.802018]  [<ffffffff813fcef1>] btrfs_create+0x41/0x200
[  158.802020]  [<ffffffff814e6c58>] ? gr_acl_handle_creat+0x88/0x190
[  158.802022]  [<ffffffff811cf5a4>] path_openat+0x1654/0x17a0
[  158.802024]  [<ffffffff811d0c94>] do_filp_open+0xb4/0x130
[  158.802026]  [<ffffffff811b9231>] do_sys_open+0x121/0x2a0
[  158.802028]  [<ffffffff811b93e2>] sys_open+0x32/0x60
[  158.802029]  [<ffffffff81a1d1a4>] entry_SYSCALL_64_fastpath+0x13/0xa3
[  158.802030]  [<ffffffff81a1d1cb>] ? entry_SYSCALL_64_fastpath+0x3a/0xa3
[  158.802050] Code: 07 00 00 8b 8b 68 04 00 00 48 8d 93 00 06 00 00 41 89 c0 45 89 e1 48 c7 c7 58 73 de 81 31 c0 48 81 c6 e0 03 00 00 e8 fe 61 f8 ff <0f> 0b e8 8a 86 f3 ff 41 89 c4 48 8b 83 78 08 00 00 48 c7 c7 40
[  158.802051] RIP  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[  158.802052]  RSP <ffff88042772f8b0>
[  158.802053] ---[ end trace 0bc553ef1cf93b00 ]---
[  158.802054] Kernel panic - not syncing: grsec: halting the system due to suspicious kernel crash caused by root
[  158.803179] Kernel Offset: disabled
[  159.231036] Rebooting in 5 seconds..
[  164.309964] ACPI MEMORY or I/O RESET_REG.

Code:
[ 3970.931389] PAX: From 172.16.36.1: refcount overflow detected in: tar:10167, uid/euid: 250/250
[ 3970.940038] ------------[ cut here ]------------
[ 3970.944677] kernel BUG at fs/exec.c:2189!
[ 3970.948707] PAX: overwritten function pointer or return address detected: 0000 [#1] SMP
[ 3970.956725] Modules linked in: dm_mod kvm_amd kvm irqbypass aesni_intel aes_x86_64 lrw gf128mul uvcvideo glue_helper ablk_helper videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core cryptd videodev k10temp e1000e cdc_acm
[ 3970.978225] CPU: 1 PID: 10167 Comm: tar Not tainted 4.7.10-hardened #7
[ 3970.984772] Hardware name: System manufacturer System Product Name/F2A85-V PRO, BIOS 6104 05/08/2013
[ 3970.994020] task: ffff88044ae28a00 ti: ffff88044ae293c8 task.ti: ffff88044ae293c8
[ 3971.001621] RIP: 0010:[<ffffffff811c693f>]  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[ 3971.011180] RSP: 0018:ffff8800630f3a60  EFLAGS: 00010283
[ 3971.016565] RAX: 0000000000000052 RBX: ffff88044ae28a00 RCX: 0000000000000000
[ 3971.023767] RDX: 0000000000000052 RSI: ffff88045ec8ba08 RDI: ffff88045ec8ba08
[ 3971.030970] RBP: ffff8800630f3a70 R08: 0000000000000000 R09: ffffffff81554180
[ 3971.038172] R10: ffffffff8145a827 R11: 0000000000000536 R12: 00000000000000fa
[ 3971.045376] R13: ffffffff81dded36 R14: 0000000000000001 R15: ffff88044ae28a00
[ 3971.052579] FS:  0000038f5a311700(0000) GS:ffff88045ec80000(0000) knlGS:0000000000000000
[ 3971.060781] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3971.066600] CR2: 0000038f5a2aa000 CR3: 0000000001e96000 CR4: 00000000000406f0
[ 3971.073802] Stack:
[ 3971.075888]  0000000000000004 ffff8800630f3ba8 ffff8800630f3ac0 ffffffff8101916d
[ 3971.083566]  ffffffff81dded36 0000000000000000 0000000b00000004 0000000000000004
[ 3971.091243]  ffff8800630f3ba8 000000000000000b ffffffff81dded36 0000000000000000
[ 3971.098924] Call Trace:
[ 3971.101443]  [<ffffffff8101916d>] do_trap+0xad/0x180
[ 3971.106477]  [<ffffffff810192c5>] do_error_trap+0x85/0x110
[ 3971.112034]  [<ffffffff8140d74f>] ? insert_state+0xcf/0x140
[ 3971.117675]  [<ffffffff810195ff>] do_overflow+0x2f/0x50
[ 3971.122972]  [<ffffffff81a1e968>] overflow+0x18/0x20
[ 3971.128008]  [<ffffffff8145a827>] ? ulist_add_merge+0x57/0x140
[ 3971.133909]  [<ffffffff8145f14b>] ? btrfs_qgroup_reserve_meta+0x8b/0xa0
[ 3971.140591]  [<ffffffff813d4fa9>] btrfs_delalloc_reserve_metadata+0x139/0x4e0
[ 3971.150035]  [<ffffffff8140106c>] __btrfs_buffered_write+0x1dc/0x720
[ 3971.156460]  [<ffffffff814055bd>] btrfs_file_write_iter+0x19d/0x5d0
[ 3971.162797]  [<ffffffff811b9e2c>] __vfs_write+0x11c/0x190
[ 3971.168266]  [<ffffffff811bb210>] vfs_write+0xf0/0x280
[ 3971.173482]  [<ffffffff811bca20>] sys_write+0x50/0xc0
[ 3971.178604]  [<ffffffff81a1d1a4>] entry_SYSCALL_64_fastpath+0x13/0xa3
[ 3971.185113] Code: 07 00 00 8b 8b 68 04 00 00 48 8d 93 00 06 00 00 41 89 c0 45 89 e1 48 c7 c7 58 73 de 81 31 c0 48 81 c6 e0 03 00 00 e8 fe 61 f8 ff <0f> 0b e8 8a 86 f3 ff 41 89 c4 48 8b 83 78 08 00 00 48 c7 c7 40
[ 3971.206941] RIP  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[ 3971.214097]  RSP <ffff8800630f3a60>
[ 3971.217704] ---[ end trace e7fd7214fa858e21 ]---
[ 3971.233277] PAX: refcount overflow detected in: syslog-ng:9830, uid/euid: 0/0
[ 3971.241072] ------------[ cut here ]------------
3876.302428>]  3971.247057] kernel BUG at fs/exec.c:2189!
0mPAX: [ 3971.252495] PAX: overwritten function pointer or return address detected: 0000 [#2] SMP
From 172.16.36.1[ 3971.261994] Modules linked in:: refcount overf dm_modlow detected in: kvm_amd tar:10167, uid/ kvmeuid: 250/250
k irqbypassern  :warn  :  3971.273014] PAX: From 172.16.36.1: refcount overflow detected in: emerge:9806, uid/euid: 0/0
32m[Wed Feb  8 1
4:21:50 2017 <  [ 3971.284313]  aesni_intel  0.008649>] es_x86_64m----------- lrw-[ cut here ]--- gf128mul---------
k uvcvideoern  :crit  : lue_helper32m[Wed Feb  8 1 ablk_helper4:21:50 2017 <   videobuf2_vmalloc  0.004639>] ideobuf2_memopsmkernel videobuf2_v4l2 BUG at fs/exec. videobuf2_corec:2189!
ker cryptdn  :warn  : ideodevm[Wed Feb  8 14: k10temp21:50 2017 <     e1000e0.004030>] dc_acm[33mPAX:
 overwritten fun[ 3971.326496] CPU: 2 PID: 9830 Comm: syslog-ng Tainted: G      D         4.7.10-hardened #7
ction pointer or[ 3971.336116] Hardware name: System manufacturer System Product Name/F2A85-V PRO, BIOS 6104 05/08/2013
 return address [ 3971.346640] task: ffff88044b185a00 ti: ffff88044b1863c8 task.ti: ffff88044b1863c8
detected: 0000 [[ 3971.355512] RIP: 0010:[<ffffffff811c693f>] #1] SMP
ker [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
n  :warn  :  3971.367718] RSP: 0018:ffff88041b7138d0  EFLAGS: 00010283
m[Wed Feb  8 14:[ 3971.374376] RAX: 0000000000000041 RBX: ffff88044b185a00 RCX: 0000000000000000
21:50 2017 <    [ 3971.382905] RDX: 0000000000000041 RSI: ffff88045ed0ba08 RDI: ffff88045ed0ba08
0.008018>]  RBP: ffff88041b7138e0 R08: 0000000000000000 R09: 000000000000004f
[33mModules link[ 3971.399963] R10: ffffffff8145a827 R11: 0000000000000560 R12: 0000000000000000
ed in: d[ 3971.408491] R13: ffffffff81dded36 R14: 0000000000000001 R15: ffff88044b185a00
m_mod kvm_amd kv[ 3971.417036] FS:  0000033a8ff3a700(0000) GS:ffff88045ed00000(0000) knlGS:0000000000000000
m irqbypass aesn[ 3971.426558] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
i_intel aes_x86_[ 3971.433651] CR2: 0000033a78006158 CR3: 0000000001e98000 CR4: 00000000000406f0
64 lrw gf128mul [ 3971.442180] Stack:
uvcvideo glue_he[ 3971.445593]  0000000000000004lper ablk_helper ffff88041b713a18 videobuf2_vmall ffff88041b713930oc videobuf2_mem ffffffff8101916dops videobuf2_v4
l2 videobuf2_cor[ 3971.460053]  ffffffff81dded36e cryptd videode 0000000000000000v k10temp e1000e 0000000b00000004 cdc_acm
ke 0000000000000004rn  :warn  :
[Wed Feb  8 14[ 3971.474536]  ffff88041b713a18:21:50 2017 <    000000000000000b 0.021500>]  ffffffff81dded36CPU 0000000000000000: 1 PID: 10167 C
omm: tar Not tai[ 3971.489019] Call Trace:
nted 4.7.10-hard[ 3971.492873]  [<ffffffff8101916d>] do_trap+0xad/0x180
ened #7
ker[ 3971.499236]  [<ffffffff810192c5>] do_error_trap+0x85/0x110
n  :warn  :  3971.506135]  [<ffffffff8140d74f>] ? insert_state+0xcf/0x140
m[Wed Feb  8 14:[ 3971.513102]  [<ffffffff810195ff>] do_overflow+0x2f/0x50
21:50 2017 <    [ 3971.519742]  [<ffffffff81a1e968>] overflow+0x18/0x20
0.006547>]   [<ffffffff8145a827>] ? ulist_add_merge+0x57/0x140
[33mHardware nam[ 3971.533330]  [<ffffffff8145f14b>] ? btrfs_qgroup_reserve_meta+0x8b/0xa0
e: Syste[ 3971.541350]  [<ffffffff813d4fa9>] btrfs_delalloc_reserve_metadata+0x139/0x4e0
m manufacturer S[ 3971.549877]  [<ffffffff8140106c>] __btrfs_buffered_write+0x1dc/0x720
ystem Product Na[ 3971.557628]  [<ffffffff814055bd>] btrfs_file_write_iter+0x19d/0x5d0
me/F2A85-V PRO, [ 3971.565288]  [<ffffffff81405420>] ? btrfs_sync_file+0x530/0x530
BIOS 6104 05/08/[ 3971.572603]  [<ffffffff811ba465>] do_iter_readv_writev+0xc5/0x140
2013
kern  [ 3971.580091]  [<ffffffff811bb582>] do_readv_writev+0x1e2/0x2a0
:warn  : [W[ 3971.587230]  [<ffffffff81405420>] ? btrfs_sync_file+0x530/0x530
ed Feb  8 14:21:[ 3971.594548]  [<ffffffff811bb92e>] vfs_writev+0x5e/0xa0
50 2017 <    0.0[ 3971.601089]  [<ffffffff811bb9cd>] do_writev+0x5d/0x100
09248>]  3971.607627]  [<ffffffff811bd107>] sys_writev+0x27/0x40
mtask: f[ 3971.614161]  [<ffffffff81a1d1a4>] entry_SYSCALL_64_fastpath+0x13/0xa3
fff88044ae28a00 [ 3971.621993] Code: ti: ffff88044ae207 93c8 task.ti: ff00 ff88044ae293c8
kern  :warn 8b  : [Wed Feb8b   8 14:21:51 20168 7 <    0.007601>04 ] RIP: 0010:[<f48 8d fffffff811c693f>93 00 ]  [<ffffffff81106 00 c693f>] pax_repo00 41 rt_refcount_over89 flow+0x7f/0xe00 0m
kern  :warn 45  : [Wed Feb89   8 14:21:51 201e1 7 <    0.009559>48 ] RSP7 0m: 0018:fffc7 f8800630f3a60  E58 FLAGS: 000102833 [0m
kern  :warnde   : [Wed Fe81 b  8 14:21:51 2031 17 <    0.005385c0 >] RAX8 [0m: 000000081 000000052 RBX: fc6 fff88044ae28a00 e0 RCX: 0000000000003 00000
kern 00  :warn  : [00 eWed Feb  8 14:218 f:51 2017 <    0.e 007202>] RDX: 0f8 000000000000052 ff RSI: ffff88045ec<0f> 8ba08 RDI: ffff80b 804e8 8ba08
   kern  :warn  : 8a [Wed Feb  886  14:21:51 2017 <f3     0.007203>] f [0mRBP1 [1m: ffff880063089 f3a70 R08: 00000c4 00000000000 R09:48  ffffffff81554188b 0
kern  :wa83 rn  : [Wed 78 Feb  8 14:21:51 08 2017 <    0.007200 02>] R100 0: fffff48 fff8145a827 R11:c7  000000000000053c7 6 R12: 00000000040 00000fa
ker
n  :warn  :  3971.727840] RIP m[Wed Feb  8 14: [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
21:51 2017 <    [ 3971.737708]  RSP <ffff88041b7138d0>
0.007204>]  ------------[ cut here ]------------
[ 3971.742637] ---[ end trace e7fd7214fa858e22 ]---
[ 3971.742639] Kernel panic - not syncing: grsec: halting the system due to suspicious kernel crash caused by root
[ 3971.763473] kernel BUG at fs/exec.c:2189!
[ 3971.767556] PAX: overwritten function pointer or return address detected: 0000 [#3] SMP
[ 3971.775675] Modules linked in: dm_mod kvm_amd kvm irqbypass aesni_intel aes_x86_64 lrw gf128mul uvcvideo glue_helper ablk_helper videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core cryptd videodev k10temp e1000e cdc_acm
[ 3971.797311] CPU: 0 PID: 9806 Comm: emerge Tainted: G      D         4.7.10-hardened #7
[ 3971.805343] Hardware name: System manufacturer System Product Name/F2A85-V PRO, BIOS 6104 05/08/2013
[ 3971.814593] task: ffff8800024bc600 ti: ffff8800024bcfc8 task.ti: ffff8800024bcfc8
[ 3971.822190] RIP: 0010:[<ffffffff811c693f>]  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[ 3971.831741] RSP: 0018:ffff88041e7bb990  EFLAGS: 00010283
[ 3971.837117] RAX: 0000000000000050 RBX: ffff8800024bc600 RCX: 0000000000000000
[ 3971.844323] RDX: 0000000000000050 RSI: 0000000000000286 RDI: ffffffff8201e930
[ 3971.851523] RBP: ffff88041e7bb9a0 R08: 000003a562dcba84 R09: ffffffff82a00ea4
[ 3971.858727] R10: ffffffff8145a827 R11: 0000000000000000 R12: 0000000000000000
[ 3971.865927] R13: ffffffff81dded36 R14: 0000000000000001 R15: ffff8800024bc600
[ 3971.873130] FS:  0000032050f60700(0000) GS:ffff88045ec00000(0000) knlGS:0000000000000000
[ 3971.881335] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3971.887153] CR2: 000003204bd0a180 CR3: 0000000001e94000 CR4: 00000000000406f0
[ 3971.894356] Stack:
[ 3971.896444]  0000000000000004 ffff88041e7bbad8 ffff88041e7bb9f0 ffffffff8101916d
[ 3971.904130]  ffffffff81dded36 0000000000000000 0000000b00000004 0000000000000004
[ 3971.911818]  ffff88041e7bbad8 000000000000000b ffffffff81dded36 0000000000000000
[ 3971.919502] Call Trace:
[ 3971.922022]  [<ffffffff8101916d>] do_trap+0xad/0x180
[ 3971.927058]  [<ffffffff810192c5>] do_error_trap+0x85/0x110
[ 3971.932614]  [<ffffffff811a8cb4>] ? __slab_free+0xa4/0x270
[ 3971.938168]  [<ffffffff811a8f88>] ? kmem_cache_free+0x108/0x2a0
[ 3971.944160]  [<ffffffff8140dc0e>] ? __set_extent_bit+0x44e/0x580
[ 3971.950233]  [<ffffffff8140d35d>] ? free_extent_state+0x6d/0xf0
[ 3971.956223]  [<ffffffff810195ff>] do_overflow+0x2f/0x50
[ 3971.961519]  [<ffffffff81a1e968>] overflow+0x18/0x20
[ 3971.966553]  [<ffffffff8145a827>] ? ulist_add_merge+0x57/0x140
[ 3971.972455]  [<ffffffff8145f14b>] ? btrfs_qgroup_reserve_meta+0x8b/0xa0
[ 3971.979138]  [<ffffffff813d4fa9>] btrfs_delalloc_reserve_metadata+0x139/0x4e0
[ 3971.986341]  [<ffffffff8140106c>] __btrfs_buffered_write+0x1dc/0x720
[ 3971.992765]  [<ffffffff814055bd>] btrfs_file_write_iter+0x19d/0x5d0
[ 3971.999097]  [<ffffffff811b9e2c>] __vfs_write+0x11c/0x190
[ 3972.004567]  [<ffffffff811bb210>] vfs_write+0xf0/0x280
[ 3972.009775]  [<ffffffff811bca20>] sys_write+0x50/0xc0
[ 3972.014896]  [<ffffffff81a1d1a4>] entry_SYSCALL_64_fastpath+0x13/0xa3
[ 3972.021409]  [<ffffffff8104ec92>] ? __do_page_fault+0x1c2/0x420
[ 3972.027397] Code: 07 00 00 8b 8b 68 04 00 00 48 8d 93 00 06 00 00 41 89 c0 45 89 e1 48 c7 c7 58 73 de 81 31 c0 48 81 c6 e0 03 00 00 e8 fe 61 f8 ff <0f> 0b e8 8a 86 f3 ff 41 89 c4 48 8b 83 78 08 00 00 48 c7 c7 40
[ 3972.049216] RIP  [<ffffffff811c693f>] pax_report_refcount_overflow+0x7f/0xe0
[ 3972.056368]  RSP <ffff88041e7bb990>
[ 3972.059935] Kernel Offset: disabled
[ 3972.063494] Rebooting in 5 seconds..
[ 3977.141491] ACPI MEMORY or I/O RESET_REG.

I see the "kernel BUG at fs/exec.c:2189" is consistent; and, PAX is stepping in for an "overwritten function pointer or return address detected." The stack traces differ, though. What I would really like to know is if this is a case of PAX being overbearing, or I need to fix something I have broken.

Any help narrowing this down would be greatly appreciated.

Thanks,
Steve
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7267
Location: almost Mile High in the USA

PostPosted: Mon Feb 13, 2017 6:33 pm    Post subject: Reply with quote

To me, it looks like a btrfs bug in the kernel...
Might have to disable PaX to get past this in the meantime.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
SDubb
n00b
n00b


Joined: 06 Dec 2016
Posts: 7

PostPosted: Wed Feb 15, 2017 5:01 pm    Post subject: Reply with quote

Thanks for the reply.

Working under that assumption and the stack traces, the bug seems to get triggered after the call to btrfs_qgroup_reserve_meta(). The stack traces are the same after that in each case. I used addr2line to find that [<ffffffff8145a827>] ? ulist_add_merge+0x57/0x140 is the end of ulist_reinit(). Debug statements placed in this function just add log pollution(hurray for _ratelimited!).

I am worried about just disabling PAX in this case. If there really is a bug causing freed memory to be reused, couldn't that lead to corruption? I'm more worried about the effort to deal with a broken system than data loss; I have tested backups.

Any recommendations on where to go from here? I'm all for digging into this and fixing it myself; I'm just a little green when it comes to kernel hacking.

Thank again for the help!
-Steve
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum