Hello, my name is Roman, and I would like to present you how to reproduce a serious
Bob Bach in the five minutes using the word Mi NG.
Okay, a little bit about Mi, I am a occasional Linux kernel contributor, and the software engineer
working for Intel and even Zion RdT features.
Also, I am a regular user of Mi NG.
I provided contact information, so he'll reach me if you have some questions.
Okay, I will start with the introduction of CISBOT, and I am going to show you
which Bach, which Bach I selected to present today, to reproduce today, and then I will continue
with introducing shortly introduced to word Mi NG, and wrap up my presentation with live demo.
So let's get started.
CISColor is a coverage guide Linux kernel faser, and CISBOT, which is a kind of CI, that continuously
uses Mi NG kernel configuration in many versions, and automatically reports, bugs and issues
to different mailing lists.
Also, it supports kind of dashboard, which shows list of recent bugs, let me show you
bugs that I have chosen for this presentation, a lot of information, but we are interested
in just several fields from this list, from this Bach.
First is very interested, of course, in the kernel 3, and commit to be able to reproduce
with CISBOT generates kernel configuration, so it creates it, and also it sometimes, like in this
case, generate C reproducer, so to trigger this issue from user space.
And here you can see that on the left, in the yellow box, crash dump is presented, and
the top is there are two bugs, not two bugs, two patches provided, I selected one of the
patches that already accepted into the kernel.
Next, which is where it means G, where it means G is a kind of tool that significantly
reduces your development cycle, and some work rules, where it means G uses, where it means
G is a Python script that uses QEM, or QEM, like 3, 3, and it eliminates user space.
In fact, it provides a femoral user space that simply inherits user space that your works
use, it uses with VirtioFS, but it's also can use 9p as a phylboc phylboc option, so that's
why it's so fast.
As I note, I cannot say that this tool is covered all possible scenarios, because, for example,
in some cases, you probably will not need user space at all, or you will need some minimal
user space, I provide it to one of the cases in references, so next, and let me also tell
what is 5 minutes, it doesn't mean that we still somehow help to build kernel in 5 minutes
no.
It will take so much time as usual, but VirtioFS in the cycle of build run test loop, preventing
you from maintaining user space and styling kernel to VM images, and do all of this boring
stuff, and now let me show you my demo setup, this is Linux kernel commit, which contains
this bug, and next is, oh I am sorry, oh yeah, and this is my setup, I have here build kernel
all put directory config generated by sysbot, repo generated again by sysbot, and the patch,
let me briefly describe you patch and reproduce, patch is trivial, it fixes error paths, memory
resource leakage on renaming some node in FS, we were not going to go deep and explain
it simply removes with issue, okay, next, about reproducer, I decided to not describe it precisely
because it's outdated and it's kind of messy, so instead I would like to communicate
you how it works, it's quite simple and it's simply run infinite cycle unless it's detect
that something happened in kernel using this game-embley model, kernel model, which is called
kernel, all green, so let me show you, next, this is how our reproducer will look like,
I will run a VNG in two to move the paints, first we'll show this bug in a user space
because it's readed in from this debug file system, and on the second paint I will show you how it
looks like in the message, so that came-in-lick reports something, okay, so let me start with life demo,
here, okay, here you can see that I checked out with my kernel version and build it using
C-cash, okay, now I'm going to switch to another window and here I prepared this VNG, so let's run it,
yeah, now it is run, here we are, typically it takes about one or two seconds to load kernel,
but we use kernel configuration that is generated by C-cash, so let me go to the second paint
and enter to another window, so now we are in and let me initially clear kernel messages,
generated during the boot, and I need to use so-do, yeah, okay,
why it doesn't, because now it will clear the buffer, yeah, and let me show you how we
reproduce our world, I already built reproducer, so all I need is to run this again, I use in
pseudo-repro, so it's go into infinite cycle and now it will start executing, after, yeah,
thank you, after the second execution it will show memory, at least it must, yeah,
it happened, so we see that with this report, this issue, so now I'm going to
turn off this VNG and rebuild the kernel, so, but before I'm going to apply this patch,
get apply, okay, let me show you this patch, okay, this is it, now let me rebuild the kernel,
it will take about probably two minutes and while it is being built, let me return to this
slide and tell a little bit about inefficient and efficient workflows, of course, this, as I said,
this tool doesn't cover all possible scenarios, for example, if you need to switch between
different kernel versions that has let's say it in this way, a lot of distance between versions
many files changes, of course, you will need to rebuild and it will take its time,
so no single bullet, sorry, but efficient workflow implies that you use same kernel versions
that over set of kernel versions that does not far from each other and this allows to
work efficient, for example, if you try to apply different set of patches against this kernel
for testing purposes and, or if you just hack it on the kernel and iterate it on a bug fix,
okay, let me return, yeah, it's built and I'm going to rerun VNG, okay, let's wait for a second,
yeah, we are in and I am trying to reproduce with bug one more time, if you remember previously
it takes two iterations, yeah, sorry, it takes two iterations to reproduce, now it will take
a little, it will not reproduce because it was fixed, so let's wait two more cycles and stop,
so as you can see it is running an infinite cycle and it doesn't produce
this error, so bug was fixed, so this is it, thank you questions,
you're reproduced, I didn't really understand how that work, is this reproduced specific for this
problem because you said it was generated or what does the reproduced do? You mean that if I reproduced
this for, you mean the I reproduced is because if I say like bug to reproduce for, I don't know,
to be able to reproduce it in five minutes or, I mean generally what does the reproduced do?
A reproducer runs infinite cycle, then it's loaded, came in leaked model, let me show you,
let me return back to this slide and I will reproduce this slide, it uses this file,
this kernel debug came in leaked, it turns it on scan mode, then it's activate kernel paths
doing some cycles to kernel and then this kernel debug came in leaked detect, memory leakage,
in the kernel, this memory, this came in leaked reports, this issue and this issue, this stack
trace is, it's presented in this kernel debug came in, so this file has two purposes,
one for writing came in, come on street and for reporting bugs from the kernel.
Other questions, so thank you, I work on Cisco, this is really cool, thank you, I want to
pitch something which is maybe you know, deja view, it's a tool by also one person working on Cisco
now, which is similar and it also gives you a perfect trace, so anybody is interested in this,
deja view on GitHub, also you should look at. Okay, thank you. Okay, we're up, thank you, thank
you.
Yeah.