ygrek / mldonkey

cross-platform multi-network p2p daemon (previously at http://mldonkey.sourceforge.net/)
Other
247 stars 46 forks source link

client_buffer_size reset to 1 #87

Closed alitaker closed 1 year ago

alitaker commented 1 year ago

Right after running mlnet, _client_buffersize gets reset to 1 in the download.ini config file. The parameter is not taken into account if I change it to anything more than 50.000. In fact I keep getting errors like:

[TCP_BS]: BUFFER OVERFLOW 43648+27360> 50000 MESSAGE: [(107)(40)(173)(210)(238)(120)(90)(183)(61)(187)(199)(31)(58)(195)(225)(89)(163)(255)(49)(100)...]

which clearly indicates that the buffer size is at 50.000

Only recompiling with line 1873 of src/daemon/common/commonOptions.ml changed, seem to have mlnet use a different value:

 option_hook client_buffer_size (fun _ ->
      TcpBufferedSocket.max_buffer_size := max 500000 !!client_buffer_size

Sysinfo:

Version: | MLNet Multi-Network p2p client version 3.1.7.git
SCM version: | release-3-1-7-2-15-ge136e743
Networks: | Global Shares Direct Connect Fasttrack FileTP BitTorrent Donkey (SUI)
OCaml version: | 4.11.2 - C compiler version: 11 - C++ compiler version: 11
Built on: | Linux x86_64 5.15.0-56-generic (little endian) with glibc 2.35
Configure args: | '--enable-option-checking=fatal' '--enable-upnp-natpmp' '--enable-bittorrent'
Features: | threads zlib-1.2.11 bzip2-1.0.8 gd(jpg/png-1.6.37) iconv(active) magic(active) upnp natpmp no-check-bounds

I also tried different OCaml versions with the same result.

Any ideas?

Thank you

Testerprivate commented 1 year ago

I do not confirm. I have 1500 000 and no errors.

Version: MLNet Multi-Network p2p client version 3.1.7 Networks: Global Shares FileTP BitTorrent Donkey (SUI) OCaml version: 4.01.0 - C compiler version: 7 - C++ compiler version: 7 Built on: Linux x86_64 5.17.14 (little endian) with glibc 2.26 Configure args: '--enable-option-checking=fatal' '--enable-largefile' '--enable-iconv' '--enable-pthread' '--disable-gui' '--disable-fasttrack' '--disable-gnutella2' '--disable-gnutella' '--enable-filetp' '--enable-bittorrent' '--enable-donkeysui' '--enable-donkey' '--disable-directconnect' Features: threads zlib-1.2.11 bzip2-1.0.6 no-gd iconv(active) no-magic no-upnp no-natpmp no-check-bounds Enabled nets: Donkey Kademlia BitTorrent FileTP Server usage: enabled Geoip: enabled, GeoLite data created by MaxMind, available from http://maxmind.com/ IP blocking: local: 366282 ranges - web: 366282 ranges System info: Linux linux-server 6.1.0 #1 SMP PREEMPT_DYNAMIC Tue Dec 13 22:31:35

alitaker commented 1 year ago

Could it be an error in the download.ini file? I don't know where to look as it's working like a charm after compiling mlnet with a hard coded default buffer size of 500.000

Testerprivate commented 1 year ago

See mldonkey/docs/ChangeLog.old 2007/03/04 5765: Change hard-coded maximum value for client_buffer_size

alitaker commented 1 year ago

Mmmh, t

See mldonkey/docs/ChangeLog.old 2007/03/04 5765: Change hard-coded maximum value for client_buffer_size

* default stays at 500.000

* for high-volume links raise this value to 1.000.000 or higher

Ok, but if something is wrong in the downloads.ini, it falls back to 50.000:

  option_hook client_buffer_size (fun _ ->
      TcpBufferedSocket.max_buffer_size := max 50000 !!client_buffer_size
  );

Still couldn't find what was wrong in my downloads.ini though: anyway now it's working as expected.

Thanx