Skip to content

Unsupported sched_setparam #1592

Description

@qiankehan

When rr debug for libvirt daemon, it gets segment fault.
Version:
rr version 4.0.2
libvirt-1.2.21-1.fc24.x86_64
kernel-4.4.0-0.rc0.git6.1.fc24.x86_64
libstdc++-devel-5.2.1-5.fc24.x86_64
libstdc++-devel-5.2.1-5.fc24.i686

Stop libvirtd service and use rr to debug libvirtd service:

# systemctl stop libvirtd
# rr record /usr/sbin/libvirtd -d
rr: Saving the execution of `/usr/sbin/libvirtd' to trace directory `/root/.local/share/rr/libvirtd-9'.
[FATAL /home/hansolo/Software/rr/src/record_syscall.cc:3066:rec_process_syscall_arch() errno: 0 'Success'] 
 (task 2414 (rec:2414) at time 3733)
 ->  Assertion `t->regs().syscall_result_signed() == -syscall_state.expect_errno' failed to hold. Expected ENOSYS for 'sched_setparam' but got result 0; execution of syscall unsupported by rr
Launch gdb with
  gdb /usr/sbin/libvirtd
and attach to the rr debug server with:
  target remote :2361

In another terminnal, attach rr gdb server

# gdb -q /usr/sbin/libvirtd
(gdb) target remote :2361
Remote debugging using :2361
(gdb) c
Continuing.
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Error detected on fd 9
Remote communication error.  Target disconnected.: Success.

Then rr get segment fault.
rr backtrace:

0 0x00000000006a004a in std::unique_ptr<Session::CloneCompletion, std::default_deleteSession::CloneCompletion >::get (this=0x98)

at /usr/include/c++/5.2.1/bits/unique_ptr.h:305

1 0x000000000069e37e in std::unique_ptr<Session::CloneCompletion, std::default_deleteSession::CloneCompletion >::operator bool (this=0x98)

at /usr/include/c++/5.2.1/bits/unique_ptr.h:319

2 0x000000000069bb1c in Session::finish_initializing (this=0x0) at /home/hansolo/Software/rr/src/Session.cc:318

3 0x000000000069ad21 in Session::find_task (this=0x0, rec_tid=2361) at /home/hansolo/Software/rr/src/Session.cc:135

4 0x000000000069adb9 in Session::find_task (this=0x0, tuid=...) at /home/hansolo/Software/rr/src/Session.cc:141

5 0x00000000005f0edf in GdbServer::dispatch_debugger_request (this=0x7fffffffd440, session=..., req=..., state=GdbServer::REPORT_NORMAL)

at /home/hansolo/Software/rr/src/GdbServer.cc:521

6 0x00000000005f2ca2 in GdbServer::process_debugger_requests (this=0x7fffffffd440, state=GdbServer::REPORT_NORMAL) at /home/hansolo/Software/rr/src/GdbServer.cc:867

7 0x00000000005f4f67 in GdbServer::emergency_debug (t=0x9c26c0) at /home/hansolo/Software/rr/src/GdbServer.cc:1269

8 0x000000000060e86d in emergency_debug (t=0x9c26c0) at /home/hansolo/Software/rr/src/log.cc:27

9 0x000000000060e930 in EmergencyDebugOstream::~EmergencyDebugOstream (this=0x7fffffffda90, __in_chrg=) at /home/hansolo/Software/rr/src/log.cc:34

10 0x0000000000642fce in rec_process_syscall_archrr::X64Arch (t=0x9c26c0, syscall_state=...) at /home/hansolo/Software/rr/src/record_syscall.cc:3066

11 0x0000000000639153 in rec_process_syscall_internal (t=0x9c26c0, syscall_state=...) at /home/hansolo/Software/rr/src/record_syscall.cc:3355

12 0x0000000000639189 in rec_process_syscall (t=0x9c26c0) at /home/hansolo/Software/rr/src/record_syscall.cc:3360

13 0x0000000000629721 in RecordSession::syscall_state_changed (this=0x9906d0, t=0x9c26c0, step_state=0x7fffffffe1b0)

at /home/hansolo/Software/rr/src/RecordSession.cc:737

14 0x000000000062c55e in RecordSession::record_step (this=0x9906d0) at /home/hansolo/Software/rr/src/RecordSession.cc:1454

15 0x0000000000624dc1 in record (args=std::vector of length 2, capacity 4 = {...}, flags=...) at /home/hansolo/Software/rr/src/RecordCommand.cc:185

16 0x0000000000624fd9 in RecordCommand::run (this=0x97d0f0 RecordCommand::singleton, args=std::vector of length 2, capacity 4 = {...})

at /home/hansolo/Software/rr/src/RecordCommand.cc:243

17 0x00000000006103e8 in main (argc=4, argv=0x7fffffffe468) at /home/hansolo/Software/rr/src/main.cc:259

Activity

  1. rocallahan commented on Nov 16, 2015

    @rocallahan
    Collaborator

    The real issue here is this:

    Assertion `t->regs().syscall_result_signed() == -syscall_state.expect_errno' failed to hold. Expected ENOSYS for 'sched_setparam' but got result 0; execution of syscall unsupported by rr
    
  2. changed the title [-]Segment fault when rr record libvirtd[/-] [+]Unsupported `sched_setparam`[/+] on Nov 16, 2015
  3. rocallahan commented on Nov 16, 2015

    @rocallahan
    Collaborator

    Fixed in e80a48f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions