ltp icon indicating copy to clipboard operation
ltp copied to clipboard

shmget02 failed on ppc64le because of ENOENT

Open idorax opened this issue 3 years ago • 8 comments

On upstream kernel 5.12.16-rc1, one case of syscalls (shmget02) failed on ppc64le, e.g.

     1	<<<test_start>>>
     2	tag=shmget02 stime=1626693077
     3	cmdline="shmget02"
     4	contacts=""
     5	analysis=exit
     6	<<<test_output>>>
     7	tst_test.c:1342: TINFO: Timeout per run is 0h 05m 00s
     8	shmget02.c:69: TPASS: shmget(1644188789, 2048, 1024) : ENOENT (2)
     9	shmget02.c:69: TPASS: shmget(1627411573, 2048, 1536) : EEXIST (17)
    10	shmget02.c:69: TPASS: shmget(1644188789, 0, 1536) : EINVAL (22)
    11	shmget02.c:69: TPASS: shmget(1644188789, 18446744073692774400, 1536) : EINVAL (22)
    12	shmget02.c:69: TPASS: shmget(1627411573, 4096, 1024) : EINVAL (22)
    13	shmget02.c:81: TPASS: shmget(1627411573, 2048, 256) : EACCES (13)
    14	shmget02.c:81: TFAIL: shmget(1644188789, 2048, 2560) expected EPERM: ENOENT (2)
    15	shmget02.c:69: TFAIL: shmget(1644188789, 2048, 2560) expected ENOMEM: ENOENT (2)
    16	
    17	Summary:
    18	passed   6
    19	failed   2
    20	broken   0
    21	skipped  0
    22	warnings 0
    23	<<<execution_status>>>
    24	initiation_status="ok"
    25	duration=0 termination_type=exited termination_id=1 corefile=no
    26	cutime=1 cstime=0
    27	<<<test_end>>>

idorax avatar Jul 20 '21 02:07 idorax

Upstream kernel doesn't have 5.12.16-rc1. Can you provide the correct kernel version?

xuyang0410 avatar Jul 20 '21 02:07 xuyang0410

We tested it via CKI pipeline,

  • https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-trusted-contributors/-/pipelines/339215605

From the beaker job, I got the kernel version 5.12.16-rc1.

✅ Found URL parameter: PACKAGE_NAME=kernel
ℹ️ Fetching kpkg from https://s3.upshift.redhat.com/DH-PROD-CKI/internal/334511219/ppc64le/artifacts/kernel-stable-ppc64le-45d72f8b4c4fd32aed859795c0ee6cb28d51af4f.tar.gz
✅ Downloaded kernel package successfully from https://s3.upshift.redhat.com/DH-PROD-CKI/internal/334511219/ppc64le/artifacts/kernel-stable-ppc64le-45d72f8b4c4fd32aed859795c0ee6cb28d51af4f.tar.gz
ℹ️ Extracting kernel version from https://s3.upshift.redhat.com/DH-PROD-CKI/internal/334511219/ppc64le/artifacts/kernel-stable-ppc64le-45d72f8b4c4fd32aed859795c0ee6cb28d51af4f.tar.gz
✅ Kernel version is 5.12.16-rc1
✅ Extracted kernel package successfully: kernel-stable-ppc64le-45d72f8b4c4fd32aed859795c0ee6cb28d51af4f.tar.gz
ℹ️ Applying architecture-specific workarounds (if needed)
✅ Architecture-specific workarounds applied successfully
ℹ️ Finishing boot loader configuration for the new kernel
cat: /sys/power/resume: No such file or directory
The default is /boot/loader/entries/646c87e6d22a4990b22771a27b2c4e97-5.12.16-rc1.conf with index 0 and kernel /boot/vmlinuz-5.12.16-rc1
✅ Boot loader configuration complete
✅ Installed kernel 5.12.16-rc1, rebooting (this may take a while)
...

@wangli5665, would you please help to correct the kernel version if it is not exactly correct from boot test log? Thanks!

idorax avatar Jul 20 '21 03:07 idorax

I think it is from stable kernel.

xuyang0410 avatar Jul 20 '21 03:07 xuyang0410

I think it is from stable kernel.

Correct, CKI built this kernel from https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git branch: linux-5.12.y

bgoncalv avatar Jul 21 '21 08:07 bgoncalv

There is no 5.12.16-rc1 tag in https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/tag/?h=5.12.16-rc1

pevik avatar Jul 21 '21 13:07 pevik

Hi, 5.12.16-rc1 is not a tag but the release of the kernel (make kernelrelease). The original commit hash tested was 45d72f8b4c4fd32aed859795c0ee6cb28d51af4f which belonged to a commit tagging Linux 5.12.16-rc1, similarly to how the current top of the branch points to a commit tagging Linux 5.12.19-rc2: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?h=linux-5.12.y&id=aa783473cf1e00e4344531089962861c6bbbb818

Unfortunately you can't access the original commit from the git anymore because of the rebases in the stable trees which change the hashes.

The issue is still visible with the current 5.13 stable kernels (both the queue and the release), as well as with Fedora 34 kernels which are based on the most recent stable release; so you should be able to reproduce using any of those and shouldn't need to use the first build that hit the issue.

Feel free to grab the kernel config file from the last 5.13 run here: https://s3.us-east-1.amazonaws.com/arr-cki-prod-datawarehouse-public/datawarehouse-public/2021/07/20/339757462/build_ppc64le_redhat:1437466475/kernel-stable-queue-ppc64le-d914bddf69f75c69cfc7ce89bf7fdbf4ee2cc060.config

Or the direct ppc64le binary here: https://gitlab.com/redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-trusted-contributors/-/jobs/1437466475/artifacts/file/artifacts/kernel-stable-queue-ppc64le-d914bddf69f75c69cfc7ce89bf7fdbf4ee2cc060.tar.gz

veruu avatar Jul 21 '21 14:07 veruu

Looking at the actual test failure it's strange. We get ENOENT which isn't supposed to happen with IPC_CREAT which we pass down in flags for this particular test, so this looks like there is something wrong with error reporting in the kernel here.

metan-ucw avatar Aug 13 '21 10:08 metan-ucw

Any news here? Given that this is hanging there for a year or so I'm inclined to close it.

metan-ucw avatar Jun 10 '22 12:06 metan-ucw