gitversion-controllinux-kernelbisect

kernel: bisect merge commits to find non-merge first bad


I bisected problem in kernel and the first bad commit is merge commit:

Parents of 2b90506a8186 (both are good):

Also v5.12-rc2 is good.

I need to do second bisect to find actual first non-merge bad commit (i.e. one of 028a1e968435..2b90506a8186 - 4885 commits or 01d713689441..2b90506a8186 - 46 commits).

I remember previously on similar case I checkouted into one of the parents (first branch) and applied one-by-one all commits from the other parent (second branch) on the top of the first branch. With this special branch, where I needed to solve few conflicts I could rebase as the history was linear.

But I don't remember how I got the list of commits from the other parent. It was probably quite straightforward, founding it's parent with git log --first-parent.

But for this case it I'm not able to generate the list, probably due fact that parents are also merge commits.

I tried to read various sources, but no luck:

UPDATE I don't believe there is kernel regression for all devices, just problem with device tree for my particular arm64 device. Finding a problematic commit can help me to temporarily revert problematic commit until I find what needs to be fixed in device tree for my device.


Solution

  • Parents of 2b90506a8186 (both are good): […] I need to do second bisect to find actual first non-merge bad commit

    You know merging 2b90506^2 produces a kernel that won't boot on your rig, so that commit has the bug that will show up in integration: it's bad.

    git bisect 2b90506^2 $(git merge-base 2b90506^1 2b90506^2)
    

    and when testing, merge to 2b90506^1 first to check whether a commit will fail integration testing, since that's your real "bad" condition.