Incompatibility between Mina and Android Lollipop

vineet garg grgvineet at gmail.com
Thu Jun 18 19:08:28 UTC 2015


On Fri, Jun 19, 2015 at 12:02 AM, Albert Vaca <albertvaka at gmail.com> wrote:

> Do you have any of this code in github so I can test it this weekend?
>

Link for Netty Test : https://github.com/grgvineet/NettyTest


> On Thu, Jun 18, 2015 at 11:12 AM, vineet garg <grgvineet at gmail.com> wrote:
>
>>
>>
>> On Thu, Jun 18, 2015 at 11:33 PM, Albert Vaca <albertvaka at gmail.com>
>> wrote:
>>
>>> > In Netty too ssl client caused problems but this time Netty threw an
>>> exception.
>>>
>>> What's the exception that you saw with Netty that you don't see with
>>> Mina?
>>>
>>
>> The stack trace I get on 5.0 devices https://paste.kde.org/p7pgfrl5i
>>
>> Also, does this mean that you have Netty already implemented? Is it
>>> working without SSL as well?
>>>
>>
>> I earlier developed a little application for testing of ssl connections
>> on Android on which I can test ssl server and ssl client. I modified that
>> application to work with netty based on netty examples.
>>
>>>
>>> > So ssl will not work in Android 5.0
>>>
>>> That doesn't sound great. Make it work without 5.0 first, but afterwards
>>> we will need a workaround for this.
>>>
>>> > What is the severity of crash that you posted earlier?
>>>
>>> I see around 5 reported crashes a week.
>>>
>>>
>>> On Jun 18, 2015 7:41 AM, "vineet garg" <grgvineet at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> All issues regarding ssl not working are solved now. In MINA ssl client
>>>> was causing much problem, without throwing any exception. In Netty too ssl
>>>> client caused problems but this time Netty threw an exception. On searching
>>>> around the cause of exception I came to know that there is a bug in Android
>>>> OpenSSL library which is affects Android Lollipop 5.0 [1]. So I downloaded
>>>> a Lollipop 5.1 image, and everything worked like a charm. So ssl will not
>>>> work in Android 5.0
>>>>
>>>> I am not happy with using MINA either for ssl, it does not provide much
>>>> functionality. I can't even attach a handshake completed listener. Netty on
>>>> the other hand has a nice implementation and much power and also a huge
>>>> community is developing it and using it. Also lot of people also argue that
>>>> Netty is better than MINA even author himself .
>>>> Since it is started by same person, much of the functionality is alike
>>>> in Netty. I guess it will just take a day or two to port the existing code
>>>> from MINA to Netty for LanLinkProvider. Also due to the standardization of
>>>> network protocols, it should work with earlier devices as well.
>>>> What is the severity of crash that you posted earlier? If it is severe,
>>>> I consider that we should go for Netty.
>>>>
>>>> [1] Bug in Lollipop
>>>> https://code.google.com/p/android-developer-preview/issues/detail?id=1521
>>>> [2] Netty vs Mina
>>>> http://stackoverflow.com/questions/1637752/netty-vs-apache-mina
>>>>
>>>> Cheers
>>>> Vineet
>>>>
>>>> On Thu, Jun 18, 2015 at 1:45 AM, Albert Vaca <albertvaka at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Yuri,
>>>>>
>>>>> Thanks for your input. Mina might be used as well in the SFTP plugin,
>>>>> but it is also used as a networking library, to send and receive all
>>>>> network messages.
>>>>>
>>>>> Albert
>>>>>
>>>>>
>>>>> On Wed, Jun 17, 2015 at 12:52 PM, Yuri Samoilenko <kinnalru at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hello.
>>>>>>
>>>>>> I'am not watching for KDE connect carefully(and I dont know how Mina
>>>>>> is used now), but Mina was added by me as simple embedable ssh-server. So
>>>>>> if there is another ssh-server implementation of ssh-server for Java it can
>>>>>> be used as drop-in replacement. There is a very few lines of code to
>>>>>> instantiate ssh-server with Mina so migration must be simple.
>>>>>>
>>>>>> 2015-06-17 3:10 GMT+03:00 Albert Vaca <albertvaka at gmail.com>:
>>>>>>
>>>>>>> Hi Vineet,
>>>>>>>
>>>>>>> Some issues are always to be expected when developing something, but
>>>>>>> we will need to overcome them!
>>>>>>>
>>>>>>> I didn't know about Netty at all, but if you think it is going to
>>>>>>> solve the problem and it's better than Mina, go for it. Actually, I'm not
>>>>>>> supper happy with Mina because most crashes from KDE Connect come from a
>>>>>>> weird issue that involves Mina [1].
>>>>>>>
>>>>>>> If you go for Netty, that is going to require more effort than
>>>>>>> initially expected, so take it into account so you still meet your project
>>>>>>> deadlines. The most challenging part will be to make sure that devices
>>>>>>> running the old version of the app (Mina) and devices running the new one
>>>>>>> (Netty) are able to talk to each other, so either make sure that you can
>>>>>>> also have Netty without SSL (best solution), or simply keep Mina and Netty
>>>>>>> at the same time in different Links (less optimal solution).
>>>>>>>
>>>>>>> In any case, I would raise the problem with SSL in Mina and Lollipop
>>>>>>> online (Mina's mailing list?) to see if more people also had trouble and
>>>>>>> know if there is a solution (because we might end up having more problems
>>>>>>> with Netty and we have to fall back to Mina again).
>>>>>>>
>>>>>>> Let us know about your findings on this topic.
>>>>>>>
>>>>>>> [1] Most common crash in KDE Connect: https://paste.ee/r/6wt4y
>>>>>>>
>>>>>>> Albert
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Jun 16, 2015 at 3:20 PM, vineet garg <grgvineet at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> After a lot of trouble I came to this conclusion that Mina and
>>>>>>>> Android Lollipop are not compatible at all when using SSL filter. I used
>>>>>>>> the filter as described in documentation. As soon as SSL filter is applied
>>>>>>>> over the session, the CPU usage of the application becomes incredibly high
>>>>>>>> causing OS to suspend all threads, so it doesn't work at all. It didn't
>>>>>>>> worked earlier in emulator too because I was using Lollipop in emulator
>>>>>>>> too. My new physical device is on Lollipop too. My old device is on
>>>>>>>> Jellybean and it works fine on it. In emulator too, it works fine on
>>>>>>>> Jellybean image. The main reason may be because of ART, but not sure.
>>>>>>>>
>>>>>>>> So now I have two options, either implement this from basic like in
>>>>>>>> KDE version, or use Netty instead. Both Netty and Mina was started by same
>>>>>>>> person, Netty was started to overcome some of the problems in Mina. Netty
>>>>>>>> is actively developed and a lot of people are working on it.
>>>>>>>>
>>>>>>>> Vineet
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> KDEConnect mailing list
>>>>>>>> KDEConnect at kde.org
>>>>>>>> https://mail.kde.org/mailman/listinfo/kdeconnect
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> KDEConnect mailing list
>>>>>>> KDEConnect at kde.org
>>>>>>> https://mail.kde.org/mailman/listinfo/kdeconnect
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> KDEConnect mailing list
>>>>>> KDEConnect at kde.org
>>>>>> https://mail.kde.org/mailman/listinfo/kdeconnect
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> KDEConnect mailing list
>>>>> KDEConnect at kde.org
>>>>> https://mail.kde.org/mailman/listinfo/kdeconnect
>>>>>
>>>>>
>>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150619/2be21b37/attachment.html>


More information about the KDEConnect mailing list