[Linuxdcpp-team] [Bug 1909861] Re: FileReader is not thread safe on Linux

2021-01-02 Thread maksis
AirDC++ actually has some kind of support for opening files O_DIRECT: https://github.com/airdcpp/airdcpp- windows/blob/b863d8626d95d0ee483572a5139f8f569b558c3f/airdcpp/airdcpp/File.cpp#L380-L394 (BUFFER_NONE isn't currently being used anywhere though when opening files) FileReader::readCached curr

[Linuxdcpp-team] [Bug 1909861] Re: FileReader is not thread safe on Linux

2021-01-02 Thread cologic
As far as "I'm not sure if mapped reading even makes sense in cases where the file is only being read sequentially through once (maybe things were different back in the days when the code was written?)." One possible explanation is that all of those mechanisms appeared no earlier than 2000 or 200

[Linuxdcpp-team] [Bug 1909861] Re: FileReader is not thread safe on Linux

2021-01-02 Thread cologic
This patch is relatively aggressive in removing FileReader::readCached() and all associated infrastructure entirely. I'm not yet certain that's the best, but in the absence of enough ongoing development to support something evidently flawed. Since non-Windows doesn't support readDirect() to avoid

[Linuxdcpp-team] [Bug 1909861] Re: FileReader is not thread safe on Linux

2021-01-02 Thread maksis
Yeah this crash only happened for people using the Linux version of AirDC++. FileReader::readMapped has always been disabled on Windows. I'm not sure if mapped reading even makes sense in cases where the file is only being read sequentially through once (maybe things were different back in the day

[Linuxdcpp-team] [Bug 1909861] Re: FileReader is not thread safe on Linux

2021-01-02 Thread cologic
It looks in DC++ on Windows, the only supported DC++ platform, FileReader::readMapped() already always fell through to FileReader::readCached(): ret = readMapped(file, callback); if(ret == READ_FAILED) { dcdebug("Reading [full] %s\n", file.c

[Linuxdcpp-team] [Bug 1909853] Re: Don't use custom socket buffer sizes by default

2021-01-02 Thread eMTee
** Changed in: dcplusplus Status: New => Fix Committed -- You received this bug notification because you are a member of Dcplusplus-team, which is subscribed to DC++. https://bugs.launchpad.net/bugs/1909853 Title: Don't use custom socket buffer sizes by default Status in DC++: Fix Co

[Linuxdcpp-team] [Bug 1909861] [NEW] FileReader is not thread safe on Linux

2021-01-02 Thread maksis
Public bug reported: FileReader::readMapped currently modifies the global SIGBUS handler in order to catch read errors: https://sourceforge.net/p/dcplusplus/code/ci/default/tree/dcpp/FileReader.cpp#l289 Since the function can be called concurrently from different threads (currently hashing/queue

[Linuxdcpp-team] [Bug 1909853] [NEW] Don't use custom socket buffer sizes by default

2021-01-02 Thread maksis
Public bug reported: Modern operating systems (Linux 2.4+, Windows Vista+) should support TCP tuning (https://en.wikipedia.org/wiki/TCP_tuning) to enable higher per- thread speeds with fast connections. However, the current default socket buffer size (65536 bytes) set by the client will prevent th