Question

How would you debug a silent EINTR /without/ software failure replay?


  • New Participant
  • 2 replies

I was asked to take a look at a failure of a test that I wrote many years ago. This failure was, as far as we could tell, new, but it didn’t look like a regression. The test was multi-threaded with asynchronous signals using setitimer() to fire SIGALRMs at it. It appeared to have completed successfully, but at the end it printed a “test succeeded” message which our test system was expecting to see, only it didn’t appear.

 

Happily our test system had saved a recording of the debuggee. Turns out that the printf(“test succeeded”) had been interrupted by a SIGALRM and so returned -EINTR. Actually it was more complicated than that - the compiler had turned the printf() into a puts(), which returns zero if it fails. This took 10-20 mins of head scratching with the recording, a few minutes thinking I was looking at a libc bug, but it was pretty straightforward really.

 

So my challenge is - how would you go about debugging that _without_ a recording?


0 replies

Be the first to reply!

Reply