From: vx8400 <vx8400@gmail.com>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] [p6] тестирование новых freerdp и remmina
Date: Sat, 25 Feb 2012 22:36:49 +0100
Message-ID: <CAMBdDKpp5QW7jGK3TTa0TG3QyMt-+V_cwov8HUYzZMz7DF8Gpw@mail.gmail.com> (raw)
In-Reply-To: <4F491C75.5080903@tangramltd.com>
[-- Attachment #1: Type: text/plain, Size: 2310 bytes --]
Вечер добрый,
25 февраля 2012 г. 18:37 Dubrovskiy Viacheslav:
> 25.02.2012 10:42, vx8400 пишет:
>> С включенным tls падает на завершении сессии:
>> % xfreerdp --sec tls cernts:3389
>> connected to cernts:3389
>> SSL_read: I/O error
>> Failed to check FreeRDP file descriptor
> Можно попробовать из git собрать. Там на эту тему что-то фиксили.
https://github.com/FreeRDP/FreeRDP/issues/308 ?
Собранный из trunk вываливается с той же ошибкой.
Причина в том, что при завершении сессии сервер нештатно разрывает
соединение.
xfreerdp видит, что сокет потерян (Failed to check FreeRDP file descriptor),
но все равно вызывает freerdp_disconnect() -> transport_disconnect() ->
-> tls_disconnect() -> SSL_shutdown(tls->ssl) -> ...
... -> write(дохлый сокет ...) -> SIGPIPE
Eсли не вызывать SSL_shutdown() при отвалившемся соединении, то
xfreerdp завершается нормально. Патч для проверки в прицепе.
Ошибка в remmina с разрывом соединения, возможно, не связана:
connected to cernts:3389
SSL_read: I/O error
WARNING: tls_disconnect(): the socket is already dead. Won't call
SSL_shutdown(tls->ssl).
*** glibc has detected an error in remmina: double free or corruption
(!prev): 0x09600380 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6bc4a)[0x3f1c4a]
/lib/libc.so.6(+0x6d58b)[0x3f358b]
/lib/libc.so.6(cfree+0x71)[0x3f6811]
/usr/lib/libfreerdp-utils.so.1.0(xfree+0x21)[0x735a0e0]
/lib/libglib-2.0.so.0(g_datalist_clear+0xbd)[0x136aed]
/usr/lib/libgobject-2.0.so.0(+0xea50)[0x303a50]
/usr/lib/libgtk-3.so.0(+0x2fd8e7)[0xdc58e7]
/usr/lib/libgobject-2.0.so.0(g_object_unref+0x1cc)[0x3032bc]
/usr/lib/libgobject-2.0.so.0(+0xe2f4)[0x3032f4]
/usr/lib/libgobject-2.0.so.0(g_value_unset+0x38)[0x32c9f8]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x85c)[0x31e0ac]
/usr/lib/libgobject-2.0.so.0(g_signal_emit_by_name+0x175)[0x31e3a5]
remmina[0x807b774]
/usr/lib/libgdk-3.so.0(+0x12347)[0xf3b347]
/lib/libglib-2.0.so.0(+0x45e60)[0x155e60]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1da)[0x15445a]
/lib/libglib-2.0.so.0(+0x44c58)[0x154c58]
/lib/libglib-2.0.so.0(g_main_loop_run+0x18b)[0x15536b]
/usr/lib/libgtk-3.so.0(gtk_main+0x77)[0xc3dd2c]
remmina(main+0x1cb)[0x8058fab]
/lib/libc.so.6(__libc_start_main+0xe6)[0x39cc96]
remmina[0x80578b1]
wbr,
Oleg.
[-- Attachment #2: libfreerdp-core-dead-socket.patch --]
[-- Type: text/x-patch, Size: 868 bytes --]
--- a/libfreerdp-core/tls.c 2012-02-10 03:01:42.000000000 +0100
+++ b/libfreerdp-core/tls.c 2012-02-25 21:32:00.381001657 +0100
@@ -22,6 +22,9 @@
#include "tls.h"
+#include <errno.h>
+#include <unistd.h>
+
boolean tls_connect(rdpTls* tls)
{
int connection_status;
@@ -120,9 +123,18 @@
return true;
}
+char _buf_[8];
+
boolean tls_disconnect(rdpTls* tls)
{
- SSL_shutdown(tls->ssl);
+ int n = read(tls->ssl->wbio->num,_buf_,0);
+ if (errno) {
+ fprintf(stderr,"WARNING: tls_disconnect(): the socket is already dead. Won't call SSL_shutdown(tls->ssl).\n");
+ /*SSL_free(tls->ssl);*/
+ }
+ else
+ SSL_shutdown(tls->ssl);
+ /*printf("DBG: tls_disconnect(): call SSL_shutdown(tls->ssl) tls->ssl->{rbio,wbio}->num: %d,%d SSL_get_rfd/wfd: %d,%d\n",tls->ssl->rbio->num,tls->ssl->wbio->num,SSL_get_rfd(tls->ssl),SSL_get_wfd(tls->ssl));*/
return true;
}
next prev parent reply other threads:[~2012-02-25 21:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 13:33 Андрей Черепанов
2012-02-21 20:04 ` Sergey Vlasov
2012-02-21 20:13 ` vx8400
2012-02-22 9:03 ` Андрей Черепанов
2012-02-21 20:17 ` Sergey Vlasov
2012-02-22 9:01 ` Андрей Черепанов
2012-02-22 9:19 ` Alexey Borisenkov
2012-02-24 19:31 ` vx8400
2012-02-24 22:39 ` Dubrovskiy Viacheslav
2012-02-25 15:28 ` vx8400
2012-02-25 15:42 ` vx8400
2012-02-25 17:37 ` Dubrovskiy Viacheslav
2012-02-25 21:36 ` vx8400 [this message]
2012-02-26 8:40 ` Sergey Vlasov
2012-02-26 13:21 ` vx8400
2012-02-26 15:58 ` Sergey Vlasov
2012-02-26 17:53 ` vx8400
2012-02-26 20:38 ` Sergey Vlasov
2012-02-22 12:13 ` Sergey Vlasov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMBdDKpp5QW7jGK3TTa0TG3QyMt-+V_cwov8HUYzZMz7DF8Gpw@mail.gmail.com \
--to=vx8400@gmail.com \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git