From owner-freebsd-gnome@FreeBSD.ORG Thu Feb 23 11:15:20 2012 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF3DC106566B for ; Thu, 23 Feb 2012 11:15:20 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from gwmbg.elbekies.net (gwmbg.elbekies.net [217.6.211.147]) by mx1.freebsd.org (Postfix) with ESMTP id 09F838FC15 for ; Thu, 23 Feb 2012 11:15:19 +0000 (UTC) Received: from bel.soho.vwsoft.com (p57A0D890.dip.t-dialin.net [87.160.216.144]) (Authenticated sender: relay@elbekies.net) by gwmbg.elbekies.net (Postfix) with ESMTPA id 611262E8 for ; Thu, 23 Feb 2012 11:56:49 +0100 (CET) Received: from [192.168.16.4] (dardanos.sz.vwsoft.com [192.168.16.4]) by bel.soho.vwsoft.com (Postfix) with ESMTP id DC41933CA0 for ; Thu, 23 Feb 2012 11:52:30 +0100 (CET) Message-ID: <4F461A6E.7000003@vwsoft.com> Date: Thu, 23 Feb 2012 11:52:30 +0100 From: volker@vwsoft.com User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:10.0.1) Gecko/20120214 Thunderbird/10.0.1 MIME-Version: 1.0 To: freebsd-gnome@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-ID: DC41933CA0.A280E X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com X-MailScanner-To: freebsd-gnome@freebsd.org MailScanner-NULL-Check: 1330599152.9758@47/+Ol8lSzp2czy4W8MB2g Subject: possible net/glib-networking fix X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 11:15:20 -0000 Hi gnomer's ;) Lately I was experiencing some difficulties when running www/liferea up to being useless by a sigsegv. I debugged that down to a problem in net/glib-networking g_tls_client_connection_gnutls_finish_handshake() not expecting a NULL ptr in inout_error. My fix that makes liferea work again, looks like: --- tls/gnutls/gtlsclientconnection-gnutls.c.orig 2012-02-22 14:24:44.407407576 +0100 +++ tls/gnutls/gtlsclientconnection-gnutls.c 2012-02-22 14:25:03.525221129 +0100 @@ -349,7 +349,7 @@ { GTlsClientConnectionGnutls *gnutls = G_TLS_CLIENT_CONNECTION_GNUTLS (conn); - if (g_error_matches (*inout_error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS) && + if (inout_error && g_error_matches (inout_error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS) && gnutls->priv->cert_requested) { g_clear_error (inout_error); @@ -361,7 +361,7 @@ { gnutls_datum session_data; - if (!*inout_error && + if (!inout_error && gnutls_session_get_data2 (g_tls_connection_gnutls_get_session (conn), &session_data) == 0) { For the moment I'm living fine with a local patch of the ports directory and am happy to have a working feed reader again that let liferea survive a 24h run. What scares me is, even while I have a fix, I do not have the lighest idea what triggers the bug and I fear more applications may break due to the bug in glib-networking. I would like to push the bugfix upstream but I have no idea who is best to contact (I have not yet looked for a bug tracker). Any Gnome team members listening here are willing to take it? Thanks and all the best, Volker //vwe@ FWIW, here's the transcript of the debugging session: ~> gdb /usr/local/bin/liferea GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... (gdb) run Starting program: /usr/local/bin/liferea [New LWP 142235] [New Thread 2c404300 (LWP 142235/liferea)] [New Thread 2c405500 (LWP 155815/liferea)] [New Thread 2c404c00 (LWP 155820/liferea)] [New Thread 2c409400 (LWP 156337/liferea)] [New Thread 2c5ab900 (LWP 151657/liferea)] [New Thread 2c5abf00 (LWP 156341/liferea)] (liferea:89797): GLib-CRITICAL **: g_strstr_len: assertion `haystack != NULL' failed (liferea:89797): GLib-CRITICAL **: g_strstr_len: assertion `haystack != NULL' failed (liferea:89797): GLib-CRITICAL **: g_strstr_len: assertion `haystack != NULL' failed (liferea:89797): GLib-CRITICAL **: g_strstr_len: assertion `haystack != NULL' failed [Thread 2c409400 (LWP 156337/liferea) exited] [New Thread 2c409400 (LWP 156337/liferea)] (liferea:89797): GLib-CRITICAL **: g_strdelimit: assertion `string != NULL' failed (liferea:89797): GLib-CRITICAL **: g_strchug: assertion `string != NULL' failed (liferea:89797): GLib-CRITICAL **: g_strchomp: assertion `string != NULL' failed ** (liferea:89797): WARNING **: Unrecognized image file format ** (liferea:89797): WARNING **: Unrecognized image file format ** (liferea:89797): WARNING **: Unrecognized image file format Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 2c404300 (LWP 142235/liferea)] 0x2cfc4654 in g_tls_client_connection_gnutls_finish_handshake ( conn=0x2c5542d0, inout_error=0x0) at gtlsclientconnection-gnutls.c:352 352 gtlsclientconnection-gnutls.c: No such file or directory. in gtlsclientconnection-gnutls.c (gdb) where #0 0x2cfc4654 in g_tls_client_connection_gnutls_finish_handshake ( conn=0x2c5542d0, inout_error=0x0) at gtlsclientconnection-gnutls.c:352 #1 0x2cfc64ff in handshake_internal (gnutls=0x2c5542d0, blocking=1, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:886 #2 0x2cfc65d9 in handshake_in_progress_or_failed (gnutls=0x2c5542d0, blocking=1, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:911 #3 0x2cfc6d0a in close_internal (gnutls=0x2c5542d0, blocking=1, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1094 #4 0x2cfc6e9a in g_tls_connection_gnutls_close (stream=0x2c5542d0, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1114 #5 0x2bc921a8 in g_io_stream_close (stream=0x2c5542d0, cancellable=0x0, error=0x0) at giostream.c:428 #6 0x2bc917d4 in g_io_stream_dispose (object=0x2c5542d0) at giostream.c:110 #7 0x2bd8b070 in g_object_unref (_object=0x2c5542d0) at gobject.c:2697 #8 0x2b511c50 in disconnect_internal () from /usr/local/lib/libsoup-2.4.so.1 #9 0x2b511d56 in soup_socket_disconnect () from /usr/local/lib/libsoup-2.4.so.1 #10 0x2b4ef8bc in soup_connection_disconnect () from /usr/local/lib/libsoup-2.4.so.1 #11 0x2b4ef96d in idle_timeout () from /usr/local/lib/libsoup-2.4.so.1 #12 0x2be1ac12 in g_timeout_dispatch (source=0x2c849880, callback=0x2b4ef950 , user_data=0x2cb881f8) at gmain.c:3895 #13 0x2be1732e in g_main_dispatch (context=0x2c451780) at gmain.c:2441 ---Type to continue, or q to quit--- #14 0x2be1895f in g_main_context_dispatch (context=0x2c451780) at gmain.c:3014 #15 0x2be18e75 in g_main_context_iterate (context=0x2c451780, block=1, dispatch=1, self=0x2c41f040) at gmain.c:3092 #16 0x2be196d9 in g_main_loop_run (loop=0x3c091740) at gmain.c:3300 #17 0x2b240564 in gtk_main () from /usr/local/lib/libgtk-x11-2.0.so.0 #18 0x08079d30 in main (argc=1, argv=0xbfbfe808) at main.c:351