gdb, poll(2), EINTR

From: Paul Barton-Davis (pbd@Op.Net)
Date: Sat May 13 2000 - 10:04:54 EST


I have a complex program that uses poll(2). When run normally, poll
never returns EINTR. When I attempt to run the program under gdb,
the vast majority of the times I try this, every call to poll returns
EINTR, making the program unusable. I am puzzled that on a few
occasions, it seems to work OK. I can detect no pattern to this.

This is with 2.3.99-pre6 SMP, plus gdb "GNU gdb 19991004". The program
is polling an audio interface that is interrupting us about every 20ms.

I assume there is a bug somewhere. Does anybody have any thoughts ?

--p

ps. I also note that for some time, gdb has been rendered pretty poor
    at handling situations in which a thread exits before the rest
    of the program. However, I very much doubt if this is kernel
    related:

  Program received signal SIGSEGV, Segmentation fault.
  0x4051d43e in exit (status=0) at exit.c:58
  58 exit.c: No such file or directory.
  Current language: auto; currently c
  (gdb) delete
  Delete all breakpoints? (y or n) y
  (gdb) run
  The program being debugged has been started already.
  Start it from the beginning? (y or n) y
  Error accessing memory address 0x4002fdc4: No such process.

    At this point, there is no way to get out of gdb except sending
    it a signal (SIGSTOP, SIGTERM, etc.)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:23 EST