You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to understand the root cause. Do you get this on all testcases or just your test1_64 testcase?
If you run rr record under gdb using gdb --args rr record ..., then when you hit the error, can you check the fd and this->tid in Task::spawn, and look in /proc/.../fd/... to see what that fd actually is?
Activity
[-]rr record fails on windriver linux[/-][+]rr record & reply fails on windriver linux[/+]rocallahan commentedon Feb 2, 2020
I'd like to understand the root cause. Do you get this on all testcases or just your
test1_64testcase?If you run
rr recordunder gdb usinggdb --args rr record ..., then when you hit the error, can you check thefdandthis->tidinTask::spawn, and look in /proc/.../fd/... to see what that fd actually is?syrajendra commentedon Feb 2, 2020
Here is the backtrace & other values
(gdb) bt
#0 __GI_abort () at /usr/src/debug/glibc/2.24-r0/git/stdlib/abort.c:51
#1 0x0000000000875369 in rr::notifying_abort () at /b/syrajendra/git-rr/rr/src/util.cc:1325
#2 0x000000000074398a in rr::FatalOstream::~FatalOstream (this=0x7fffffffe1ea, __in_chrg=)
at /b/syrajendra/git-rr/rr/src/log.cc:360
#3 0x000000000084a438 in rr::Task::spawn (session=..., error_fd=..., sock_fd_out=0xcbfdf0, tracee_socket_fd_number_out=0xcbfaf8,
trace=..., exe_path=..., argv=..., envp=..., rec_tid=-1) at /b/syrajendra/git-rr/rr/src/Task.cc:2683
#4 0x0000000000781edf in rr::RecordSession::RecordSession (this=0xcbfa30, exe_path=..., argv=..., envp=...,
disable_cpuid_features=..., syscallbuf=rr::RecordSession::ENABLE_SYSCALL_BUF, syscallbuf_desched_sig=30, bind_cpu=rr::BIND_CPU,
output_trace_dir=..., trace_id=0x0) at /b/syrajendra/git-rr/rr/src/RecordSession.cc:1952
#5 0x00000000007819ce in rr::RecordSession::create (argv=..., extra_env=..., disable_cpuid_features=...,
syscallbuf=rr::RecordSession::ENABLE_SYSCALL_BUF, syscallbuf_desched_sig=30 '\036', bind_cpu=rr::BIND_CPU, output_trace_dir=...,
trace_id=0x0) at /b/syrajendra/git-rr/rr/src/RecordSession.cc:1913
#6 0x0000000000776b84 in rr::record (args=..., flags=...) at /b/syrajendra/git-rr/rr/src/RecordCommand.cc:582
#7 0x00000000007776b8 in rr::RecordCommand::run (this=0xca9fd0 rr::RecordCommand::singleton, args=...)
at /b/syrajendra/git-rr/rr/src/RecordCommand.cc:729
#8 0x000000000088bc9d in main (argc=3, argv=0x7fffffffeb28) at /b/syrajendra/git-rr/rr/src/main.cc:268
(gdb) f 3
#3 0x000000000084a438 in rr::Task::spawn (session=..., error_fd=..., sock_fd_out=0xcbfdf0, tracee_socket_fd_number_out=0xcbfaf8,
trace=..., exe_path=..., argv=..., envp=..., rec_tid=-1) at /b/syrajendra/git-rr/rr/src/Task.cc:2683
2683 /b/syrajendra/git-rr/rr/src/Task.cc: No such file or directory.
(gdb) p fd_number
$1 = 1001
(gdb) p rec_tid
$2 = -1
(gdb) p tid
$3 = 0
(gdb) info proc
process 23428
warning: target file /proc/23428/cmdline contained unexpected null characters
cmdline = '/var/tmp/rr/bin/rr'
cwd = '/var/tmp'
exe = '/var/tmp/rr/bin/rr'
(gdb) shell ls /proc/23428/fd/
0 1 10 11 2 3 4 5 6 7 8 9
rocallahan commentedon Feb 2, 2020
Can you compile and run this C program and tell me what you get?
syrajendra commentedon Feb 3, 2020
Here is the output of the program
$ ./test2_64
Fd 0: 0, err=Success
Fd 1: 0, err=Success
Fd 2: 0, err=Success
Fd 3: -1, err=Success
Fd 4: -1, err=Success
Fd 5: -1, err=Success
. . .
Fd 2045: -1, err=Success
Fd 2046: -1, err=Success
Fd 2047: -1, err=Success
rocallahan commentedon Feb 3, 2020
That doesn't look right. On my system I get
It looks like
fcntlis not settingerrnocorrectly when it fails. I suggest you look into that. It could be a bug in thelibcyou're using.rocallahan commentedon Feb 3, 2020
Anyway I think this is pretty clearly not an rr bug.
syrajendra commentedon Feb 3, 2020
Thank you.