linux-test-project / ltp

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)
https://linux-test-project.readthedocs.io/
GNU General Public License v2.0
2.33k stars 1.02k forks source link

testcase mmap18 encountered segmentation fault #1186

Closed YeechouTang closed 2 months ago

YeechouTang commented 2 months ago

Hi,

We encountered a segmentation fault while executing the mmap18 test case.

./runltp -f syscalls -s mmap18 ...

Summary:
passed   4
failed   0
broken   0
skipped  0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=0
<<<test_end>>>
INFO: ltp-pan reported all tests PASS
LTP Version: 20240524-130-g2d24a286f

It seems that the test case ran successfully. However, I found some error messages about segmentation fault from dmesg.

[Tue Aug 20 17:29:39 2024] LTP: starting mmap18
[Tue Aug 20 17:29:39 2024] mmap18[239955]: segfault at 7fccca0ceff8 ip 0000563e7396bdc0 sp 00007fccca0ceff0 error 6 in mmap18[563e7396a000+21000]
[Tue Aug 20 17:29:39 2024] Code: 00 e8 b4 ff ff ff eb dd e8 2d f4 ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa 48 83 ec 18 49 89 f9 4c 8d 44 24 08 <48> 89 7c 24 08 4c 39 c7 7f 0e e8 e1 ff ff ff 48 83 c4 18 c3 0f 1f
[Tue Aug 20 17:29:39 2024] Process 239954(mmap18) has RLIMIT_CORE set to 1
[Tue Aug 20 17:29:39 2024] Aborting core
[Tue Aug 20 17:29:39 2024] mmap18[239957]: segfault at 7fccca0c2ff8 ip 0000563e7396bdc0 sp 00007fccca0c2ff0 error 6 in mmap18[563e7396a000+21000]
[Tue Aug 20 17:29:39 2024] Code: 00 e8 b4 ff ff ff eb dd e8 2d f4 ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa 48 83 ec 18 49 89 f9 4c 8d 44 24 08 <48> 89 7c 24 08 4c 39 c7 7f 0e e8 e1 ff ff ff 48 83 c4 18 c3 0f 1f
[Tue Aug 20 17:29:39 2024] Process 239956(mmap18) has RLIMIT_CORE set to 1
[Tue Aug 20 17:29:39 2024] Aborting core

LTP: almost the lastest. HEAD commit: 2d24a286f1e35fe6ad7e1e307b86375658e23bee glibc: Ubuntu GLIBC 2.39-0ubuntu8.2 distribution: Ubuntu 24.04 LTS kernel: 5.15.0-162

Could someone help analyze this issue? Thank you.

metan-ucw commented 2 months ago

First of all you should really do your work before submitting an issue. If you have read the test source code you would find that the test triggers segfaults on purpose.