[
https://issues.apache.org/jira/browse/GUACAMOLE-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15446767#comment-15446767
]
Michael Jumper commented on GUACAMOLE-86:
-----------------------------------------
{quote}
I also tried running guacd in docker images. Even seeing same result in docker
container instance.
...
{code:none}
guacd[18]: ERROR: Error reading data
guacd[18]: INFO: Client disconnected
guacd[18]: INFO: SSH connection ended.
{code}
{quote}
This looks different, actually. There's no segfault. It looks like the actual
underlying TCP connection to the SSH server somehow dies, and the Guacamole
side of things logs the failure and cleans things up in an orderly fashion.
{quote}
Also attaching gcore dump of both guacd and ssh process
{quote}
Unfortunately, that core dump will only be readable in the context of the
specific binary built on your system. It's unlikely that any other build will
match things sufficiently.
{quote}
Below is the gdb output from guacd ...
{quote}
The next time this happens, and you get the prompt from gdb that execution has
stopped, please use the "bt" command to produce the stacktrace. Lacking that,
gdb only prints the line where the signal was received, which in this case is
deep within a system call. The context relevant to debugging Guacamole is
further up the chain.
{quote}
... I got nothing from sshd.
{quote}
There is no need to run gdb against sshd. Only the guard process which is
created by guacd for the SSH connection needs to be debugged. For example, in
one of your earlier comments, the segfault in the system logs was:
{quote}
{code:none}
[Fri Aug 26 07:32:16 2016] guacd[4388]: segfault at 10 ip 00007f378f3faba1 sp
00007f37887d3bb8 error 4 in libpthread-2.17.so[7f378f3f1000+16000]
{code}
{quote}
The PID of the guacd process that died here was 4388. If you look earlier in
the logs, you should find something like:
{code:none}
guacd[4388]: INFO: Protocol "ssh" selected
guacd[4388]: INFO: Connection ID is "... randomly-generated identifier ..."
guacd[4388]: INFO: Starting client
guacd[4388]: INFO: SSH connection successful
{code}
That would have been the PID to attach gdb to for the sake of debugging. When
trying to reproduce this, you should:
# Connect to SSH via Guacamole as normal.
# Once connected, look at the logs to find the messages above.
# Determine the PID from those messages, and attach gdb.
# Immediately run gdb's "continue" command to prevent the connection from
timing out.
# Reproduce the issue.
# Once gdb pauses execution due to the segfault, run gdb's "bt" command to
produce a stacktrace.
As there will be multiple threads within the same process handling that SSH
connection, it is always possible that gdb will not be within the relevant
thread when the segfault signal is received, and that the stacktrace will be
bogus ... In that case, the gdb command to use would be "thread apply all bt",
which will produce stacktraces for all threads.
... That should hopefully be enough information for us to get an idea of where
things are going wrong.
> Connection closed when printing large content in SSH
> ----------------------------------------------------
>
> Key: GUACAMOLE-86
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-86
> Project: Guacamole
> Issue Type: Bug
> Components: guacd
> Affects Versions: 0.9.9
> Reporter: Nischay Rathor
> Priority: Critical
>
> Guacd is crashing when running commands with big output on stdout from web ui
> {noformat}
> Aug 25 07:10:34 ip-10-0-9-145 guacd[27432]: SSH connection successful.
> Aug 25 07:10:56 ip-10-0-9-145 server: 07:10:56.646 [Thread-5] ERROR
> o.g.g.w.GuacamoleWebSocketTunnelEndpoint - Connection to guacd terminated
> abnormally: Connection to guacd timed out.
> Aug 25 07:10:56 ip-10-0-9-145 server: 07:10:56.646 [Thread-5] DEBUG
> o.g.g.w.GuacamoleWebSocketTunnelEndpoint - Internal error during connection
> to guacd.
> Aug 25 07:10:56 ip-10-0-9-145 server:
> org.glyptodon.guacamole.GuacamoleUpstreamTimeoutException: Connection to
> guacd timed out.
> Aug 25 07:10:56 ip-10-0-9-145 server: 07:10:56.653 [Thread-5] DEBUG
> o.g.g.net.InetGuacamoleSocket - Closing socket to guacd.
> Aug 25 07:11:13 ip-10-0-9-145 server: 07:11:13.025
> [http-bio-127.0.0.1-8080-exec-5] DEBUG o.g.g.net.InetGuacamoleSocket -
> Connecting to guacd at localhost:4822.
> Wed Aug 24 19:05:37 2016] traps: guacd[29476] general protection
> ip:7f288455a24c sp:7f2874e53120 error:0 in libc-2.17.so[7f28844da000+1b7000]
> tree /
> rw-rr- 1 root root 20M Aug 25 06:20 demo.txt
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)