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 187144 - Process is not terminated by Stop button in Output tab
Summary: Process is not terminated by Stop button in Output tab
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 14:07 UTC by soldatov
Modified: 2010-06-28 09:09 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2010-06-03 14:07:43 UTC
Scenario:
- Create Quote project
- Call "Project Properties" window
- Set Run|Console Type = Output Window
- Set Profile|Show profiling indicators during run = false
- Press OK button
- Launch project from IDE
- Set line breakpoint into quote.cc:123
- Push "Attach debugger" button in Output tab
- Type "Ann" in Output Tab
==>  debugger stopped in 123th line
- Push "Finish Debugger Session" button
==> debugger finished
- Push "Stop" button in Output tab
==> Button is disabled, but proccess is not terminated

WORKAROUND: type ENTER key ~5 times
Comment 1 Alexander Pepin 2010-06-07 14:30:20 UTC
Should be fixed in 6.9.1
Comment 2 Alexander Pepin 2010-06-21 12:10:31 UTC
The same problem happens on Gentoo Linux
Comment 3 rbalada 2010-06-22 07:49:42 UTC
Please report on progress, especially if you can make it into 6.9.1, if not please consider removing 6.9.1_CANDIDATE keyword.

Thanks,
-R
Comment 4 rbalada 2010-06-25 06:21:08 UTC
Please report on progress with fixing this bug. Deadline is approaching and this bug is not even resolved-fixed. Please inform me if you can do all the work on bugfix and verification by 1 pm Prague time today (for both - time to deliver status and time to deliver verified bugfix).

Thanks,
-R
Comment 5 Andrew Krasny 2010-06-25 07:27:43 UTC
Well... 
There were some small fixes that fix Linux part mentioned in the issue..
Unfortunately looks like Mac part has other root cause and it is in gdb attach to a process that interacts with users (requires input)... 

So it's unlikely that the issue will be fixed by the deadline. Perhaps it should be described in release notes.. 

I'll provide more details slightly later...
Comment 6 Andrew Krasny 2010-06-25 08:45:02 UTC
So... Below are my observations:

[1] gdb doesn't work when program requires input (like quote does) [on MacOS]
Actually what happens is that input stream get closed once gdb is attached/detached. 
The problem with the quote sample is that it doesn't handle this situation and falls into endless loop in case input stream is closed.

The easy way to reproduce this behavior without IDE is:

- start quote in a terminal; find-out it's PID
- start gdb in another terminal.
  (gdb) attach $PID
  (gdb) cont
        ^C
  (gdb) detach

  As a result, quote falls into an endless loop.

The same effect also happens when attach to a process from within the IDE and set/unset a breakpoint (if no breakpoint was set before attach)..

[2] after detaching (from a user program that is written so that it doesn't handle eof of input stream), gdb leaves the process in zombie state and it cannot be killed even with SIGKILL.. So this is why IDE fails to stop the process.. 


So my suggestion would be to write a note in release notes that attaching to a process that requires user interaction not supported on MacOS...


As for comment #2 I'm going to file another IZ as it is about different situation. It would be good to propagate the fixes of this into 6.9.1...
Comment 7 Andrew Krasny 2010-06-25 08:50:01 UTC
New bug regarding comment #2 filed:
Bug 188086 - Progress bar indicating process is started is not always removed on process termination
Comment 8 rbalada 2010-06-28 09:09:03 UTC
Removed 6.9.1_CANDIDATE keyword