Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcso!stroyan From: stroyan@hpfcso.HP.COM (Mike Stroyan) Newsgroups: comp.sys.hp Subject: Re: ctrl-c in xdb makes starbase / X lock up Message-ID: <7370263@hpfcso.HP.COM> Date: 2 Dec 90 20:31:44 GMT References: <1990Nov30.194453.12157@nntp-server.caltech.edu> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 19 > I've repeatedly noticed that while debugging a program with xdb, > if you hit ctrl-C while the program is in the midst of starbase > calls, the computer will lock up. The pointer doesn't move, and > the offending process must be killed from another terminal. Starbase programs and the X server are sharing one display board. To do this without messing up the hardware state for each other, they use a semaphore to lock out other processes while they set up and use the display registers. When you hit break, the debugger caught the program with the semaphore held. This wouldn't be a problem, except that the debugger is running to a terminal emulator that uses the X server on that same display. You now have a deadlock. The debugger is waiting for the display semaphore while the Starbase program is waiting for the debugger to restart it. To avoid this situation you need to either run the debugger on a different display or refrain from hitting the break key in the debugger. Mike Stroyan, mike_stroyan@fc.hp.com