Closed Morpheusai closed 3 years ago
@arvidn
could you give us some advices ?
my advise would be to load up the core file in gdb and see what's going on.
have you tried testing with just 2 sessions? I don't think we ever tested working with more than 1 session at the time (per process)
Are your sessions sharing the same settings? (by the likes of your code it seems they are, that probably leads to all sorts of fucked up behavior when writing/reading settings)
That doesn't sound right.
@Morpheusai No one uses many sessions. There is no such scenario.
When we want to fine control the data transmission for the app, we can potentially have multiple session with different setting such as one session with “read only” and “branch factor =1” ... to maintain minimum data traffic, other sessions can scale up when network data is less expensive. So we do not have to load and destroy sessions frequently, this also saves data transmission. We has fixed the multiple session issues with recompile, will publish the compile detail later. Thanks.
@wuzhengy We have a "read only" flag and a speed limit for specific torrentHandle. This should be enough for all scenarios.
We are making a chat software using dht data put/get functions. The dht get function sometimes does not respond with data even the data is available somewhere in the swarm which is the collective data store by other peers. We think if using multiple ID will bring more diversity of each routing take to start with. Single session single routing table seems to be too focus on one set of routing due to XOR distance to the node ID. We might be able to use multiple network interface to reflect this nodes ID diversity, but the multiple network interface shares does not give fine control on which interface process which data item get task. The multiple session gives us lots of control flexibility in terms of concurrency get data items that represent chatting messages. Hope this makes sense to use multiple sessions. We did make multiple sessions works to distribute the get tasks so far.
We have figured out the problem, due to the compile options of openssl in build*.sh. (including linux and android platform)
export run_openssl_configure="./Configure linux-x86_64 ${OPENSSL_NO_OPTS} -fPIC --prefix=${OPENSSL_ROOT}";
We changed into:
export run_openssl_configure="./Configure linux-x86_64 -fPIC --prefix=${OPENSSL_ROOT}";
Also there are some problems in build.sh. We have tested five build.sh (build-android-x86_64.sh, build-android*.sh). In common compile file - build-utils.shinc, we first confirm the tools(unzip, gradle, git etal) are installed in the system. Another important things:
Boost install. you must assign different toolset in different system, gcc as default in linux and clang in android system.
Serveral envionment variables are better to be assigned before later compile stages, so that you can manually compile by yourself when errors happen.
In build-linux-x86_64.sh and build-android-*.sh, toolset=*** needs to be modified like:
export run_bjam... toolset=clang--${os_arch} ..."
should be
export run_bjam... toolset=clang-${os_arch} ...
Also, some compile options in swig/config/*.jam need to be ignored or modified. these may be caused by different systems.
In build-android-x86_64.sh:
export CC=$ANDROID_TOOLCHAIN/bin/i686-linux-android-clang
should be
export CC=$ANDROID_TOOLCHAIN/bin/x86_64-linux-android-clang
and
export run_openssl_configure="./Configure linux-elf...
shoule be
export run_openssl_configure="./Configure linux-x86_64
Hope helpful to developers. I will close the issue.
It sounds like this issue requires a fix in either the cmake files or the documentation. I have no stake in this repo specifically, but it would seem like a good thing dra to leave the ticket open until a fix has landed.
Thank you @Morpheusai
Here's the first fix with the extra dash on the toolset=clang-${os_arch}
error you spotted
https://github.com/frostwire/frostwire-jlibtorrent/commit/7cf2b75153da5155c9f637465a91ea5792425111
As for removing ${OPENSSL_NO_OPTS}
when building openssl, I'm not so sure about that. We do this so that we keep the library to a minimum size, perhaps in your case you need more of what openssl has to offer, but not really for FrostWire builds. How big is the jlibtorrent library for you when you build openssl with everything?
The other settings I'll have to try and test, if everything works alright I'll merge those changes into the repo for everybody.
Thank you so much @Morpheusai
Thank you @arvidn for taking a look at this, your input is most valuable and always welcome.
Second set of fixes passed on my local build, thanks @Morpheusai https://github.com/frostwire/frostwire-jlibtorrent/commit/fa8fb34783eefad14f425db3629b8c16bc40e25d
Thank you @Morpheusai
Here's the first fix with the extra dash on the
toolset=clang-${os_arch}
error you spotted 7cf2b75As for removing
${OPENSSL_NO_OPTS}
when building openssl, I'm not so sure about that. We do this so that we keep the library to a minimum size, perhaps in your case you need more of what openssl has to offer, but not really for FrostWire builds. How big is the jlibtorrent library for you when you build openssl with everything? libjlibtorrent.so - 9.2 mb, linux, or android - 1.2.10.jar - 3.4 mb, 3.1 mb jlibtorrent-1.2.10.0.jar is 677 kb, almost the same as before.
Yeah, so the .so grows about 2Mb worth of unnecessary symbols and attack surfaces.
so thinking more about this, perhaps there's a flag we can remove from OPENSSL_NO_OPTS
so that you don't have the aesni_ecb_encrypt
related crash, or perhaps with a simple update to openssl 1.1.1h
the problem might go away, and you get to save 2Mb per download (if you're distributing a client like us)
Arvid just bumped the 1.2 branch to 1.2.11, so I'll be making an update here soon, I'll bump openssl to see if your issue goes away.
I'll try also bumping boost to 1.75 if it came out, we couldn't build correctly with 1.74 back in september.
I think saving 2mb per download is more important. The reason we need multi-sessions is for a very specific purpose to fine tune each session's settings to help chatting and imaging in Africa network.
Hi
We use multiple sessions in this way:
But a fatal error happened:
Also with a thread sleep, like 100ms. No error happen but will crash soon when started with the same error.
Thanks for reply.