Bug 1314154

Summary: [abrt] kmod: depmod_report_cycles(): kmod killed by SIGABRT
Product: [Fedora] Fedora Reporter: Andrew Cook <ariscop>
Component: kmodAssignee: kmod development team <kmod-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: ariscop, jonathan, kmod-maint, ykaliuta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/3d7e88c5756a2aa05038d5482f88b9a0b45e4ed2
Whiteboard: abrt_hash:443b013e39018c07fbca9b692a55edfea5619cf2;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-09 03:34:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: limits
none
File: maps
none
File: mountinfo
none
File: namespaces
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Andrew Cook 2016-03-03 04:53:46 UTC
Description of problem:
Running make module_install on a kernel

https://github.com/01org/Igvtg-kernel/tree/gvt-upstream-rfc
With this patch: http://paste.fedoraproject.org/332609/45698068 to make it actually build

---------
  DEPMOD  4.5.0-rc1-gvt+
depmod: ERROR: Found 6 modules in dependency cycles!
depmod: ERROR: Cycle detected: drm
depmod: ERROR: Cycle detected: i915_gvt -> i915 -> video
depmod: ERROR: Cycle detected: i915_gvt -> i915 -> drm_kms_helper
*** Error in `/sbin/depmod': free(): invalid next size (fast): 0x000055707d2a5f90 ***

Version-Release number of selected component:
kmod-22-3.fc24

Additional info:
reporter:       libreport-2.6.4
backtrace_rating: 3
cmdline:        /sbin/depmod -ae -F System.map 4.5.0-rc1-gvt+
crash_function: depmod_report_cycles
executable:     /usr/bin/kmod
global_pid:     29942
kernel:         4.5.0-0.rc5.git0.1.fc24.x86_64
runlevel:       N 5
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (5 frames)
 #6 depmod_report_cycles at tools/depmod.c:1519
 #7 depmod_calculate_dependencies at tools/depmod.c:1596
 #8 depmod_load at tools/depmod.c:1623
 #9 do_depmod at tools/depmod.c:2592
 #11 _start

Comment 1 Andrew Cook 2016-03-03 04:53:51 UTC
Created attachment 1132628 [details]
File: backtrace

Comment 2 Andrew Cook 2016-03-03 04:53:53 UTC
Created attachment 1132629 [details]
File: cgroup

Comment 3 Andrew Cook 2016-03-03 04:53:54 UTC
Created attachment 1132630 [details]
File: core_backtrace

Comment 4 Andrew Cook 2016-03-03 04:53:56 UTC
Created attachment 1132631 [details]
File: dso_list

Comment 5 Andrew Cook 2016-03-03 04:53:58 UTC
Created attachment 1132632 [details]
File: environ

Comment 6 Andrew Cook 2016-03-03 04:53:59 UTC
Created attachment 1132633 [details]
File: limits

Comment 7 Andrew Cook 2016-03-03 04:54:01 UTC
Created attachment 1132634 [details]
File: maps

Comment 8 Andrew Cook 2016-03-03 04:54:02 UTC
Created attachment 1132635 [details]
File: mountinfo

Comment 9 Andrew Cook 2016-03-03 04:54:04 UTC
Created attachment 1132636 [details]
File: namespaces

Comment 10 Andrew Cook 2016-03-03 04:54:06 UTC
Created attachment 1132637 [details]
File: open_fds

Comment 11 Andrew Cook 2016-03-03 04:54:07 UTC
Created attachment 1132638 [details]
File: proc_pid_status

Comment 12 Andrew Cook 2016-03-03 04:54:08 UTC
Created attachment 1132639 [details]
File: var_log_messages

Comment 13 Jan Kurik 2016-07-26 04:31:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 14 Yauheni Kaliuta 2016-10-10 11:27:13 UTC
Is it still possible to reproduce? There must be some memory corruption, but it's not obvious for me, where.

Could you share your kernel config? I've rebuilt the kernel, the HEAD commit is:

commit 687811890d7fd9d29b80df8bd19e91583527157f
Author: Yulei Zhang <yulei.zhang>
Date:   Thu Jan 7 13:51:22 2016 +0800

    drm/i915: gvt: vGPU command scanner

it compiles fine with defconfig (not a surprise, the stuff is built in) and complains a lot about symbols if I try to build it as modules.

I also tried to create a synthetic test for the dependency loop, but it works fine (no crash) for my simple case:

depmod: ERROR: Found 3 modules in dependency cycles!
depmod: ERROR: Cycle detected: mod7 -> mod8 -> mod6 -> mod7
zsh: exit 1     depmod -b /tmp/modules 3.10.0-327.el7.x86_64

Comment 15 Yauheni Kaliuta 2016-11-09 02:56:53 UTC
The upstream commit https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=6b77f188969d72254f6bda291f4f2d9fd42f5ecc  most probably fixes the crash.

Comment 16 Andrew Cook 2016-11-09 03:34:50 UTC
Looks right