Uploaded image for project: 'Apache Guacamole - Contributions'
  1. Apache Guacamole - Contributions
  2. GUAC-1028

Segfault in terminal emulator during resize

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.5
    • Component/s: SSH, Telnet
    • Labels:
      None
    • Sprint:
      DEV 2015-02-13
    • Story Points:
      5

      Description

      If you start an SSH session within Guacamole and resize the browser window wildly, eventually the terminal emulator segfaults:

      Program terminated with signal 11, Segmentation fault.
      #0  __guac_common_surface_rect (blue=0, green=0, red=0, rect=0x7f3007fc0bb0, dst=<optimized out>) at guac_surface.c:380
      380            if (old_color != color) {
      (gdb) bt
      #0  __guac_common_surface_rect (blue=0, green=0, red=0, rect=0x7f3007fc0bb0, dst=<optimized out>) at guac_surface.c:380
      #1  guac_common_surface_rect (surface=0x1e2eda0, x=<optimized out>, y=<optimized out>, w=<optimized out>, h=<optimized out>, red=0, green=0, blue=0) at guac_surface.c:904
      #2  0x00007f300b0415a7 in __guac_terminal_display_flush_clear (display=display@entry=0x1e2ed40) at display.c:773
      #3  0x00007f300b0416a1 in guac_terminal_display_flush (display=0x1e2ed40) at display.c:834
      #4  0x00007f300b042f16 in guac_terminal_flush (terminal=terminal@entry=0x1944e80) at terminal.c:1145
      #5  0x00007f300b043291 in guac_terminal_render_frame (terminal=0x1944e80) at terminal.c:341
      #6  0x000000000040311d in __guacd_client_output_thread (data=0x193fc70) at client.c:73
      #7  0x00007f300eba8b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #8  0x00007f300d8c57bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
      #9  0x0000000000000000 in ?? ()
      (gdb) 

      It looks like flushing might be occurring before the internals of the newly-resized surface are finished being allocated. Some locks may be in order.

      Note that the above stacktrace is from GCC-optimized code, so the line itself may not entirely make sense, but the context is correct.

      Since the telnet support uses the same underlying terminal emulator as SSH, it stands to reason this would happen there, too.

        Attachments

          Activity

            People

            Assignee:
            mike.jumper Michael Jumper
            Reporter:
            mike.jumper Michael Jumper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: