You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by "Michael Jumper (JIRA)" <ji...@apache.org> on 2016/12/29 18:51:58 UTC

[jira] [Updated] (GUACAMOLE-149) guac_terminal_display_set_columns endless loop use full cpu time

     [ https://issues.apache.org/jira/browse/GUACAMOLE-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Jumper updated GUACAMOLE-149:
-------------------------------------
    Description: 
Sometimes the guacamole sever use almost all cpu time. It is caused by the endless loop in {{guac_terminal_display_set_columns()}}. 

{code:none}
(gdb) bt
#0  guac_terminal_display_set_columns (display=0x30f5480, row=11, start_column=22, end_column=22, character=0x2cf3b18)
    at display.c:458
#1  0x00007f8b3fa68374 in guac_terminal_commit_cursor (term=term@entry=0x2c0b5b0) at terminal.c:649
#2  0x00007f8b3fa69329 in guac_terminal_flush (terminal=terminal@entry=0x2c0b5b0) at terminal.c:1339
#3  0x00007f8b3fa69440 in guac_terminal_render_frame (terminal=0x2c0b5b0) at terminal.c:489
#4  0x000000000040312d in __guacd_client_output_thread (data=0x2bea930) at client.c:73
#5  0x00007f8b43469184 in start_thread (arg=0x7f8b3c326700) at pthread_create.c:312
#6  0x00007f8b4319637d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) f 0
#0  guac_terminal_display_set_columns (display=0x30f5480, row=11, start_column=22, end_column=22, character=0x2cf3b18)
    at display.c:458
458             current->type      = GUAC_CHAR_SET;
(gdb) list
453
454         /* For each column in range */
455         for (i = start_column; i <= end_column; i += character->width) {
456
457             /* Set operation */
458             current->type      = GUAC_CHAR_SET;
459             current->character = *character;
460
461             /* Next character */
462             current += character->width;
(gdb) p character->width
$113 = 0
(gdb)
{code}

  was:
Sometimes the guacamole sever use almost all cpu time. It is caused by the endless loop in `guac_terminal_display_set_columns `. 

```
(gdb) bt
#0  guac_terminal_display_set_columns (display=0x30f5480, row=11, start_column=22, end_column=22, character=0x2cf3b18)
    at display.c:458
#1  0x00007f8b3fa68374 in guac_terminal_commit_cursor (term=term@entry=0x2c0b5b0) at terminal.c:649
#2  0x00007f8b3fa69329 in guac_terminal_flush (terminal=terminal@entry=0x2c0b5b0) at terminal.c:1339
#3  0x00007f8b3fa69440 in guac_terminal_render_frame (terminal=0x2c0b5b0) at terminal.c:489
#4  0x000000000040312d in __guacd_client_output_thread (data=0x2bea930) at client.c:73
#5  0x00007f8b43469184 in start_thread (arg=0x7f8b3c326700) at pthread_create.c:312
#6  0x00007f8b4319637d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) f 0
#0  guac_terminal_display_set_columns (display=0x30f5480, row=11, start_column=22, end_column=22, character=0x2cf3b18)
    at display.c:458
458             current->type      = GUAC_CHAR_SET;
(gdb) list
453
454         /* For each column in range */
455         for (i = start_column; i <= end_column; i += character->width) {
456
457             /* Set operation */
458             current->type      = GUAC_CHAR_SET;
459             current->character = *character;
460
461             /* Next character */
462             current += character->width;
(gdb) p character->width
$113 = 0
(gdb)
```


> guac_terminal_display_set_columns endless loop use full cpu time
> ----------------------------------------------------------------
>
>                 Key: GUACAMOLE-149
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-149
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-server
>    Affects Versions: 0.9.9
>         Environment: ubuntu 14.04
>            Reporter: Aiden Luo
>
> Sometimes the guacamole sever use almost all cpu time. It is caused by the endless loop in {{guac_terminal_display_set_columns()}}. 
> {code:none}
> (gdb) bt
> #0  guac_terminal_display_set_columns (display=0x30f5480, row=11, start_column=22, end_column=22, character=0x2cf3b18)
>     at display.c:458
> #1  0x00007f8b3fa68374 in guac_terminal_commit_cursor (term=term@entry=0x2c0b5b0) at terminal.c:649
> #2  0x00007f8b3fa69329 in guac_terminal_flush (terminal=terminal@entry=0x2c0b5b0) at terminal.c:1339
> #3  0x00007f8b3fa69440 in guac_terminal_render_frame (terminal=0x2c0b5b0) at terminal.c:489
> #4  0x000000000040312d in __guacd_client_output_thread (data=0x2bea930) at client.c:73
> #5  0x00007f8b43469184 in start_thread (arg=0x7f8b3c326700) at pthread_create.c:312
> #6  0x00007f8b4319637d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
> (gdb) f 0
> #0  guac_terminal_display_set_columns (display=0x30f5480, row=11, start_column=22, end_column=22, character=0x2cf3b18)
>     at display.c:458
> 458             current->type      = GUAC_CHAR_SET;
> (gdb) list
> 453
> 454         /* For each column in range */
> 455         for (i = start_column; i <= end_column; i += character->width) {
> 456
> 457             /* Set operation */
> 458             current->type      = GUAC_CHAR_SET;
> 459             current->character = *character;
> 460
> 461             /* Next character */
> 462             current += character->width;
> (gdb) p character->width
> $113 = 0
> (gdb)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)