Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion failure at Registers.cc:422 with sched_setaffinity() #2020

Closed
tbsaunde opened this issue Apr 18, 2017 · 6 comments
Closed

assertion failure at Registers.cc:422 with sched_setaffinity() #2020

tbsaunde opened this issue Apr 18, 2017 · 6 comments

Comments

@tbsaunde
Copy link
Contributor

here's what I could easily collect, but let me know if you want more. Roughly seems like somethings wrong with replaying sched_setaffinity()?

[Parent 9894] WARNING: attempt to modify an immutable nsStandardURL: file /src/moz0/netwerk/base/nsStandardURL.cpp, line 1646
[New Thread 9942.9957]
[Child 9942] WARNING: Could not get a cubeb context.: 'rv == CUBEB_OK', file /src/moz0/dom/media/CubebUtils.cpp, line 343
[ERROR /src/rr/src/Registers.cc:303:maybe_print_reg_mismatch() errno: SUCCESS] rdi 0 != 0xffffffffffffffff (replaying vs. recorded)
[FATAL /src/rr/src/Registers.cc:422:compare_register_files() errno: SUCCESS]
(task 10180 (rec:9985) at time 38225)
-> Assertion `!bail_error || match' failed to hold. Fatal register mismatch (ticks/rec:1463/1463)
Launch gdb with
gdb '-l' '10000' '-ex' 'target extended-remote :10180' /src/ff-dbg0/dist/bin/firefox

(gdb) bt
#0 0x00007ff413b214d0 in __poll_nocancel () at ../sysdeps/unix/syscall-template.S:84
#1 0x0000560524cf6b58 in rr::poll_socket (sock_fd=..., events=1, timeoutMs=-1) at /src/rr/src/GdbConnection.cc:83
#2 0x0000560524cf6bfd in rr::poll_incoming (sock_fd=..., timeoutMs=-1) at /src/rr/src/GdbConnection.cc:91
#3 0x0000560524cf6c53 in rr::GdbConnection::read_data_once (this=0x560527053f70) at /src/rr/src/GdbConnection.cc:105
#4 0x0000560524cf7881 in rr::GdbConnection::read_packet (this=0x560527053f70) at /src/rr/src/GdbConnection.cc:294
#5 0x0000560524cfc791 in rr::GdbConnection::get_request (this=0x560527053f70) at /src/rr/src/GdbConnection.cc:1198
#6 0x0000560524d0c34e in rr::GdbServer::process_debugger_requests (this=0x7ffc1c7229d0, state=rr::GdbServer::REPORT_NORMAL) at /src/rr/src/GdbServer.cc:902
#7 0x0000560524d0fa48 in rr::GdbServer::emergency_debug (t=0x5605270534f0) at /src/rr/src/GdbServer.cc:1567
#8 0x0000560524d2fbf0 in rr::emergency_debug (t=0x5605270534f0) at /src/rr/src/log.cc:295
#9 0x0000560524d2fdf4 in rr::EmergencyDebugOstream::~EmergencyDebugOstream (this=0x7ffc1c722e10, __in_chrg=) at /src/rr/src/log.cc:317
#10 0x0000560524da43b6 in rr::Registers::compare_register_files (t=0x5605270534f0, name1=0x560524e3fae7 "replaying", reg1=..., name2=0x560524e3fade "recorded", reg2=..., mismatch_behavior=rr::BAIL_ON_MISMATCH)
at /src/rr/src/Registers.cc:422
#11 0x0000560524dbf9ec in rr::ReplayTask::validate_regs (this=0x5605270534f0, flags=0) at /src/rr/src/ReplayTask.cc:114
#12 0x0000560524dac0c7 in rr::ReplaySession::exit_syscall (this=0x560526a7aa70, t=0x5605270534f0) at /src/rr/src/ReplaySession.cc:462
#13 0x0000560524daf4e4 in rr::ReplaySession::try_one_trace_step (this=0x560526a7aa70, t=0x5605270534f0, constraints=...) at /src/rr/src/ReplaySession.cc:1180
#14 0x0000560524db077e in rr::ReplaySession::replay_step (this=0x560526a7aa70, constraints=...) at /src/rr/src/ReplaySession.cc:1436
#15 0x0000560524dc8f0c in rr::ReplayTimeline::replay_step_forward (this=0x7ffc1c724d70, command=rr::RUN_CONTINUE, stop_at_time=13419) at /src/rr/src/ReplayTimeline.cc:1323
#16 0x0000560524d0d576 in rr::GdbServer::debug_one_step (this=0x7ffc1c724cb0, last_resume_request=...) at /src/rr/src/GdbServer.cc:1098
#17 0x0000560524d0ef6e in rr::GdbServer::serve_replay (this=0x7ffc1c724cb0, flags=...) at /src/rr/src/GdbServer.cc:1437
#18 0x0000560524da8cba in rr::replay (trace_dir="", flags=...) at /src/rr/src/ReplayCommand.cc:437
#19 0x0000560524da952f in rr::ReplayCommand::run (this=0x5605250e86d0 rr::ReplayCommand::singleton, args=std::vector of length 0, capacity 4) at /src/rr/src/ReplayCommand.cc:548
#20 0x0000560524e1c2cf in main (argc=4, argv=0x7ffc1c725638) at /src/rr/src/main.cc:270
(gdb)

firefox
0x0000000070000002 in ?? ()
(gdb) bt
#0 0x0000000070000002 in ()
#1 0x00002e7443d66c23 in _raw_syscall () at /src/rr/src/preload/raw_syscall.S:120
#2 0x00002e7443d63b3e in traced_raw_syscall (call=call@entry=0x7fb82dca2fa0) at /src/rr/src/preload/syscallbuf.c:196
#3 0x00002e7443d64c7b in syscall_hook_internal (call=0x7fb82dca2fa0) at /src/rr/src/preload/syscallbuf.c:2471
#4 0x00002e7443d64c7b in syscall_hook (call=0x7fb82dca2fa0) at /src/rr/src/preload/syscallbuf.c:2503
#5 0x00002e7443d63a3a in _syscall_hook_trampoline () at /src/rr/src/preload/syscall_hook.S:271
#6 0x00002e7443d63a6a in __morestack () at /src/rr/src/preload/syscall_hook.S:406
#7 0x00002e7443d63a85 in _syscall_hook_trampoline_48_3d_00_f0_ff_ff () at /src/rr/src/preload/syscall_hook.S:417
#8 0x00005401307dac22 in __sched_setaffinity_new (pid=0, cpusetsize=128, cpuset=0x3baf104e5ba0) at ../sysdeps/unix/sysv/linux/x86_64/../sched_setaffinity.c:32
#9 0x0000554f5fcc5684 in SetThreadAffinity(unsigned int) (cpu=0) at /src/moz0/xpcom/threads/nsThread.cpp:390
#10 0x0000554f5fcc56d4 in SetupCurrentThreadForChaosMode() () at /src/moz0/xpcom/threads/nsThread.cpp:437
#11 0x0000554f5fcc609f in nsThread::InitCurrentThread() (this=0x3bd7cc71200) at /src/moz0/xpcom/threads/nsThread.cpp:705
#12 0x0000554f5fcc99cc in nsThreadManager::GetCurrentThread() (this=0x554f6984c3c0 nsThreadManager::get()::sInstance) at /src/moz0/xpcom/threads/nsThreadManager.cpp:240
#13 0x0000554f5fcccd3f in NS_GetCurrentThread() () at /src/moz0/xpcom/threads/nsThreadUtils.cpp:396
#14 0x0000554f603f31d2 in base::Thread::ThreadMain() (this=0x6266045b560) at /src/moz0/ipc/chromium/src/base/thread.cc:161
#15 0x0000554f603da04d in ThreadFunc(void*) (closure=0x6266045b560) at /src/moz0/ipc/chromium/src/base/platform_thread_posix.cc:38
#16 0x00007ffc98df8494 in start_thread (arg=0x3baf104e6700) at pthread_create.c:333
#17 0x00005401307f193f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
(gdb)

@khuey
Copy link
Collaborator

khuey commented Apr 18, 2017

Hmm. Can you give a dump of the trace for a few events before 38225.

@tbsaunde
Copy link
Contributor Author

mind reminding me how to do that?

@khuey
Copy link
Collaborator

khuey commented Apr 18, 2017

/path/to/rr dump -b -m /path/to/recording 38220-38230 or similar

@tbsaunde
Copy link
Contributor Author

tbsaunde commented Apr 18, 2017 via email

@khuey
Copy link
Collaborator

khuey commented Apr 18, 2017

Ok. I think what's happening is that the seccomp SIGSYS is making rr's trick to cancel the sched_setaffinity call visible to the tracee. I'll investigate more later.

@khuey
Copy link
Collaborator

khuey commented Apr 19, 2017

Should be fixed by ad4e5cf

@khuey khuey closed this as completed Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants