Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDB Debugger: Workspace IDE freeze when debugging noexit program #2508

Closed
schervet opened this issue Sep 20, 2016 · 4 comments
Closed

GDB Debugger: Workspace IDE freeze when debugging noexit program #2508

schervet opened this issue Sep 20, 2016 · 4 comments
Labels
kind/enhancement A feature request - must adhere to the feature request template.

Comments

@schervet
Copy link

schervet commented Sep 20, 2016

The workspace IDE get frozen when GDB Debugger is launched with noexit program (embedded programs, daemon, ...).

Reproduction Steps:

  1. create a workspace from C++ stack with c-simple-console project.
  2. add a while loop in Hello.c, e.g:
    int main() {
        printf("Hello World\n");
        while(1);
        return 0;
    }
  1. Compile "cd ${current.project.path} && gcc -o a.out Hello.c"
  2. In "Debug Configurations", select GDB and click on "Debug local binary"
  3. click on "Debug"

Expected behavior:

When GDB Debugger is running (because you forgot to add breakpoint on noexit program), it should be possible to stop it (suspend, disconnect...).

Observed behavior:

When GDB Debugger is running, the "Loading..." animation is freezing the workspace (Not possible to click on debug toolbar or Main Menu). The only way to get back to workspace is to refresh the browser, quickly click on "End debug session" and then refresh the browser again.

Che version: tested on 4.6 (Local Install Yatta), 4.7 (codenvy), 5.0.0-M1 (Local Install Yatta)
OS and version: VirtualBox ubuntu 14.04 64 bits
Docker version: 1.12.1
Che install: Yatta

Additional information:

  • Problem started happening recently, didn't happen in an older version of Che: No
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
@TylerJewell TylerJewell added the kind/question Questions that haven't been identified as being feature requests or bugs. label Sep 20, 2016
@TylerJewell
Copy link

@tolusha @eivantsov - this is an interesting use case. We just went through a variety of these scenarios with GDB + Artik, so surprised this particular issue is happening.

@ghost
Copy link

ghost commented Sep 21, 2016

https://github.com/codenvy/artik-ide/issues/146

Yes, this is how gdb behaves. But agree, we need to be able to exit the debug session in such a case. Although the native gdb will hang as well.

The simplest solution is to remove loader and make it possible to end debug session with stop button on the debugger panel, and if this fails kill gdb process.

@ghost ghost added kind/enhancement A feature request - must adhere to the feature request template. and removed kind/question Questions that haven't been identified as being feature requests or bugs. labels Sep 21, 2016
@schervet
Copy link
Author

Thanks for your reactivity! As you said for a quick fix I removed loader and I also placed a 10s timeout on request (files attached).
QuickFix CHE-2508.zip

Just to give you the context, I am working on embedded devices like ARM Cortex-M and I started to use Eclipse Che for a Demo (I am in contact with @slemeur on this topic). I use OpenOCD as gdb-server, and I have created a debugger plugin derivated from plugin-gdb to see if it could work in this specific use case (as you said the use case seems quite close from codeny/artik-ide, I will have a look at it). I am currently cleaning my work to make it available to the community in the next days.

I have also suggestions to create a "suspend" action, with possibility to call SIGINT signal in ProcessManager, is it better for you that I create new tickets for it or to track this suggestions here?

@tolusha
Copy link
Contributor

tolusha commented Jan 4, 2017

Suspend debugger action has been introduced.

@tolusha tolusha closed this as completed Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

3 participants