Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2012 11:52:30 +0100
From:      volker@vwsoft.com
To:        freebsd-gnome@freebsd.org
Subject:   possible net/glib-networking fix
Message-ID:  <4F461A6E.7000003@vwsoft.com>

next in thread | raw e-mail | index | archive | help
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 <idle_timeout>, user_data=0x2cb881f8) at 
gmain.c:3895
#13 0x2be1732e in g_main_dispatch (context=0x2c451780) at gmain.c:2441
---Type <return> to continue, or q <return> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F461A6E.7000003>