linux - Ways to get strace-like output for Heisenbug -


i'm chasing heisenbug in linux x64 process. (attaching process debugger or strace makes problem never occur.) i've been able put in infinite loop when code detects fault , attach gdb way, shows me file descriptor (fd) should working no longer valid. want history of fd, hence trying strace, of course won't let problem repo.

other factors indicate problem gdb/strace timing. i've tried running strace -etrace=desc or -eraw=open , outputting ramdisk see if reduce strace overhead in right way trigger problem, no success. tried running strace+, order of magnitude slower strace.

the process i'm attaching partly commercial binary don't have source access to, , partly code preload process space, printf-everywhere isn't 100% possible.

do have suggestions how trace fd history?

update: added note strace+

i solved tracing problem by:

  1. preloading wrapper stub functions around relevant system calls, open(), close() , poll()
  2. logging relevant information in filename created on ramdisk.

(the actual issue race, kernel's poll() tring access pollfd memory , returning efault.)


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -