Hi Erik,
Sorry for reply late. Thanks for your reporting.
On 2021/1/25 15:27, Erik Yuan wrote:
Hi Hanjun, Xiuqi,
Thanks for your warm welcome!
There is a new question to be dicsussed.
When I was performing the kernel5.10 building test based on my new kernel.spec, I found the kernel building in openEuler OBS is ok, but when I directly run the rpmbuild in my D06 openEuler 20.03 with all the stuff from https://gitee.com/src-openeuler/kernel.git, I got failed.
There are two failures as below.
- checking the module license met some errors
Something like that:
- echo -n './kernel/drivers/usb/class/cdc-wdm.ko '
- /sbin/modinfo -l ./kernel/drivers/usb/class/cdc-wdm.ko
- read i
- echo -n './kernel/drivers/base/regmap/regmap-i2c.ko '
- /sbin/modinfo -l ./kernel/drivers/base/regmap/regmap-i2c.ko
modinfo: ERROR: could not get modinfo from 'regmap_i2c': No such file or directory D: waitpid(2595191) rc 2595191 status 100 D: /bin/sh failed: 100 error: Bad exit status from /var/tmp/rpm-tmp.yMKUlW (%install)
RPM build errors: line 111: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers line 124: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-tools-libs line 139: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-tools-libs-devel Bad exit status from /var/tmp/rpm-tmp.yMKUlW (%install)
The error happened in this checking of kernel.spec:
while read i do echo -n "$i " >> modinfo /sbin/modinfo -l $i >> modinfo done < modnames
Because some modules are built as module rather than builtin, such as regmap-i2c.ko, regmap-spi.ko, but all these are builtin in openEuler 20.03. When modinfo try to get the module information from those KO, failure happened.
Spent some time on this issue. The kmod where modinfo is from is version 27. That kmod support to fetch module info from builtin modules. But for builtin modules, kmod will directly access the /lib/module/`uname -r` to get the module info from modules.builtin.modinfo.
In openEuler 20.03 & 20.09, the regmap-i2c and regmap-spi are builtin rather than separate modules in openEuler kernel 5.10. Unfortunately, there is no modules.builtin.modinfo in our 20.03 which based on 4.19 kernel. The kernel support 'modules.builtin.modinfo' in commit '898490c010b5d2e499e' later than 4.19
It seem kmod 27 is too new for kernel 4.19. What do you think about this compatibility issue? Do we need to backport the commit 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/sc...' or consider a more compatible fix in kmod??
For kernel, I prefer backporting this commit. Could you help to backport this commit? And I also report this issue to kmod tools for help.
- rpmbuild checkings before packing RPMs failed
[12189s] Provides: kernel-debugsource = 5.10.0-4.1 kernel-debugsource(aarch-64) = 5.10.0-4.1 [12189s] Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 [12189s] Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/abuild/rpmbuild/BUILDROOT/kernel-5.10.0-4.1.aarch64 [12190s] error: Installed (but unpackaged) file(s) found: [12190s] /usr/lib64/libperf-jvmti.so [12190s] [12190s] [12190s] RPM build errors: [12190s] line 111: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
For the 2nd failure, it happened because I installed openjdk-devel locally to match the jvmti dependency, the libperf-jvmti.so generated newly hasn't been packed into perf RPM in current kernel.spec. It seems the openEUler OBS server hadn't installed openjdk-devel and will not trigger libperf-jvmti.so building.
If we enable the jvmti plug-in building in the coming PR, this checking error will be solved.
I'm not sure of this issue, do we need to install openjdk-devel on OBS server?
BTW, the prefix is not right, I am not sure what prefix is better to ask some helps from community, just replace as "QUE':(
Oh, I haven't define the prefix ;-)
Cheers, Erik
On 1/25/2021 8:54 AM, Hanjun Guo wrote:
Hi Erik,
Very glad to see the contributions for openEuler Kernel, thank you very much!
On 2021/1/23 11:46, Erik Yuan wrote:
Hi,
In Linux 5.8, Nick submitted a patch-set to fix some Errors in symbol search when you try to profile JIT compiled application in OpenJDK with perf. The patchset is:
1e4bd2ae4564 perf jit: Fix inaccurate DWARF line table 7d7e503cac31 perf jvmti: Remove redundant jitdump line table entries 0bdf31811be0 perf jvmti: Fix demangling Java symbols 525c821de0a6 perf tests: Add test for the java demangler 959f8ed4c1a8 perf jvmti: Do not report error when missing debug information 953e92402a52 perf jvmti: Fix jitdump for methods without debug info
Because making perf work is very useful for performance analysis on JITed Java application, I'd like to support this patchset in openEuler release. The coming 21.03 should be a first target as that release is upgraded with 5.8+ kernel. Probably we can backport this patchset to 20.03 LTS if needed.
Great to see those patches for 20.03 if you can backport for those stable kernels, and it will bring the benefits for ARM users in about one month (month regular update release for 20.03 stable) :)
To introduce the fix to 21.03, the kernel.spec should be changed with some lines to generate the JVMTI shared library. There are some things I am not sure:
- kernel.spec is in src-openeuler project, do I submit the change by PR or by sending patch directly to the mailing list?
Please send the patches to mailing list as Linux kernel community :)
Thanks Hanjun