-
Notifications
You must be signed in to change notification settings - Fork 4
Migrate to Dokany 2.x #52
Comments
After a several experiments, the current state is: Dokany 2.x does not run stable using JNA. The reasons are unclear, but after a longer (or shorter) time, the running process crashes with NTSTATUS either STATUS_ACCESS_DENIED or STATUS_INTEGER_DIVIDE_BY_ZERO. In rare cases memory dump is created. The branch contains the rewrite of the library, discarding the type safe enumerations and mainly dealing with "raw" values. The class |
@infeo couple of fixes were introduced since in the library to deal with memory corruption and synchronisation. If you can give another try and share any issues that would be appreciated! |
Thanks for the reminder! I gave it another whirl, and it seems that the mount is stable after a certain time has passed (on my machine ~15s). In the new implementation @Liryna Is there some critical (background) operation at the mount which can explain that the mount stabilizes after a certain time? |
Are you able to get the library logs in that case ? We could see if there is an unmount happening. Could it be possible that somehow java is releasing the allocated native memory when going out of scope ? Like the delegates are free and it natively crash. |
It is possible from my naive point of view, but unlikey, because the used libraries are stable and mature. I have collected logs of a crash including driver output and the event logging: dokan_crashLog.zip @Liryna Since this is a lot to look through, can you point me in some directions where to look at or what to look for? |
Also noteworhty: I can almost certainly trigger the crash, when accessing the volume properties (event without implementing |
Thanks for the logs @infeo . All the communication looks good and properly received by the kernel. Quickly looking at https://github.com/cryptomator/dokany-nio-adapter/tree/feature/dokan-2.0 the API change seems to have been applied correctly but it is hard without a "real" diff. When I pointed at the native resources being released, I was thinking at the mount parameters and especially dokanOperations. |
My god, that was the reason. Instead of the operations struct, the dokanOptions were locally created and with the next gc run freed. Thanks a lot, now it runs without crashing. :D |
there have been some new versions of dokany. Together with learnings from #52 (comment) -> maybe one should give it a new try. The benchmarks of v2 look really promising and should make migration well worth it: |
related to: |
There is a improved doc with latest revision from 7th june 2022 on => possibly it's worth a look, if it (in latest revision) contains the mission pieces of information... |
another reason for dokany v2 support
|
Dokany release the next major version 2.x.
The version includes performance improvements, but is not compatible with the 1.x version.
A migration path is provided in https://github.com/dokan-dev/dokany/wiki/Update-Dokan-1.1.0-application-to-Dokany-2.0.0.
Experiments take place in the branch https://github.com/cryptomator/dokany-nio-adapter/tree/feature/dokan-2.0
The text was updated successfully, but these errors were encountered: