This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 239717 - Issues with gdb in NetBeans 7.4
Summary: Issues with gdb in NetBeans 7.4
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: henk89
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-21 03:28 UTC by jackua
Modified: 2014-06-06 14:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
gdb log on "return 1" (5.53 KB, application/x-compressed)
2014-02-12 03:26 UTC, jackua
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jackua 2013-12-21 03:28:34 UTC
After switching from 7.3.1 to 7.4 with patches I found that stability of debugging is much lower than before.
- Now I can see "GDB has unexpectedly stopped with return 1" message many times a day.  Before I saw it not every day.
- Often a process is not interruptable.  I click Pause, no effect.
- I was always able to set a breakpoint while process is running.  NB suspends/resumes the process in background.  Now, very often, it does not happen.  Worse, it will restart the program that many times as many times an attempt to set a breakpoint failed.  Very annoying.
- I always used Restart button when I decided that I want to start debugging from scratch.  Now I most probably will receive "return 1" error after the program successfully started.  The program dies when I click OK.
- As usual, for many releases, NB does not kill a process properly.  The process stays as a zombie.  Check Terminate Process button.  gdb just forgot to call waitpid?  For all these years?

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 2.6.18-194.el5 running on i386; ANSI_X3.4-1968; en_US (nb)

Linux: RHEL 5.5
gdb: 7.6
gcc: 4.4.5 with std=c++0x
Comment 1 henk89 2013-12-24 10:30:09 UTC
Did you use NB 7.3.1 with the same gdb?
Comment 2 jackua 2013-12-24 19:32:10 UTC
Yes, I did.  I changed only path to NB, the rest of environment is the same.  I can run Webex session for live demo.
Comment 3 henk89 2014-01-15 12:57:36 UTC
It would be great but at first send me a GDB log (http://wiki.netbeans.org/GdbLog).
Comment 4 jackua 2014-02-12 03:20:30 UTC
Sorry for delay.  Regarding "Terminate Process" button.  Debug console does not show any kill command in it, neither /tmp/gdb-cmdsXXX.log.  Last command is about stack traversal:
(gdb)
58-stack-select-frame 2
59-file-list-exec-source-file
58^done
(gdb)
59^done,line="533",file="/.../include/c++/4.4.5/bits/stl_vector.h",fullname="/.../include/c++/4.4.5/bits/stl_vector.h",macro-info="0"
(gdb)

Here's processes states before and after pressing Terminate button:

% ps -lf -p 3617 3396
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY        TIME CMD
0 S eugene    3396  3394  6  75   0 - 43170 922418 19:15 ?          0:01 gdb -x 
/home/eugene/.gdbinit -nx --interpreter mi -tty /dev/pts/6
0 T eugene    3617  3396  5  76   0 - 216941 utrace 19:15 pts/6     0:01 /.../vvmDebug sdl.tcl

% ll /proc/3396/exe
lrwxrwxrwx 1 eugene qtrd 0 Feb 11 19:16 /proc/3396/exe -> /.../gdb-v7.6.2/Linux/RHEL5.0-2010-x86_64/bin/gdb

% ps -lf -p 3617 3396
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY        TIME CMD
0 S eugene    3396  3394  2  75   0 - 43170 32767  19:15 ?          0:01 gdb -x /home/eugene/.gdbinit -nx --interpreter mi -tty /dev/pts/6
0 Z eugene    3617  3396  2  75   0 -     0 exit   19:15 ?          0:01 [vvmDebug] <defunct>
Comment 5 jackua 2014-02-12 03:26:15 UTC
Created attachment 145065 [details]
gdb log on "return 1"

After rebuild and restart I got this again:
   GDB has unexpectedly stopped with return 1
See full log attached.
Comment 6 Vladimir Voskresensky 2014-04-18 14:16:54 UTC
Eugene, is the same happen with NB8?
Comment 7 henk89 2014-05-27 10:26:20 UTC
I tried to investigate the problem and found out that there are 2 suspicious messages in the log: the first of them says that you've set up incorrect breakpoints (try deleting them and rerun a session), the second shows that your program received a signal (if deleting breakpoints doesn't help we should investigate this case).
Comment 8 henk89 2014-06-06 14:16:24 UTC
Fixed in:
http://hg.netbeans.org/cnd-main/rev/1bb07b7d2d6b