The Most Efficient Gnutella Client
gtk-gnutella is a server/client for Gnutella. It runs on Microsoft Windows and every Unix-like system which supports GTK+ (1.2 or above). The GNOME desktop environment is not required. It is currently developed and tested under Linux (Debian) as well as NetBSD. It is known to run at least on Linux, FreeBSD, NetBSD, Darwin, Solaris, Tru64 UNIX (OSF/1), SGI IRIX, BeOS whereas CPU architectures include x86, AMD64, PowerPC, SPARC, MIPS. And of course Microsoft Windows (XP at least).
gtk-gnutella is free open-source software and released under the GNU General Public License (GPL).
gtk-gnutella is not finished yet, but it is fully functional: you may share, search, and download. And it is stable too, users usually just leave it run unattended for days.
All ideas and comments are welcome to the gtk-gnutella-devel mailing list. Bugs should be reported to the SourceForge.net Bug Tracker
8 April 2015, Version 1.1.3 Released
This is mainly a critical bug-fixing release, addressing a huge shortcoming in 1.1.2: all Shareaza leaves are incorrectly flagged as being fakes and are being removed quicktly from ultrapeers, creating network churn and instability. Everyone running gtk-gnutella as Ultrapeer must upgrade to 1.1.3 quickly.
Releasing quickly after 1.1.3 is also a pretext for improving stability on Windows platforms, especially after restarts: because Windows does not support the "close on exec" flag on file descriptors, restarted processes were left with several instances of a listening socket bound to the same port, causing havoc as behaviour is totally undefined and was most probably leading to the inability for the process to get any incoming connections.
On Windows, we now also monitor the memory usage more closely, in order to avoid the C runtime from issuing a (blocking) popup signalling a fatal memory allocation error should it run out of space.
More generally, the VMM layer is now capable of trapping fatal memory allocation errors and handling them more efficiently. In particular, when everything has failed, the layer can request a brutal restart of the process. Under less dire circumstances, a graceful restart will be requested.
This was also an occasion to revisit the long-term allocation strategy in the VMM layer and optimize it in order to further limit fragmentation of the VM space. Even though avoiding fragmentation matters mostly for 32-bit applications, this also limits the amount of individual memory region mappings the kernel has to maintain and gtk-gnutella has to keep track of.
Finally, a last-minute bug fix where a user reported a deadlock in the QRP processing code. After investigation, it turned out that there was indeed a recursive locking on a spinlock that had escaped all real-life testing out there so far!
- [GTK2] Added popup menu icon in front of "force push mode" for sources.
- [GTK2] Added warning icon in status bar when kernel runs short of net buffers.
- Increased default node connection timeout and size of the quick connect pool.
- Updated the shell "status" command to display "!IP" on net buffer shortage.
- Updated FAQ along with French and Turkish translations.
- Updated GeoIP databases.
- Fixed invalid test for "fake" Shareaza that led to network instabilities.
- Made QRP lock a mutex to allow for recursive locking through qrp_comp_done().
Under the Hood
- On out-of-memory conditions, attempt to auto-restart if possible.
- Windows: monitor committed memory, crashing before the kernel would kill us.
- Added crash_restart() and controlling routines to request smooth restart.
- On network buffer shortage (ENOBUFS), stop TCP connections for a while.
- UPnP: protect upnp_mapping objects given to callbacks with reference counts.
- Adjusted lock tracking when locks are disabled, fixing lock swapping.
- Windows: remember socket descriptors so that we can close them on exec().
- Refactored code for listening sockets to warn when bound port is already used.
- When shutdowning in "crash mode", skip most of the memory cleanup.
- rwlock_destroy(): make sure to write-unlock the lock if it was owned.
- waiter_ack(): don't panic if waiter was not notified, but loudly complain.
- upnp_map_natpmp_publish_reply(): trace given port on NAT-PMP mapping errors.
- upnp_discover(): force selection of IPv4 interface for UPnP discovery.
- thread_unsuspend_others(): relaxed hard assertion into a soft one.
- alloc_pages(): try harder on OOM conditions to allocate from the page cache.
- socket_connect_finalize(): fixed wrong errno processing for connect().
- socket_connect_prepare(): no need for SO_REUSEADDR for connecting sockets.
21 March 2015, Version 1.1.2 Released
This is mainly a bug-fixing release, addressing rare crashes that have been happening in production. It also contains several improvements.
It fixes a user-reported bug whreby it was not possible to properly configure the download paths using the GUI -- that led to application crashes due to the incomplete support for discovered threads (which GTK is using underneath to manage the dialog box).
Another bug was caused by the HTTP header parsing logic which did not allow "." in header names. That made it refuse to parse headers sent by some UPnP devices, such as "BOOTID.UPNP.ORG" or "CONFIGID.UPNP.ORG", prevening UPnP mappings from being installed.
Hapening rarely but still annoying, there was a bug on the error handling path of write errors to the TX network stack, leading to assertion failures in the mq_tcp_putq() routine. That was because the qrt_compressed() routine was not handling task cancellation properly. The likelyhood of hitting that bug when running as a leaf node was very low.
On the improvement side, the search list is now highlighting searches for which we have associated downloads by displaying the text in green. Further tweaks were made to our GTK2 code to make sure the changes are reported "real time" when the state changes, which was not always the case before (one needed to go over a search by explicitly clicking on it to update the display in the search list).
The SHA1 computation code was also further optimized to be as fast as possible, reducing file hashing time by two! Since SHA1 hashing happens regularily in gtk-gnutella to collect entropy, optimizing the SHA1 computation affects more than just file verification.
- [GTK2] Added translation URL in the "About" GUI dialog.
- [GTK2] Highlight searches with registered downloads by using green text.
- [GTK2] Added tri-state column sorting to the "upload history" panel.
- FAQ: added new entry explaining how to get the magnet of a shared file.
- Map the "collection" G2 query tag to the Windows / Linux "archive" file set.
- Map the "torrent" G2 query tag to the "torrent" file set.
- Added support for "rom", "wordprocessing" and "subtitle" G2 query media types.
- Further optimized SHA1 computation, now going about twice faster for files.
- page_cache_insert_pages(): fixed incorrect write-lock upgrade logic.
- pmap_insert_region(): must recompute insertion index if we extend the pmap!
- tmalloc: fixed thread magazine accounting in the depots.
- Did not commit back to database after updating the DHT key request count.
- routing_chunk_move(): must check messages carefully when chunk was moved.
- route_message(): beware of check_duplicate() which can remove the node.
- thread_element_matches(): pay more attention to discovered threads.
- thread_find_tid(): skip thread elements not marked as being valid!
- node_shutdown_mode(): must correctly account for shutdowning G2 nodes!
- bogons_changed(): forgot to close opened file descriptor
- upload_stats_load_history(): added missing break in switch.
- qrt_compressed(): was not handling QRP compression task cancellation properly.
Under the Hood
- Added hostile ranges.
- Updated GeoIP databases for IPv4 and IPv6.
- Throttle the amount of PUSH messages we can send for a given remote server.
- Legitimate Shareaza nodes cannot be flagging themselves as ultrapeers.
- Windows: stack unwinding made safer with more memory checks to avoid faults.
- UPNP: attempt rediscovery of port mapping devices every hour, if missing one.
- UPNP: attempt rediscovery of port mapping devices every hour, if missing one.
- Added new TSIG_OVFLOW signal sent when a thread overflows its stack.
- Fixed race condition between concurrent waiter_refcnt_dec() calls.
- Added logging of layer which reports a TX error in case of assert failure.
- Track the last seen time (activity) of discovered threads other than main.
- Prevent glade-2 from outputting support files now, since we patched them.
- Added tracing of funny X-Falt lines we are seeing when demsh_debug is set.
- Added tracing of funny X-Alt lines we are seeing when dmesh_debug is set.
- Added tracing of funny X-Nalt lines we are seeing when dmesh_debug is set.
- Added crash hook for the thread layer.
- Added TX layer write-fault mechansim to help detect user error handling bugs.
- Syntaxic adjustments to make the latest guile happy with definitions.
- The GUI will now display current bandwidth by default, instead of the average.
- mingw_exception(): write shorter messages in case of stack overflows.
- thread_element_reset(): forgot to reset te->stack_base to NULL.
- header_append(): allow "." in header names.
- thread_join_internal(): no thread_cancel_test_element() on foreign thread!
- thread_find_element(): avoid leaving routine without unlocking mutex!
- cond_wait_until(): now correctly handle underlying cond variable mutation.
- thread_block_timeout(): don't panic if main thread already unblocked.
- dir_entry_filename(): made the Windows version thread-safe.
- hfield_dump(): fixed formatting of continuation lines.
- dmesh_collect_locations(): only parse the last timestamp when many given.
- xmalloc_thread_free(): always handle blocks in the cross-thread free list.
- Hide strtok_free(), forcing clients to use new strtok_free_null().
2 September 2014, Version 1.1.1 Released
This is mostly a bug-fixing release.
- Share Opus files by default, added opus and webm to search filters.
- No longer automagically unshare directories that do exist currently.
- Revamped peek/poke functions because GCC generated unoptimized code for these.
- Avoid crash when we cannot parse the remotely supplied push-proxy URL.
- Fixed crash when entering "local:" as search term.
- Fixed crash when gtk-gnutella was stopped from terminal and put to background.
- Fixed crash on "Reverse DNS lookup" queries from the GUI node pane.
- Fixed GtkSpinButton "adjustment with non-zero page size" deprecation message.
- Handle G_SEARCHPATH_SEPARATOR in shared base directory correctly.
Under the Hood
- shared_file_get_index(): fixed lower boundary of assertion.
- fi_find_aggressive_candidate(): prevent division by 0 if no starving download.
- Fixed possible race condition between bg_task_wakeup() and bg_sched_sleep().
- Regenerated Configure to allow BFD library detection for newest versions.
- teq_post_rpc(): use linearily increasing timeouts to limit logging.
- str_vncatf(): made recursion checks before calling s_minicarp() thread-safe.
- ut_frag_pmsg_free(): avoid SIGSEGV when fragment was already acknowledged.
- deflate_add(): refuse further data when the TX deflate layer had an error.
- search_dequeue_all_nodes(): must also iterate on G2 nodes.
- cq_heartbeat(): only log delay adjustements when running with cq_debug > 0.
- g2_node_handle(): silence warnings when not debugging.
- Allow xfl_find_freelist_index() to work with gcc 4.9 and optimizations.
- keys_offload(): do not process if the key layer was shutdown.