0

There have been several posts on this subject, none describe my problem. I have emptied (commented out) all code in each function in dictionary.c so the program should run straight through with no problems. Compile and run produces the expected error message could not load dictionary.

Run the debugger against speller with any dictionary and a small file like ralph.txt and the debugger hangs -well not strictly hangs, it just doesn't respond.

Memory usage and disk usage remain the same. CPU is 100% with gdb using 98%.

Valgrind reported no problems or leaks in the running code, before commenting out.

What is it chewing on? It can't be my code because there isn't any!

It appears that the problem goes away when the IDE is closed and then reopened. I have been debugging speller.c not dictionary.c.

1

Here is a sure fire way to duplicate your result:

  1. dictionary.c and speller.c open in editor
  2. click Debug from dictionary.c
  3. Say "Oops!" [optional]
  4. switch to speller.c tab and click Debug
  5. Watch CPU climb to 100%

This sequence leavse a gdb running, and the only way I have found to get rid of it is to kill it from a command line. Here's one way:

  1. Stop and close speller debug tab
  2. Close dictionary debug tab
  3. in a terminal: ps -fu ubuntu to show the list of process owned by user ubuntu. Something like:

    usera@ide50:~/workspace $ ps -fu ubuntu
    UID          PID    PPID  C STIME TTY          TIME CMD
    ubuntu      7112    7096  0 16:37 ?        00:00:13 vfs-worker {"pingInterval":5000,"nodePath":"/mnt/shared/lib/
    ubuntu     15710    7112  0 17:10 pts/0    00:00:00 /mnt/shared/sbin/tmux -u2 -L cloud91.8 new -s me_rina@ide50_
    ubuntu     15712       1  0 17:10 ?        00:00:00 /mnt/shared/sbin/tmux -u2 -L cloud91.8 new -s me_rina@ide50_
    ubuntu     15713   15712  0 17:10 pts/1    00:00:00 bash -c export ISOUTPUTPANE=0;bash -l
    ubuntu     15714   15713  0 17:10 pts/1    00:00:00 bash -l
    ubuntu     15975    7112  0 17:10 ?        00:00:00 /mnt/shared/sbin/node -e var net = require('net');var path =
    ubuntu     16442   15975  0 17:10 ?        00:00:00 gdb -q --interpreter=mi2 /home/ubuntu/workspace/2016/pset5/d
    ubuntu     16715   15714  0 17:11 pts/1    00:00:00 ps -fu ubuntu
    
  4. Look for the gdb process (16442 in this example) and kill it (kill -9 16442)

You may have a rogue gdb process running for a long-ago accidental debug of dictionary.c. So you might start with the ps to look for that and kill it. As far as I can tell it will run forever or until you restart your server. (Which is not the same thing as logout/login)

| improve this answer | |
  • +1 for Saying 'Ooops' :) – Nour Dec 19 '16 at 11:09
  • Ironically, I was solving the same pset5 :) – Nour Dec 19 '16 at 11:10
  • By the way, you can kill a process from the menu that appears when you click on CPU statistics at the upper right corner, and click the option 'Show Process List' – Nour Dec 19 '16 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .