« Return to Thread: gtk-gnutella-devel Digest, Vol 26, Issue 3

gtk-gnutella-devel Digest, Vol 26, Issue 3

by gtk-gnutella-devel-request :: Rate this Message:

Reply to Author | View in Thread

Send gtk-gnutella-devel mailing list submissions to
        gtk-gnutella-devel@...

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
or, via email, send a message with subject or body 'help' to
        gtk-gnutella-devel-request@...

You can reach the person managing the list at
        gtk-gnutella-devel-owner@...

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-gnutella-devel digest..."


Today's Topics:

   1.  crash at routing.c dht_find_bucket() (Meelis Roos)
   2. Re:  crash at routing.c dht_find_bucket() (Raphael Manfredi)
   3. Re:  crash at routing.c dht_find_bucket() (Christian Biere)
   4. Re:  crash at routing.c dht_find_bucket() (Raphael Manfredi)
   5.  Build failure (Hauke Hachmann)
   6. Re:  Build failure (Raphael Manfredi)


----------------------------------------------------------------------

Message: 1
Date: Thu, 27 Nov 2008 09:54:46 +0200 (EET)
From: Meelis Roos <mroos@...>
Subject: [gtk-gnutella-devel] crash at routing.c dht_find_bucket()
To: gtk-gnutella-devel@...
Message-ID: <Pine.SOC.4.64.0811270946510.5020@...>
Content-Type: TEXT/PLAIN; charset=US-ASCII

I have seen current SVN gtk-gnutella crashing abour weekly with UDP
processing problems. This time I finally got a readable backtrace and
crash location (by the way, I had to comment out the crash handler to
get sensible core dumps):

Program terminated with signal 11, Segmentation fault.
#0  dht_find_bucket (id=0xbff39f9c) at routing.c:1206
1206                            result = (val & mask) ? kb->one : kb->zero;
(gdb) bt
#0  dht_find_bucket (id=0xbff39f9c) at routing.c:1206
#1  0x08161360 in dht_fill_random (hvec=0xbff3a266, hcnt=10) at routing.c:2691
#2  0x080f7a77 in send_pong (n=0xb7166000, control=0, flags=<value optimized out>, hops=0 '\0', ttl=1 '\001',
    muid=0xb7166124, info=0xbff3a4e8, meta=0x834b5c0) at pcache.c:438
#3  0x080f889c in send_personal_info (n=0xb7166000, control=0, flags=<value optimized out>) at pcache.c:703
#4  0x080f92ae in pcache_ping_received (n=0xb7166000) at pcache.c:1928
#5  0x080de8f5 in node_parse (node=0xb7166000) at nodes.c:6790
#6  0x080df739 in node_udp_process (s=0xb7240120) at nodes.c:7155
#7  0x081374e7 in udp_received (s=0xb7240120, truncated=0) at udp.c:265
#8  0x08127c07 in socket_udp_event (data=0xb7240120, unused_source=9, cond=<value optimized out>) at sockets.c:2394
#9  0x08223b76 in dispatch_poll (unused_source=0x83a2f18, unused_cond=G_IO_IN, udata=0x8386a20) at inputevt.c:714
#10 0xb7904c7f in g_io_unix_dispatch (source=0x83a2f70, callback=0x8223a00 <dispatch_poll>, user_data=0x8386a20)
    at giounix.c:162
#11 0xb78db731 in IA__g_main_context_dispatch (context=0x83a3200) at gmain.c:2045
#12 0xb78de7a6 in g_main_context_iterate (context=0x83a3200, block=1, dispatch=1, self=0x83a5e98) at gmain.c:2677
#13 0xb78deb67 in IA__g_main_loop_run (loop=0x8521f98) at gmain.c:2881
#14 0xb7d73281 in IA__gtk_main () at gtkmain.c:1003
#15 0x081758bf in main_gui_run (geometry_spec=0x0) at main.c:693
#16 0x0805639d in main (argc=1, argv=0xbff3aba4) at main.c:1440
(gdb) p kb
$1 = (struct kbucket *) 0x0

So kb seems to be NULL...

Hope it helps someone knowledgable about the code - I have no time to
debug it currently, I'm on a big event.

--
Meelis Roos (mroos@...)



------------------------------

Message: 2
Date: Thu, 27 Nov 2008 18:03:10 +0000 (UTC)
From: Raphael_Manfredi@... (Raphael Manfredi)
Subject: Re: [gtk-gnutella-devel] crash at routing.c dht_find_bucket()
To: gtk-gnutella-devel@...
Message-ID: <ggmncu$jds$1@...>
Content-Type: text/plain; charset="iso-8859-1"

Quoting Meelis Roos <mroos@...> from ml.softs.gtk-gnutella.devel:
:I have seen current SVN gtk-gnutella crashing abour weekly with UDP
:processing problems. This time I finally got a readable backtrace and
:crash location (by the way, I had to comment out the crash handler to
:get sensible core dumps):
:
:Program terminated with signal 11, Segmentation fault.
:#0  dht_find_bucket (id=0xbff39f9c) at routing.c:1206
:1206                            result = (val & mask) ? kb->one : kb->zero;
:
:So kb seems to be NULL...

That's not possible unless `root' is also NULL.  But otherwise kb can never
be NULL (since we escape the inner loop as soon as `result' is NULL).

However, `root' is only reset back to NULL in dht_close().  So if it is
becoming NULL during operations, it means there is a memory corruption.

I am not experiencing any problem with the DHT code here and I have very large
uptimes (> 30 days).  The only time I stop gtk-gnutella is when I need to
upgrade...  And I naturally switched the DHT code on!

The next time it crashes, can you please show me the value of `root'?

Thanks,
Raphael



------------------------------

Message: 3
Date: Thu, 27 Nov 2008 19:35:52 +0100
From: Christian Biere <christianbiere@...>
Subject: Re: [gtk-gnutella-devel] crash at routing.c dht_find_bucket()
To: gtk-gnutella-devel@...
Message-ID: <20081127183552.GA14451@...>
Content-Type: text/plain; charset=utf-8

Raphael Manfredi wrote:

> Quoting Meelis Roos <mroos@...> from ml.softs.gtk-gnutella.devel:
> :I have seen current SVN gtk-gnutella crashing abour weekly with UDP
> :processing problems. This time I finally got a readable backtrace and
> :crash location (by the way, I had to comment out the crash handler to
> :get sensible core dumps):
> :
> :Program terminated with signal 11, Segmentation fault.
> :#0  dht_find_bucket (id=0xbff39f9c) at routing.c:1206
> :1206                            result = (val & mask) ? kb->one : kb->zero;
> :
> :So kb seems to be NULL...
>
> That's not possible unless `root' is also NULL.  But otherwise kb can never
> be NULL (since we escape the inner loop as soon as `result' is NULL).
>
> However, `root' is only reset back to NULL in dht_close().  So if it is
> becoming NULL during operations, it means there is a memory corruption.

Have you considered that this code is reached even if dht_initialize()
was never called?
 
> I am not experiencing any problem with the DHT code here and I have very large
> uptimes (> 30 days).  The only time I stop gtk-gnutella is when I need to
> upgrade...  And I naturally switched the DHT code on!

Yes, but it's disabled by default for many good reasons. Also you can neither
disable or enable it during run-time because the code is widely ignorant of
the setting causing crashes when changed at run-time.

--
Christian



------------------------------

Message: 4
Date: Thu, 27 Nov 2008 20:46:20 +0000 (UTC)
From: Raphael_Manfredi@... (Raphael Manfredi)
Subject: Re: [gtk-gnutella-devel] crash at routing.c dht_find_bucket()
To: gtk-gnutella-devel@...
Message-ID: <ggn0us$f0l$1@...>
Content-Type: text/plain; charset="iso-8859-1"

Quoting Christian Biere <christianbiere@...> from ml.softs.gtk-gnutella.devel:
:Have you considered that this code is reached even if dht_initialize()
:was never called?

Ouch, my fault.  Of course, this is the problem.  It's been fixed in r15883.

:Yes, but it's disabled by default for many good reasons. Also you can neither
:disable or enable it during run-time because the code is widely ignorant of
:the setting causing crashes when changed at run-time.

Indeed, support for switching the DHT on and off at runtime is not finished.

Raphael



------------------------------

Message: 5
Date: Sat, 29 Nov 2008 11:29:00 +0100
From: Hauke Hachmann <haxe@...>
Subject: [gtk-gnutella-devel] Build failure
To: gtk-gnutella-devel@...
Message-ID: <200811291129.00414.haxe@...>
Content-Type: text/plain;  charset="utf-8"

Hi list,

I get the following build failure with latest svn r15883:

cc -c -I../.. -I.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ? -DCORE_SOURCES -DCURDIR=src/dht -O2 -g -momit-leaf-frame-pointer -W -Wall -Wformat=2 -Wshadow ?
routing.c
routing.c:72:21: error: publish.h: No such file or directory

Oh, and by the way, some lines above in the build output there is also a
warning:

kmsg.c: In function ?k_send_find_value_response?:
kmsg.c:626: warning: format ?%d? expects type ?int?, but argument 4 has
type ?size_t?
kmsg.c:626: warning: format ?%d? expects type ?int?, but argument 5 has
type ?size_t?

I know that this has nothing to do with the error mentioned above, I
just happened to see it when my screen stopped scrolling by. I thought
this should perhaps be (int)'ed away...

Bye,
Hauke

(PS: sorry to the list moderators for the hassle: I first tried to send
this message with a non-subscribed address in the From header.)



------------------------------

Message: 6
Date: Sat, 29 Nov 2008 11:51:11 +0000 (UTC)
From: Raphael_Manfredi@... (Raphael Manfredi)
Subject: Re: [gtk-gnutella-devel] Build failure
To: gtk-gnutella-devel@...
Message-ID: <ggrabf$r01$1@...>
Content-Type: text/plain; charset="iso-8859-1"

Quoting Hauke Hachmann <haxe@...> from ml.softs.gtk-gnutella.devel:
:Hi list,
:
:I get the following build failure with latest svn r15883:
:
:cc -c -I../.. -I.. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include ??
:-DCORE_SOURCES -DCURDIR=src/dht -O2 -g -momit-leaf-frame-pointer -W -Wall
:-Wformat=2 -Wshadow ??
:routing.c
:routing.c:72:21: error: publish.h: No such file or directory

Sorry, I missed it when I committed my last patch.

:Oh, and by the way, some lines above in the build output there is also a
:warning:
:
:kmsg.c: In function ???k_send_find_value_response???:
:kmsg.c:626: warning: format ???%d??? expects type ???int???, but argument 4 has
:type ???size_t???
:kmsg.c:626: warning: format ???%d??? expects type ???int???, but argument 5 has
:type ???size_t???

Thanks, fixed as well.

Raphael



------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

------------------------------

_______________________________________________
gtk-gnutella-devel mailing list
gtk-gnutella-devel@...
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel


End of gtk-gnutella-devel Digest, Vol 26, Issue 3
*************************************************

 « Return to Thread: gtk-gnutella-devel Digest, Vol 26, Issue 3