forked from gtk-gnutella/gtk-gnutella
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
9791 lines (8745 loc) · 488 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# v 1.2.3 2024-03-03 [stable]
This is a maintenance release with minor bug fixes.
Improvements:
- Allow final address to be used as a search and sorting column in GUI.
- Do not hide the "random stats" shell command in the help.
- Shell "node add" now supports g2:IP:port for G2 nodes.
Bug Fixes:
- Avoid assertion failure in xmalloc() when the page size is not 4K
- Fix build on NetBSD with SSP.
- Avoid conflicting symbol with NetBSD's powerpc/frame.h
- Force supervisor to quit if child gets a SIGKILL.
- Forgot to set te->ptid in discovered threads.
Under the Hood:
- Add aq_on_available() to hide waiter object.
- Add debugging #define XMALLOC_DISABLED to remap xmalloc() to malloc().
- Add randomness every minute instead of 30 seconds.
- Dump held locks when suspending thread with locks.
- Fix thread_lock_dump() logic.
- Recent version of glib define G_NORETURN already.
- Use library popcount() if it exists.
- Use an integer for atomic_lock_t (or it fails on Darwin ppc32).
- atio_get_lock(): no need to hash file descriptor.
- crash_hook_add(): watch out for early inits.
- crash_init(): ignore subsequent calls, loudly.
- crash_mode(): disable locking on concurrent crash.
- dump_hex_vec(): do not re-emit header if reached end.
- entropy_collect_gateway(): cache initial gateway information.
- entropy_harvest_many(): accelerate processing.
- evq_close(): forgot to free local callout queue.
- getgateway(): avoid endless warnings.
- hashlist: avoid race condition for moveto operations.
- random_double_generate(): ensure value is in [0, 1[.
- ripening_set_expire(): remove faulty assertion.
- rwlock_deadlocked(): trace locking thread owner.
- rwlock_lock_granted(): verify waiter presence.
- rwlock_readers_downto(): issue a memory barrier.
- shared_file_free(): give more details on assert failure.
- semaphore_emulate(): was not handling timeout properly.
- sig_get_pc_index(): also trap SIGBUS for OS/X.
- socket_tls_upgrade(): synchronous upgrade logged but no longer fatal.
- str_private(): must use NOT_LEAKING_Z() for walloc().
- str_slice(): change semantics of `to'.
- thread_element_reset(): also clear lock stack overflow.
- thread_lock_dump(): can now omit details if necessary.
- thread_lock_released(): give more context on problems.
- thread_sig_handle(): add default handling of TSIG_TERM.
- vmm_mmap_anonymous(): optimize re-locking.
- walloc_get_zone(): do not keep lock whilst allocating zone.
- xmalloc_chunk_allocate(): validate chunk head is sound.
- zalloc: do not keep lock whilst extending the zone.
- zget(): limit scope of global spinlock to a minimum.
# v 1.2.2 2022-02-25 [stable]
This is a maintenance release with major bug fixes.
There were several shortcomings with bandwidth management: capping was not
performed correctly and could overuse uploading bandwidth. Also when the DHT
is turned off or on, we need to recompute proper bandwidth stealing.
Corruption of the DHT disk databases could also lead to a crash.
There was a critical old bug in the Dynamic Querying layer that affected
Ultrapeers mostly: we could corrupt memory and/or crash when the current node
was removed and we were processing a Dynamic Query for that node. This is
more likely to happen when running as an Ultrapeer but it could also affect
nodes running as leaves, although the probability of that bug happening is
much less in that case.
Finally, it is best to not iterate on a global list that could get changed
due to a node removal. This was the case when sending pongs to neighbouring
nodes, so we now take a private copy.
Improvements:
- Extended "props" shell command with -e (exact) and -i (ignore missing).
- The "props" command now takes a set of properties, handled as one batch.
Bug Fixes:
- Properly recompute bandwidth stealing on DHT changes.
- Avoid crashing in D-Bus lib when filename is improperly UTF-8 encoded.
- DHT: protect against corrupted database.
- bw_available(): fix invalid logic for I/O source capping.
- pong_all_neighbours_but_one(): iterate on local list.
- dq_node_removed(): must free dq object asynchronously.
Under the Hood:
- Update IRC network information: moved from freenode to libera.chat
- Chunk size limiting for uploads accounts for bandwidth.
- Reduce memory footprint for statx_t if no data kept.
- CQ: defer freeing of dispatched event.
- watchdog: be more verbose within critical messages.
- node_parse(): signal to callers when we have BYE-ed the node.
- cq_event_called(): use better diagnostic on assert failure.
- dbus_util_send_message(): protect against invalid text.
- prepare_entry(): ensure entry invariant remains true.
- wd_expire(): do nothing if watchdog was asleep.
# v 1.2.1 2021-07-12 [stable]
This is a maintenance release with minor bug fixes.
Note that our project IRC #gtk-gnutella channel is now on irc.libera.chat.
When launching gtk-gnutella and there is a stale lockfile present, listing
some PID, and it happens that there is already another process running
under this PID, we abort, complaining that another gtk-gnutella is running.
However, if the lockfile is really stale, and the PID listed in there has
nothing to do with gtk-gnutella at the moment, the user will need to remove
the stale lockfile. Hence we show them the command to run, listing the
full lockfile path so that it is easy to overcome this little inconvenience!
When using hashtables for memory management, it was possible to trigger a
resizing and, during the course of operations, have further memory used,
requiring tracking of new items in the same hashtable we were in the
process of resizing. That led to double VMM freeing of the region used
to store the data.
Add properties to track bytes exchanged by schedulers. These properties
track the amount of bytes exchanged by session and are reset to 0 whenever
a new user session starts. It allows users to see the actual amount of
data consumed by running gtk-gnutella sessions, programmatically via the
shell interface.
Add -t switch to shell "status" command: this displays the total amount
of bandwidth consumed during the session for the different schedulers.
Improvements:
- Show command to clean stale lockfile.
- Add properties to track bytes exchanged by schedulers.
- Add -t switch to shell "status" command.
- Make use of libera.chat instead of freenode.
- Expiration time now increased from 1 to 2 years.
- New --no-expire switch to disable GUI popup when expired.
Bug Fixes:
- pattern_prefix_period(): don't corrupt end-of-block.
- Fix subtle recursive resizing bug.
- Do not emit empty leading description in saved properties.
- For time sync over UDP, write replying time later!
- hash_table_resize(): clear last cached lookup!
- ev_link(): insert events in the proper bucket!
Under the Hood:
- Updated GeoIP databases.
- Ad bit_generic_count_set().
- Add plural_child().
- Add progstart_was_called().
- Add H_STRFREEV_NULL().
- Add syn=c to *.ht and *.ct files for vim.
- Add hash_table_copy_foreach().
- Add tm_precise_elapsed_ns() convenience routine.
- Add thread_stack_size() to get configured stack size.
- Add pattern_string() to get the string being looked for.
- Add str_2c_from() to grab C string from a given offset.
- Add eval_subst_atom().
- Add stacktrace_caller_fast() and stack-test program.
- Add thread_{un}suspend().
- Add tmalloc_contains() for assertions.
- Add public VMM validate/invalidate routines.
- Add macros to ease printing for tmval and tmspec.
- Add node_check() to node traversal loops.
- Avoid branches in SIGN() as well.
- Avoid regeneration of Geo DB if no data changes.
- Bump python dependency for jhbuild on OSX.
- Better clock skew computation.
- Handle time-sync exchanges via UDP better.
- Make use of travis cache feature for OSX builds.
- Only include <sys/sysctl.h> if we actually need it.
- Allow compilation with usemymalloc=n on 32-bit CPUs.
- Let mem_test() run only once.
- When no backtrace(), ensure we compile with a frame pointer.
- Compile with -DTRACK_MALLOC -DREMAP_ZALLOC again.
- Made -DTRACK_ZALLOC usable again.
- Do not check stack at longjmp() if on altstack.
- Do not trap hash_list_{new,free}() under REMAP_ZALLOC.
- Ensure properties use xmalloc() for their values.
- Wait until main() starts to allocate the signal chunk.
- Made ascii_toupper() and ascii_tolower() avoid branching.
- Trace saving time whithin property files.
- Trace page (PA) and offset within page on SEGV.
- Trace page protection on SEGV faults, if possible.
- Trace how and where symbols were loaded in crash log.
- Symbol quality definition moved to symbols!
- Windows: handle freopen("a") specially to allow read sharing.
- Windows: no need to dump stack again if no gdb.
- mutex: supply more context on lock errors.
- ostream: now also accepts str_t as output medium.
- rwlock: added debug option to track wlock location.
- random-test: added -a to benchmark all routines.
- random-test: add -v to be verbose when -a is used.
- VMM: added extra debugging tools / assertions.
- VMM: trace new compile-time options.
- clock: simplify code by using aging table.
- xmalloc: avoid late page pool creation.
- xmalloc: extended assertions to detect freelist corruption.
- zalloc: avoid warnings when compiling with REMAP_ZALLOC.
- zalloc: with ZONE_SAFE, ensure block tagging never changes!
- malloc.c: enhanced and fixed some errors with multi-threading.
- malloc.c: huge refactoring and cleanup.
- aging_destroy(): remove periodic GC before cleanup.
- bfd_util_init(): avoid warning on bfd_init() call.
- clock_adjust(): removed MAX_SDEV.
- clock_adjust(): stop pruning if we keep everything.
- clock_update(): lowered required amount of data.
- compat_setjmp(): protect against gone contexts.
- crash_handler_process(): only call crash_auto_restart() if needed.
- ev_free(): assert event is not linked in queue!
- ev_unlink(): added list consistency assertions.
- eval_subst(): remove the size limitation on the susbtituted string.
- evq_close(): be silent if event queue not created.
- fi_pick_rarest_chunk(): fixed assertion failure.
- fi_pick_rarest_chunk(): log assertion values.
- get_prop(): also trace failing property when ps is NULL.
- ggept_filesize_encode(): can return 0 if given 0.
- hash_compute_increment(): make it odd without branch.
- main(): do not set a crash dir if not running for long.
- name_to_single_host_addr(): use pslist_random().
- ntp_send_probes(): comment updates, cleanup.
- once_recursive(): avoid calling stacktrace_function_name().
- progstart_duplicate(): added assertions.
- prop_lock(): use macro for locking (hiding lock type).
- rwlock_deadlocked(): trace write owner if known.
- spinlock_loop(): document why no memory barrier.
- statusbar_gui_push_v(): be safe if called early.
- str_avail(): new implementation and semantics.
- str_ichar() and str_istr() can now append.
- strvec_cpy(): was failing when called with cnt=0.
- thread_id_name_to_buf(): be nicer with negative IDs.
- thread_lock_waiting_done(): cleanup when no problems.
- tok_version_valid(): no longer run clock_update().
- xcopy(): not defined as inlined routine when TRACK_MALLOC.
# v 1.2.0 2020-07-09 [stable]
This is an evolution release, hence the minor version bump.
Several cases of bad input (from network) causing assertion failures were
fixed. In particular, bad DHT response after a security token lookup or
invalid G2 input streams were fatal.
There was also a critical bug, originating from a harmful code typo, which
led gtk-gnutella to serve unvailable file chunks from partial files, as if
they were available, resulting in unintended download corruption on the
remote end!
Thanks to Laurent Gil's efforts, it is now possible to run gtk-gnutella from a
Docker container. See https://github.com/angegar/gtk-gnutella-docker.
Running within docker raised some issues about sbrk() and thread_self(),
which were fixed.
The computation of the build date was fixed, to avoid corner cases where
gtk-gnutella would complain it was "old" when freshely compiled from
up-to-date sources in a git tree whose "master" branch was only infrequently
updated.
The file selector was fixed, to avoid displaying grayed-out folders, a setup
wich did not allow one to actually select directories in the preferences.
Many improvements were done to allow smoother uploading for servents with
more bandwidth than the recipients. Instead of drastically limiting upload
bandwidth (which was negatively impacting everyone), we are now monitoring
and adjusting our uploading speed to avoid congestion on the remote end.
When stalling happens, we also react quickly to reduce the available bandwidth
of the connection, not that of all connections to whom we are uploading.
We also no longer rely on MaxMind GeoIP for providing the IP -> country
mappings. Their distribution mode now requires a specific licence which seems
totally incompatible with the gtk-gnutella's distribution mode. Instead, we
are now using IP2Location, and the GEO_LICENCE file now lists the conditions
under which these data are re-distributed (gtk-gnutella transforms the data
into a form that it can digest, so we are distributing a modified, derived
work, not the original).
If you are still using a version of gtk-gnutella earlier than the 1.1.x
series, you are strongly encouraged to upgrade. Starting from this release,
we are now considering these versions too old to connect to.
Improvements:
- Let --compile-info show which malloc() is used.
- It is now possible to run gtk-gnutella from a Docker container.
- Added details in the README file about required packages to compile.
- Use gradual bandwidth penalty when uploads are stalling.
- Added upload bandwidth capping.
- Forcefully reduce request chunk if b/w is limited.
- Emit a Retry-After header on 416 replies.
- On HTTP 416, emit a Last-Modified header.
- Switched to IP2Location for mapping IPs to countries, dropping MaxMind GeoIP.
- Upload tab now shows our own partial completion ratio, not just "(partial)".
- Detect abuse from HTTP clients not reading payloads.
- Enforce Retry-After softly.
- Ban them when they abuse of the browse-host feature.
- Smarter detection of duplicate incoming Gnutella connections.
Bug Fixes:
- [GTK2] Fixed file selector to avoid greyed-out folders.
- [GTK2] Guarantee updating of properties when refresh button is clicked.
- Added emergency path during startup should sbrk() fail.
- Fixed instructions following build.sh run.
- Fixed possible thread_self() instability at startup.
- Fixed backward portability issue with the BFD library.
- Fixed computation of build date.
- Fix 2 harmful typos, affecting serving of partial files.
- Regenrate Configure to fix gccversion usage bug.
- Restored compilation of a standalone local shell.
- Remove executable permissions on C source file!
- Rename our ARC4 interface on systems with native arc4random().
- Updated all files to fix obsolete FSF postal address.
- Avoid banning hosts issuing legitimate upload requests.
- Implement GNU extension malloc_usable_size() when using our malloc().
- UHC: when hardwired list is exhausted, reload it.
- Make Content-Range and Content-Length prioritary headers.
- ban_allow(): was never returning BAN_FORCE.
- download_reply(): reload available ranges after 416 if needed.
- download_stop_switch(): forgot to remove passive queue indication.
- gtk_gnutella_exit(): must close UPnP layer before HTTP.
- http_send_status(): reworked to avoid undue header truncation.
- node_g2_read(): fixed faulty assertion.
- pb_token_found(): be more robust against unexpected input.
- search_gui_close_search(): avoid crash when emptying search list twice.
- update_available_ranges(): revisited range processing logic.
- upload_416_extra(): was generating non-compliant headers.
- vmm_dump_pmap_log(): fixed deadlock.
- download_moved_with_bad_sha1(): always reset fileinfo.
- file_info_reset(): also discard previous TTH info.
Under the Hood:
- Added temporary "xk" country code for Kosovo.
- Added vmm_type_pointer() to determine region type.
- Add lingering period for unreferenced file_descriptor objects.
- Add shell command "show files -d" to list currently used file_descriptor.
- Raise minimum b/w scheduling slot to 256 bytes per second.
- Fixed HashGenericCat() in Jmakefile, leading to wrong .c dependency.
- Fast assertions are a must for GTKG nowadays, always compile with them.
- Do not post multiple randomness generation messages.
- Split bit_generic routines into .ht and .ct.
- Reserve file_object_close() for user code.
- Made it possible to compile with TRACK_MALLOC again.
- Improved "thread elements" shell command to trace callback function names.
- Avoid VMM magazine allocation when running with TRACK_MALLOC.
- Enhanced TRACK_MALLOC to be able to trap xalloc() as well.
- Enhanced TRACK_MALLOC debugging power with MALLOC_CATCH_MALLOC.
- Extended bool_to_string() to display value if not 0 or 1.
- TEQ: optimize I/O events by posting them directly to I/O queue.
- VMM pmap logging shows allocated size per fragment type.
- Removed gone / probably gone logic for discovered threads.
- Ensure thread_atexit() callbacks run in discovered threads.
- Ensure walloc0() redirects to underlying zeroing routines, for statistics.
- Simplified shell I/O condition management and logging.
- Separate Gnutella and HTTP (upload) banning categories.
- STATIC_ASSERT: use a more compact version for less verbose errors.
- Made thread exit value read-only in thread_atexit() callbacks.
- Emit thread mask in crash logs upon detected deadlock.
- ADNS: the cache is now thread-safe and cached replies shuffled.
- ADNS: added expiring periodic callback for cached DNS entries.
- Added new "adns_debug" property for ADNS debugging.
- Avoid g_memmove() which has been deprecated.
- Added ripening_contains() and ripening_update() routines, not used yet.
- Optimize ripening table when no value is kept.
- Use aging table to track download mesh sending times.
- Use 429 instead of 550 for "Too Many Requests".
- Remind less often about banning status.
- Let emulated alloca() cleanup when thread exits.
- Ensure alloca_stack_direction_compute() is never inlined.
- Smarter detection of duplicate incoming Gnet connections.
- xmalloc: must "embed" xstrdup() and xstrndup().
- xmalloc: simplified allocation entry points.
- xmalloc: ensure stricter memory alignment when xmalloc() replaces malloc().
- ban_delay(): fixed to return remaining ban time.
- ban_force(): read incoming data before shutdown().
- ban_vendor(): GTKG earlier than version 1.1 deemed too old.
- bitcmp(): use memcmp() for byte comparison.
- bool_to_string(): added carp trace to help spot the culprit.
- cq_cancel(): fix logic to return TRUE if event was NULL.
- crash_deadlocked(): no longer dump stacks.
- crash_handler(): enter thread crash mode before signal cleanup.
- crash_time_internal(): use thread_safe_small_id() in raw mode.
- download_queue_delay_switch(): explicitly turn off queuing if switching.
- download_queue_v(): explicitely reset passive queuing info.
- download_reply(): Content-Length not necessary if Content-Range.
- download_send_push_request(): trace server GUID.
- erbtree_foreach(): added cheap safety assertion.
- evq_trampoline(): cleanup event if cannot signal thread.
- extract_retry_after(): ensure amount in seconds is the only value.
- fi_pick_rarest_chunk(): be smarter about selected chunk.
- fi_pick_rarest_chunk(): ensure first free chunk is available.
- hcache_fill_caught_array(): fix array fill logic.
- http_send_status(): ensure generated header has trailing CRLF.
- local_shell_mainloop(): must flag "writable" on POLLHUP.
- mingw_exception_log(): use static variables and be more careful.
- natpmp_handle_discovery_reply(): trace inconsistent replies.
- natpmp_handle_mapping_reply(): trace inconsistent replies.
- parq_upload_send_queue(): tie PARQ upload queue and upload.
- pcache_pong_received(): also validate changing ports.
- rand31: avoid race condition during intial seeding.
- random_pool_append(): ensure no endless recursion, ever!
- send_pproxy_error_v(): remove dead code.
- shell_handle_event(): always write() when having pending data.
- shell_handle_event(): on exception, setup EOF/shutdown.
- shell_write_data(): make sure to flush as much as possible.
- sig_compute_pc_index(): be paranoid about optimization.
- signal_name(): contort to avoid gcc-10 warning.
- signal_trap_with(): avoid kernel signal desynchronisation.
- signal_uncaught(): dump stack trace if harmful signal.
- sorted_array_lookup(): sort array if they forgot to do it!
- spinlock_deadlocked(): capture lock status early.
- stacktrace_atom_lookup_and_store(): trace race conditions.
- stacktrace_load_symbols(): do nothing if too early.
- thread_create_full(): keep async exit callback separated.
- thread_deadlock_check(): disable locks when deadlock is certain.
- thread_deadlock_check(): only dump stacks of involved threads.
- thread_stack_check_overflow(): also log used stack size.
- upload_remove_v(): create better logging message.
- vmm_malloc_inited(): now only called internally.
- xmalloc_show_settings_log(): trace chosen memory alignment.
- zgc_zalloc(): transformed some assertions into verbose ones.
# v 1.1.15 2019-07-14 [stable]
This release is a maintenance one fixing several minor bugs and two annoying
ones:
- The semi-reliable UDP layer could crash due to an assertion that started
to trigger with the introduction of an explicit flush before the message
times out for transmission.
- Due to an overseen condition, we were not able to serve seeded files when
Partial File Sharing is enabled. A seeded file is a completed file that
still lies in the downloaded directory but is not part of the library
directories.
The OOB banning code for hosts that never claim their OOB hits was also
revisited to prevent problems with hosts that query a popular file and then
get submerged by hits and thus refrain to claim the additional hits. We are
now much more tolerant to avoid accidentally banning innocent hosts.
On Windows, the disassembling of machine instructions was enhanced to further
improve the ability to correctly issue symbolic stack traces when encountering
assertion failures or during crashes.
Finally, the Geo IP databases were refreshed.
Improvements:
- OOB: increased timeout for OOB hit delivery.
- OOB: switch to unreliable notification if semi-reliable UDP fails.
- OOB: raise the bar for banning after unclaimed OOB hits.
- Dynamic Hits: let us forward hits that bear a small amount of results.
- Count amount of banning we have to do for OOB querying hosts.
Bug Fixes:
- Rename statx struct to statistics to avoid name collision.
- browse_host_read_html(): fixed English typo.
- dl_util_query(): forgot to restore old signal handler.
- file_info_restrict_range(): was not serving seeded files!
- main(): do not let the supervisor process restart on crash!
Under the Hood:
- Added thread_stack_diff() to compare stack pointers.
- Added PLURAL() macros.
- Added clz64() to count leading zeroes on a 64-bit quantity.
- Added OP_CTZ() and OP_CLZ() to work on op_t quantities.
- Added pattern_memrchr() and pattern_strrchr() implementations.
- Jumbo patch to use vstrrchr() instead of strrchr().
- BIT_GENERIC_BIT() does not need the base argument.
- Factorized prefix-matching from sorted array.
- pattern.c: fix compiling with old gcc (version 4.4)
- pattern.c: forgot to include "endian.h".
- str: avoid "char" as parameter or return type, use "int".
- Windows: if not a "registered product", leave logs in current dir.
- Windows: enhanced stack unwinding.
- Windows: added option to debug backtraces "on crash" only.
- Windows: when backtracing, also parse another MOV instruction.
- Windows backtrace: also parse "add xx,%esp".
- compat_poll(): can now use poll() on Windows.
- evq_close(): warn when EVQ is not terminated after 2 seconds.
- file_info_moved(): no warning on file size if file still partial.
- main(): set a different product nickname for supervisor.
- mingw_analyze_prologue(): handle cases where no SP adjustment done.
- mingw_exception(): also log symbolic thread name if available.
- mingw_exception(): disable signals on stack overflow.
- mingw_exception(): interpret exception information differently.
- mingw_exception_log(): if PC looks invalid, try to intuit caller.
- mingw_file_rotate(): preserve extension during renaming.
- mingw_ftruncate(): it is OK if current offset is beyond truncation.
- mingw_get_return_address(): enhanced scanning for prologue.
- mingw_get_return_address(): validate next PC by checking CALL before.
- mingw_get_return_address(): validate stack pointer before access.
- mingw_thread_sig_deliver(): special-case signals for current thread.
- pattern_compile(): must use WALLOC0() for allocating!
- pattern_strstr_tiny(): fixed starting condition for aligned processing.
- rwlock_upgrade_from(): don't wait for readers in pass-through mode.
- rwlock_wait(): dump lock waiting queue when tracing sleeps.
- rwlock_wait(): trace summary when logging contention / sleeping.
- str_private(): declare non-leaking parts for TRACK_ZALLOC.
- teq_monitor(): trace pending events as well.
- thread-test: for interrupt tests, timeout if no interrupt received.
- thread_backtrace_capture(): avoid recursion and disable signals.
- thread_id_stack_used(): fixed for decreasing stacks.
- ut_frag_pmsg_free(): be more robust, avoid internal assertion.
- vmm_crashing_alloc(): better abort explicitly if no memory.
- wmove(): make sure it's a no-op with TRACK_ZALLOC.
# v 1.1.14 2018-10-04 [stable]
This release mostly improves the core routines and fixes a few important bugs.
Due to a bug in the usage of the RX buffers, we were not correctly parsing
data returned in "chunked" transfer-encoding by HTTP/1.1 servers. This
affected the UPnP logic.
The UPnP port unmapping done when the program shuts down was also not being
able to complete successfully because we were preventing the HTTP connection
from going on during the shutdown. Not critical because there is a lifetime
attached to all mappings, but always best to properly clean-up when leaving.
The algorithm used to pick random chunks to download was also revisited to
ensure a uniform selection within the whole file ranges that remain to be
fetched.
At startup time, the DHT code no longer expires keys when reloading data.
This could create crashes during the operation, with no other remedy than
to erase all the DHT database files manually to be able to recover!
The background task layer was also causing crashes (at exit time though)
because it was not recording whether it was running "user" code as opposed
to "kernel" code.
The SDBM code was also improved to allow concurrency and, in particular,
a "loose" iteration scheme which does not need to grab the database lock
during the whole iteration process. It is also possible to perform a
concurrent database rebuilding.
The thread runtime now has an improved deadlock detection engine, based
on a topological sort, that can definitely tell whether we are deadlocked.
When the deadlock is detected, we can also have more information about
the threads participating in that deadlock condition, to assist debugging.
On Windows, a bug in our mingw_dlerror() emulation caused it to always
fail once an error had been recorded, leading to un-decorated subsequent
stack traces, which really do not help on that platform!
There was also a concurrency bug in the processing of network queries.
Every time the library was rescanned, it could trigger a crash due to
a memory zone being declared private and was in fact shared between
threads. The crash occurred only when a query was received on the
Gnutella network whilst the library was rescanned.
The semi-reliable UDP layer TX side was revisited to maximize chances that
reliable messages get through completely.
The pattern matching code was revisited thoroughly. A new algorithm (2-Way
String Matching) now complements the Quick Search algorithm and an initial
benchmarking is done to compare our own matching routines with native libc
versions of strstr(), strlen(), strchr() and memchr(). The fastest routine
is then selected, to ensure optimal performances. There is also a unit-test
program ensuring proper semantics for the pattern search flags.
New Features:
- Added UDP scheduler message statistics by priority.
Improvements:
- [GTK2] Catch column resize events to persist widths quickly.
- Added "shutdown -x" to stop the program and continue session next time.
- Added --resume-session option to request explicit continuation.
- Improved pattern matching with new algorithm and runtime benchmarking.
- Persist current_peermode to restart in same mode after crash.
- Record compilation date and time for the crashlog.
- When running with no GUI, relax mem requirements to become ultra.
- Use minimum download chunk size to align requested download offsets.
- Added statistics for OOB hit notifications we process.
- Extensive improvements of the SDBM code to allow concurrency.
- Semi-reliable UDP TX layer now sends messages more aggressively.
- Reduce memory footprint of compiled patterns for short patterns.
Bug Fixes:
- No longer supply -lgthread-2.0 and -lresolv at link time.
- DHT: do not expire keys when reloading data at startup.
- Restored alphabetical listing of command options in the man page.
- The --use-poll argument was not mentioned in the manual page.
- UPnP: fixed XML logging.
- UPnP: was not correctly unmapping ports on servent shutdown.
- crash_time_internal(): protect against recursions in raw mode.
- file_info_retrieve(): must restore proper mtime for seeded files!
- filter_apply(): fixed suffix matching to allow whole match.
- http_data_ind(): could not process chunked data!
- iov_contiguous_size(): fixed destructive implementation.
- pslist_last_count(): fixed off-by-one error.
- recursive_scan_step_build_partial_table(): removed assertion.
- statx_opx(): use fabs() on double.
- word_vec_init(): zone cannot be private.
- zgc_subzone_defragment(): fixed improper assertion.
Under the Hood:
- Added hidden --no-build-version option.
- Added cstr_{b,f,l}cpy() routines to supplant g_strlcpy()
- Added strpcpy() which returns pointer to last copied trailing NUL.
- Added vmm_move() to move allocated VM regions to better places.
- Added G_FALL_THROUGH and fixed fall-through in switch cases.
- Added assertions in embedded lists for insertions / removals.
- Added new _mark_removed() and _link_mark_removed() for lists.
- Added is_ascii_ident() to check "\w" (word) in ASCII.
- Added ULONG_SWAP().
- Added op_roundup() and op_ptr_roundup() to round to upper aligned boundary.
- Added stats datapoint iterators and ability to remove outliers.
- Added G_FAST and G_NO_OPTIMIZE compilation directives.
- Added support for case-insensitive pattern matching.
- Added zone_info() to request zone allocation stats.
- Added p[s]list_shift_data() to remove head when NULL is valid data.
- Attempt relocation of hash tables arenas once in a while.
- Always capture and display the routine name in assertions.
- Disable parallel make execution in src/if.
- Fixed indentation for "if" and "else" leading to gcc 7.x warnings.
- Fixed logging fast assertion macros to allow just one string.
- Declare property choices[] array static and const!
- Optimize h_strnjoinv() with new strpcpy().
- Optimize memory for the gnet property init_list[].
- Optimized ctz64() to make it more obvious.
- Protect events and subscribers with magic tags.
- Removed http_buffer_t, completely obsoleted by pmsg_t.
- Show zalloc settings at startup and in "memory show options".
- Simplify code for read-lock upgrading and releasing.
- Strings now hold persistent "truncated" flags, for formatting.
- The watcher layer now auto-initializes.
- Use the Mersenne Twister as an additional random source.
- Use s_carp() instead of s_warning() for reporting "deep" important warnings.
- Use new vstrstr(), vstrlen(), vmemchr() and vstrchr() for optimized runtime.
- Windows: added ftruncate() emulation.
- Windows: fixed stat() and fstat(), with proper st_dev and st_ino fields.
- enamed hash_table_size() as hash_table_count() for consistency.
- When log messages are truncated, signal it visually with trailing "+++".
- VMM: use smarter core allocation under long-term strategy.
- anti_window_shift_hack(): hide normal output if not debugging.
- compat_longjmp(): record usage location and trace duplicate use.
- crash_invoke_inspector(): do not hardwire parent stdout / stderr.
- crash_restart(): always log the given message.
- crash_setcctime(): avoid using "time" as parameter name.
- crash_vmea_usage(): trace calling routine.
- entropy_seed(): also initialize random "previous entropy".
- fi_pick_chunk(): fixed selection of first chunk.
- fi_pick_chunk(): revisited random chunk selection algorithm.
- file_object_find(): loudly warn on file mismatch.
- get_iconv_charset_alias(): do not copy trailing ' ' in charset name.
- halloc_dump_stats_log(): was not logging realloc_via_xprealloc.
- hrealloc(): use vmm_move() and attempt to optimize VM space.
- log_handler(): emit stacktrace for glib, GTK or Pango warnings.
- mingw_dladdr(): use win32 DLP layer to check for new libraries.
- mingw_dlerror(): fixed to follow POSIX semantics.
- mingw_fix_stat(): trap ERROR_NOT_READY errors correctly.
- node_timer(): periodically try to move QRT arenas in VM space.
- parse.h: remove NON_NULL_PARAM() on function with assertions.
- rwlock_upgrade_from(): must only count read-locks from current thread.
- s_logv(): default log message max length raised to 3500 bytes.
- search_oob_pending_results(): randomly discard hits if too many.
- search_request_preprocess(): warn if TCP query contains a "QK".
- sequence_backward_iterator(): fixed case of one-way lists.
- stacktrace_pretty_filepath(): move to latest /src/.
- str_chr(): optimized to use vstrchr() if we can NUL-terminate.
- str_destroy(): ensure we do not call on a thread-private string.
- str_s2c(), str_2c(), str_dup(): handle already NUL-terminated strings.
- str_s2c(): ensure we do not call on a thread-private string.
- thread_suspend_others(): skip threads not marked as "valid".
- timestamp: be paranoid and protect against invalid time_t inputs.
- vmea_capacity(): changed semantics to report initial capacity.
- vmm_mmap_anonymous(): identify foreign regions more quickly.
- word_vec_make(): simplified code a bit.
- wrealloc(): if size does not change, attempt a wmove().
- xallocate(): be more aggressive when forcing VMM allocation.
- xmalloc: allocate via standalone VMM regions if possible.
- xmalloc: revisited plain VMM block allocation and freeing.
- xmalloc: use checksums to validate chunk headers.
- xreallocate(): ensure VMM space improves when reallocating.
- zcreate(): flag created zones as "user" ones.
- zgc(): only run for long-lived processes.
# v 1.1.13 2017-10-22 [stable]
This release primarily addresses issues that were left-over in 1.1.12.
Do not use that previous release, migrate from 1.1.11 to 1.1.13 directly!
The main issue was that of Partial File Sharing. Numerous bugs, dating from
7 years or more, were lurking because my local configuration had switched PFS
off for testing, and it had never been turned back on! In particular,
completed files were not properly shared, it was not possible to upload their
THEX since it was not recomputed, and the files were not properly indexed in
the Query Routing Table due to bugs in the background task layer.
In case of a crash, we now dump the value of all the Gnutella properties to
be able to spot configurations that deviate from the norm. Too many bugs
were reported and ignored because they could not be reproduced, often due
to not having the same setup when attempting to debug!
Another nasty bug was fixed: it was not possible to change the IP support
configuration without causing an immediate crash. The reason is due to a
change that was integrated in 1.1.12 to allow IPv6 UDP traffic from G2 nodes.
The problem was that this created an extra client stack on top of the
low-level UDP traffic scheduler and it was not properly cleaned-up when
switching IP configurations, leading to an assertion failure!
New Features:
Improvements:
- Append all Gnutella properties to the crashlog file.
- At startup, do not needlessly request TTH if we have it cached already.
- Optimized requests for library scan / QRP rebuild, avoiding multiple events.
- Allow TTH computation for seeded files.
- Obsolete and stale entries are now removed from the SHA1 cache.
- [GTK] Added GUI events on more fileinfo changes.
- [GTK] Show information about recomputed TTH for seeded files.
- Prune unshared entries from SHA1 cache at startup.
- Persist information about seeded files in the ASCII fileinfo database.
- Remove unneeded libraries from the default GTK2 ldflags.
Bug Fixes:
- Was not able to properly seed completed files; fixed shared_file_path().
- Was not always updating QRP on the UP side after a library change.
- Could have background tasks stuck after cancelling a multi-ref'ed one.
- Dynamic querying timeout was not properly computed (made too small).
- Changing from "IPv6 & IPv4" to "IPv4 only" mode caused a crash.
- Restored ability for "shutdown -r" to work.
Under the Hood:
- Added prop_to_typed_string().
- Added s_where() to log a stacktrace on stderr only.
- Added tt_slice_size() to compute slice length per leaf in the TTH.
- New crash_dumper_add() to register crash dumper callbacks.
- No panicing when thread cannot block but was actually suspended.
- Was unduly offsetting stacktrace by one extra level.
- bg_sched_sleep(): don't reduce runcount on exiting task!
- bg_sched_timer(): added run count consistency check.
- bg_sched_timer(): fixed logging of task's run time.
- bg_task_cancel(): log task address as well, not just the task name.
- bg_task_wakeup(): must clear user sleeping flag.
- crash_restart_notify(): use smarter crash_exit().
- crash_try_reexec(): suspend other threads as a precaution.
- deflate_flushed(): suppressed soft assertion.
- dq_results_expired(): fixed improper timeout computation.
- fi_free(): cut any pending reference by uploads!
- fi_tigertree_check(): more verbose in case of errors.
- file_info_moved(): must update fi->modified as well.
- file_info_remove_source(): removed unused discard parameter.
- file_info_retrieve(): also validate that DONE is consistent.
- file_info_shared_sha1(): do not share bad files.
- get_file_to_upload_from_urn(): factorized code.
- huge_update_hashes(): enforce one sync of SHA1 cache every minute.
- huge_verify_callback(): use shared_file_indexed().
- node_udp_disable(): was not disabling the G2 UDP IPv6 node.
- parse_and_append_cache_entry(): discard obsolete / stale entries.
- qrt_compressed(): fixed outdated comments.
- qrt_diff_1(): was never considering change.
- request_sha1(): don't request TTH if we have it cached.
- shared_file_fileinfo_unref(): clear fileinfo pointer.
- shared_file_from_fileinfo(): copy TTH atom as well, if any.
- shared_file_is_shareable(): be stricter for partial files.
- shared_file_path(): must process sf->fi correctly!
- upload_file_present(): loudly warn when completed file changed on disk.
- upload_file_present(): loudly warn when file not shareable.
- verify_update(): loudly warn when "progress" callback stops processing.
# v 1.1.12 2017-09-20 [stable]
This release fixes a very critical bug that was only manifesting when Partial
File Sharing was turned on, and which caused possible memory corruption (leading
to a sure crash later) when enqueuing new files for downloading.
New Features:
- Throttle browsing requests to one per hour from a given IP.
- Limit uploads to stalling hosts to 1, regardless of user settings.
- [GTK2] Show proper average data speed on completed uploads.
Improvements:
- Added "WSHR" vendor code for WireShare.
- Added "ENVY" vendor code for Envy.
- Do not attempt costly operations after a crash / auto-restart.
- Updated FAQ -Uploads and Sharing-
- Use 64-bit variables for bandwidth computations.
- Make sure early stalling is not always reported for the same IP.
- Use even HTTP outgoing bandwidth as the last measure when stalling.
Bug Fixes:
- Allow IPv6 UDP traffic from G2 nodes.
- Be sure to use destructive list iteration with tmalloc_free_magazine().
- Critical upload HTTP statuses are now fully sent.
- Must give plain (untranslated) strings to send_upload_error().
- bg_task_finished(): now calls safer bg_task_dead().
- file_object_open_from(): also catch EROFS when opening file.
- node_bye_v(): do not call node_remove_v() for G2 nodes.
- vendor_code_get_name(): fixed validation of unknown code tokens.
- verify_next_file(): fixed wrong argument order in log message.
Under the Hood:
- bfd_util: reworked mutex grabbing in an attempt to avoid deadlocks.
- binary_hash(): disperse bits in initial hash value.
- check_for_events(): optimize path if timeout is 0 or we collect events.
- cq_event_called(): only zero variable holding event when asked!
- cq_zero(): now always nullify the event, as the name suggests.
- crash_setmain(): avoid spurious warnings with recent gcc.
- english_strerror() and symbolic_errno() made thread-safe.
- inputevt_timer(): factorized common code into new inputevt_handle().
- socket_udp_flush_queue(): do not process anything if we cannot devote time.
- stack_sym_trylock(): avoid deadly recursions through stack lock dumping!
- thread_sig_handle(): use atomic exchange operation to clear pending set.
- u32_ptr_hash(): discard lower bits of the multiplication as well.
- upload_timer(): clear the stall flag when it is over.
- Added aging_record() to simplify code for plain keys.
- Added cq_event() to acknowledge reception of events we do not track.
- Added "inputevt_trace" property for tracing dispatched I/O callbacks.
- Added english_strerror() to guarantee English messages.
- Added thread_signal_has_pending() and thread_signal_process().
- Added "lock_sleep_trace" and "lock_contention_trace" properties.
- AJE: changed pool #0 filling policy and reseeding checks.
- Ensure misc_init() is called before using lookup tables.
- Simplify is_ascii_*() by performing table lookup.
- Thread runtime now allows a signal handler to run within another one.
- Updated UHC list, fixed obsolete port numbers.
- Use new cq_event() in thread callout events to avoid possible leaks.
- Watchdog: revisited logic to do more under lock protection.
# v 1.1.11 2016-11-11 [stable]
This release fixes a portability issue on FreeBSD and introduces a main core
feature and minor new GUI features.
The main feature is the addition of "equivalence classes" defining word
aliases, used when sharing files and querying for them.
Currently, the only supported equivalence class deals with naming of series.
Indeed, there are various conventions that can be used to represent these,
and it makes searching inefficient: either one will lookup for all the
possible variations, or one will miss some of the files.
For instance, episode #8 of an hypothetical season #4 can be represented by
any of these strings:
{ "s04e08", "4x08", "408", "04x08", "0408" }
Thanks to the equivalence class, a file bearing one of these strings can
be searched for (and located successfully) by using any of the other strings.
Of course, since this is a local processing, the more servents out there are
deployed with this aliasing support, the more efficient the feature becomes!
There are also new GUI features: the "Clear completed" button from the Download
pane is now doing someething useful, and the current page of different notebooks
is remembered across sessions. The only one which is not restored on normal
resuming is the main notebook tab. It will be restored if GTKG is restarted
after a crash, but otherwise the application will always start up within the
Network tab.
In the Uploads tab, upload requests coming from a G2 servent will now be
flagged with a "[G2]" tab right after the IP address. This helps seeing how
the Gnutella and G2 network unification is evolving.
New Features:
- Flag uploads coming from G2 servents with a "[G2]" tag after IP address.
- Added alias support in sharing/querying.
- Made the "Clear completed" button in Downloads/Tools do something useful.
- Moved "Clear completed" button to the bottom right of the download pane.
- Remember fileinfo notebook tab number across sessions.
- Remember main notebook tab number across sessions, only restored after crash.
- Remember Gnet stats notebook tab number across sessions.
- Remember download info / tools notebook tab number across sessions.
Improvements:
- Added --cleanup to explicitly request for final memory cleanup sequence.
- Updated Italian translation.
- Updated GeoIP databases.
Bug Fixes:
- Leaf nodes could end-up being connected to more ultrapeers than configured.
- Fixed monitoring of alien threads, important when GTK file selector is used.
Under the Hood:
- Debian compatibility level changed from 4 to 5.
- Make sure we can deal with older pkg-config, which needs leading arguments.
- Use "embedded" symbols for xmalloc(), xfree() and friends.
- Added "query_trace" property to trace all queries which were searched.
- Moved halloc-based string functions like h_strdup() to dedicated hstrfn.c.
- Expanded search mask to 64 bits to be able to hold all digits and letters.
- Count aliased queries and hits from aliases.
- Pre-compute shared file media type at record creation time.
- Pass query limits to st_search() to avoid needless pattern matching.
- Added h_strsplit() and h_strsplit_set().
- Added strvec_append_with() to expand vector by appending another vector.
- crash_assert_logv(): don't call crash_mode() if assert failure was recorded.
- entropy_clock_time(): mix the entropy nonce through hashing for more diffusion.
- node_can_accept_connection(): only send headers back when handshaking.
- qrp_add_file(): optimized to avoid computing word length if not required.
- thread_stack_check_overflow(): ignore virtual addresses outside stack range.
- vmm_init_once(): ensure any shared library for stacktrace unwinding is loaded.
# v 1.1.10 2016-09-01 [stable]
This is mostly a bug-fixing release and should be the last update on the
1.1.x release tree, before important core changes in the upcoming 1.2.
Improvements:
- FAQ cleanups.
- Added the ".ape" file extension to the default list of shared files.
- Remember hosts to which a TCP connection failed recently to avoid hammering.
- Updated French and Turkish translations.
- Updated GeoIP databases.
Bug Fixes:
- Don't embed build date if SOURCE_DATE_EPOCH is set for reproducibile builds.
- Missed ":" in variable substitution request, in scripts/nm-list
- nm-list: fixed date computation on BSD systems.
Under the Hood:
- Need TLS 2.12 to generate an X.509 self-signed certificate.
- Added G_PRINTF() hint to tls_logfmt() and tls_cert_log() to avoid warnings.
- Fixed CPP file inclusion protection symbol for lib/mime_type.h.
- Added the "ape" MIME type linked to the ".ape" file extension.
- Ensure we do not suspend threads during an interrupt.
- Track where context was taken in our setjmp wrappers to ease debugging.
- Keep track of "once" initializations in case we end-up recursing.
- Trace which new lock is overflowing the lock stack.
- once: make sure we can insert routine in our tracking table.
- once: arbitrarily limit nesting level in one thread to 32.
- dht_update_size_estimate(): return if our KUID was not initialized yet.
- keys_reclaim(): we can have values attached to key if we can remove it.
- symbols_load_from(): must release write lock when falling back to pre-computed.
- thread_element_block_until(): was not checking for concurrent unblocking.
- thread_element_block_until(): revisited signal handling.
- thread_suspend_others(): don't wait for busy threads already marked suspended.
- walloc: prevent race condition on walloc_stopped being set.
# v 1.1.9 2016-03-06 [stable]
This is mostly a bug-fixing release.
It fixes an important bug in the UPnP discovery path that led to a crash when
it found more than one UPnP device on the network.
It also introduces a new Glossary that can be displayed to explain some terms
that may be hard to understand for newcomers, so that they may in turn benefit
from the tooltips and the information in the FAQ.
On Windows, one important change is that we now force all memory allocations
from the external DLLs to use our own malloc() implementation. This proves
that one of the DLLs is exhibiting a memory leak. Plugging that leak will
unfortunately require that a garbage collector be implemented. Measurements
indicate that 4K leak every second on average, which eventually leads to an
out-of-memory crash after a few days (2 to 3), preventing high uptimes on
Windows. The leak is not originating from gtk-gnutella's code.
Improvements:
- [GTK2] Added menu to display the new glossary window.
Bug Fixes:
- Define PTHREAD_STACK_MIN to 0 in case it is not supplied by <pthread.h>.
- can_become_ultra(): don't account for upload fds if no upload will take place.
- compat_sleep_ms(): fixed the fallback implementation using compat_poll().
- dht_route_parse(): ensure we never use uninitialized variables.
- entropy_collect_host(): no longer attempt to get the host IP addresses.
- file_locate_from_path(): if pathname is qualified, duplicate argument!
- ftw_foreach(): prevent memory leak on error path.
- thread_lock_deadlock(): avoid de-referencing NULL if possible.
- upnp_discovered(): avoid segfault when we have to pick the first device.
Under the Hood:
- Disable warnings about the mem vtable being deprecated in recent glib.
- Suspend threads created after a global suspension is in effect.
- Warn when we cannot find a thread to record / release a lock.
- Added a new crash-level for deadlocks.
- Added optional debugging code to track reading threads on a read-write lock.
- Added spinlock_in_crash_mode_raw() for raw spinlocks to avoid deadly recursion.
- Additional debugging code to track read spots per thread on a read-write lock.
- Added backtrace capture when threads are contending for a lock.
- On deadlocks, suspend the other threads and log origin quickly before handling.
- New strategy in lock "deadlock" routines: ignore when in pass-through mode.
- Do not perturb the lock waiting state of the crashing thread on a deadlock.
- Revisited thread_lock_deadlock().
- Check for stack overflowing each time a lock is grabbed and recorded.
- Added thread diversion support.
- Added thread_halt() to forcefully halt concurrently crashing threads.
- Refactored memory checks to avoid systematic locking in mem_is_valid_ptr().
- Try to divert crash processing to main thread when triggered in a sub-thread.
- On deadlock condition, attempt to collect stacktraces of other threads.
- Add the current process PID and the last crash level to the crash log.
- Use raw logging routines in spinlock / mutex deadlock tracing.
- Added crash_getpid() for safe original PID computation, even across a fork().
- Add dump of all the thread stacks to the crash log if we can't fork().
- Moved equiv() and implies() definitions to "casts.h".
- Added xxx_to_string_grp() to optionally format xxx with thousand groupping.
- Adding win32 dynamic library patcher to trap malloc() in all required DLLs.
- Windows: with win32dlp, no need for monitoring committed memory.
- Renaming of legacy G_GNUC_XXX into G_XXX for concision.
- Renamed G_N_ELEMENTS as N_ITEMS.
- Moved gcc-specific macros to a dedicated file.
- Added pragmas to shut up spurious warnings with the clang 3.4.1 compiler.
- On the lock recording path, we can now use thread_get_element() safely.
- Made sure symbols are thread-safe and properly locked.
- If stacktrace dumps could intertwine, prefix the second with the thread ID.
- Allow for nested lock waiting sequences.
- Added SIGSYS to the list of harmful signals we want to catch.
- Added THREAD_F_WAIT to let thread_create() wait for the new thread to start.
- Windows: was not reconstructing correct stack frame pointer for WINAPI calls.
- Windows: improved backtracing through routines using a large amount of stack.