Bug 1919826 - ptrace/watchpoints broke for LLDB
Summary: ptrace/watchpoints broke for LLDB
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 33
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Oleg Nesterov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-25 08:46 UTC by Jan Kratochvil
Modified: 2021-02-12 09:52 UTC (History)
21 users (show)

Fixed In Version: kernel-5.10.15-200.fc33.x86_64
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-12 09:52:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
watchpoint-step.c (4.68 KB, text/plain)
2021-01-29 10:03 UTC, Jan Kratochvil
no flags Details

Description Jan Kratochvil 2021-01-25 08:46:08 UTC
1. Please describe the problem:
LLDB testsuite broke with the new kernel.

2. What is the Version-Release number of the kernel:
kernel-core-5.10.7-200.fc33.x86_64

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
working: kernel-core-5.9.16-200.fc33.x86_64

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
Install buildrequires for package lldb.
git clone https://github.com/llvm/llvm-project.git
mkdir build
cd build
time cmake ../llvm-project/llvm/ -DCMAKE_BUILD_TYPE=Release  -DLLVM_USE_LINKER=gold -DLLVM_ENABLE_PROJECTS="lldb;clang;lld;clang-tools-extra"  -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_ASSERTIONS=ON -G Ninja;echo $?
ninja check-lldb
Expected:
all tests pass
Actual:
Failed Tests (2):
  lldb-api :: commands/watchpoints/multiple_hits/TestMultipleHits.py
  lldb-api :: commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
not tested

6. Are you running any modules that not shipped with directly Fedora's kernel?:
no

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.
I do not think they matter.

Comment 1 Jan Kratochvil 2021-01-29 10:03:29 UTC
Created attachment 1751990 [details]
watchpoint-step.c

https://sourceware.org/systemtap/wiki/utrace/tests
gcc -o watchpoint-step watchpoint-step.c -Wall -g;./watchpoint-step;echo $?
PASS: 0
FAIL: 1

Comment 2 Oleg Nesterov 2021-01-29 16:32:12 UTC
(In reply to Jan Kratochvil from comment #1)
>
> Created attachment 1751990 [details]
> watchpoint-step.c

Thanks Jan.

Hopefully fixed by https://lore.kernel.org/lkml/20210128211627.GB4348@worktop.programming.kicks-ass.net/

Comment 3 Jan Kratochvil 2021-02-08 07:39:35 UTC
The fix is in Linus Torvalds tree:
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9ad22e165994ccb64d85b68499eaef97342c175b
But latest Rawhide kernel still does NOT contain it:
  https://koji.fedoraproject.org/koji/buildinfo?buildID=1703659
  kernel-5.11.0-0.rc6.20210204git61556703b610.144.fc34

Comment 4 Jan Kratochvil 2021-02-09 08:20:27 UTC
https://koji.fedoraproject.org/koji/buildinfo?buildID=1705020
kernel-5.11.0-0.rc7.149.fc34.x86_64
does work fine for both ptrace testsuite and LLDB testsuite.
Now just to backport it for F-33.

XPASS: restart_block
 - but that is longterm (kernel-5.9.10-200.fc33.x86_64)

Comment 5 Jan Kratochvil 2021-02-12 09:52:29 UTC
kernel-5.10.15-200.fc33.x86_64
has fixed both the ptrace testsuite watchpoint-step and LLDB testsuite.


Note You need to log in before you can comment on or make changes to this bug.