-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UNC - Unable to access sub-directories using dokany mirror sample #945
Comments
Hi @velislav87 , When you open explorer to |
Hi @Liryna Yes, when I am navigating trough the explorer i see see the folder One interesting thing I noticed is that today the issue is not reproducible with |
@velislav87 Thanks for the feedback I can reproduce the issue indeed. I would suspect the issue to be in the network provider. The dokan_np code. Would need to look at the logs of a debug version with DbgView and see if we are not getting a request for such path which we do not correctly handle. Is that something you would be able to look at ? I will be able to guide you but I am lacking time to handle that. |
Hi @Liryna , yes I can try to collect the logs with DbgView. |
Hi @Liryna , I am following the guide https://github.com/dokan-dev/dokany/wiki/How-to-Debug-Dokan on how to collect the DBG traces. You may find the same here. I tried several times accessing folders both using the explorer view and entering the hostname directly. The command for mount is Hopefully there is something useful in the logs, because I didn't see any logs streaming in when reproducing the issue(they were streaming only when browsing normally). Best Regards, |
It is the dokannp library logs we need to look at and not the mirror or dokan library. |
Hi @Liryna , thanks I will try to do the same and get back :) |
Looks like this code is called with the subfolder provided. https://github.com/dokan-dev/dokany/blob/master/dokan_np/dokannp.c#L954-L988 |
Hi @Liryna , I am following the documentation https://github.com/dokan-dev/dokany/wiki/Build on how to build dokany, however I ran into an issue when compiling the "sys"(I assume the driver). I get the following error: Have you encountered such a build issue? Thanks, |
@velislav87 Hi, The WDK is not needed to build the dokan_np, you can simply use the driver available in the installer but replace the dokan library and dokan_np from system32 with the one you build in debug. |
Hi again @Liryna , I've successfully did a manual install of the latest driver dokan.sys from the latest release build(debug version of binary) and the dokannp1.dll and dokan1.dll that I've built. I registered them with dokanctl.exe, set the debug to on "dokanctl /d 7", however I don't see any logs streaming in WinDbg program. The mount is successful, however no debug is printed at all. I tried removing all the dokan drivers and dlls, restarting and then re-installing manually, but to no avail. Best Regards, |
Hey, Have you tried to use DebugView and not WinDbg ? |
I tried using DebugView - again no logs are streamed. |
@velislav87 This should be good yes. Unless this dokannp is not used by explorer or DbgView configuration is not good. I have not other idea. |
@Liryna Thanks for the tips. Might be something I messed up or missed in the process. I will try to spin-up a clean windows 10 VM and see if this helps. |
Hi @Liryna , I think after re-trying it on a new VM that I managed to collect some logs with debug output. I did a quick search in them and there seems to be dokannp logs there also. Hopefully they are useful :) One message I see that might be connected to the issue is :
The function output is reminiscent of the error I get in windows also. Edit:
In the first set I browsed more in the directory structure and with the second one reviewing might be more easy. |
Hi @Liryna , did you manage to see the new sets of debug logs? Do they contain the necessary output? Please let me know if I can help out with anything else! |
Thanks for pinging me @velislav87 I kind of forgot that issue I do not have much time to dedicate to dokannp, do you feel you are able to review the dokannp code and see what should be fixed / changed ? |
@Liryna what do you think about some crazy idea that you (dokan team) set some ready to be used machine, so to buid both release and debug versions of drivers would be as easy as RDP/VNC/AnyDesk/TeamViewer in and gitting changes in and pressing few buttons? You can not provide VMs for copyright reasons, but, you now, learning curve of setting up new totally unknown environments might be a beast in itself. For example. in the "new log" above there are rather damning lines.
What is do daming? Well, if you look into line 202 Line 202 in b5edb0b
You see that is just impossible output. And then you understand those are different threads writing at the same time with no distinction!!! Basically such a log is very confusing and less useful than it has to be. Fix seem be trivial. Replace
And i do not see any at all. |
@the-Arioch The project is configured with the appveyor CI. You can fork the project, open a pull request and it will build an installer that you can download. You could also just fork and subscribe your project to appveyor on your side to not have to open a pull request. |
Hmmm.... Sounds like all those mainframes of 1960's, when programmers were giving punch cards to one window at morning, and got rolls of printed paper for another at dinner (either output or errors) :-) Would have to google about look into such a workflow, thanks for the hint. Is there a good crashcourse on it ? |
I made a fork and will see if it would work out. There are lines in the log like
I found DbgPrintW and friends in sources, but nothing like [DokanFS]. |
@Liryna did you try https://pvs-studio.com/en/order/open-source-license/ ? Also, would it be easy to make a non-WiX zip artifact? |
i installed Win7AndW2K8R2-KB3191566-x64.msu still
ans same on Import-PfxCertificate funny that then script said it executed succesfully
P.S. https://www.powershelladmin.com/wiki/Import_PFX_certificates_on_remote_servers_(PSv2-compatible) |
i hopefully managed to install them certs maunally, but thing is, the window7/2008 how-to does not work |
Plus, CI-built installer can not install upon itself, there is not forced update / repair mode, only de-install and re-install :-( |
Something cursed indeed.
P.S. i wonder if UNC "network path" can be made without mounting drive letter. I noticed before, that Total Commander (probably because it is old program gradually evolving since Windows 16-bit times) uses network drives in some manner dissimilar to modern Explorer, it manifests for example in logging into network shares with saved credentials, ones saved by TC are not seen by Explorer... |
Drive N: was "mounted" to C:\ instead of the given path! And is accessible. UPDATE. Disregard parts about drive C:\ - it is my blunder with command line. Look at how cursed names are. No any sanytization done and effects looks quite dangerous to me, at least security/repeatability wise. Driver should not act like that whatever trash a userland app feeds to it... Does anyone know what an intention was ??? |
This way i can access the UNC "share". Log tagging is partially succesfull though.
What about trailing slaahes?
Seems no change.
Oooops! UNC again inaccessible and names are damned. @Liryna why you still using ASCIIZ strings in userland code? maybe in drivers it would be risky to use templates, dunno. ATL, STL, boost, whatever? But in userland??? All those wstr-this, wscp-that... Ain't that stuff crazy and badly time consuming??? |
OK, concept proved: using CI as a rented compiler is possible, albeit has a number of anti-features. ...and the first thing i found in AppVeyor the first hour we met was a bug. As usual with new software... Maybe @Liryna can do somethign about pints above:
Hopefully i'll give some more time to it in October. Last test notice: Two last The latter make the share accessible as seen on the screenshot. However the "server name" it totally ruined! Unmounting does not work either.
I tried breaking the "network connection" to N: to trigger Windows asking me for network password again, to no avail. |
1 -
This feels like a log from a previous version. Any idea why ? 2 -
I do not know this one but our CI is already attached to similar tools Sonar and Codacy 3 -
That's a good idea to have the zip part of the artifacts! Please see c4e62f7 and especially e1cef6e if you want to build in Debug, just change the config in your fork 4 - For the Win7 cert install issue, you should normally get an error 🤔 See #342 5 - 6 -
We should not 😮 Could you point that code ? Please open an issue if there are too much 7 -
This is due to how the installer is used in your case. Normally have one installer per driver release so you would need a reboot anyway. (I am adding the zip artifact to solve this use case) 8 - Arf....the trailing backslash issue should have its own issue :( it is pretty bad. Nice catch! |
Hello. I fell we better go out. To a maillist or seomhing, because issues started intertwining and broading :-)
I have PowershellPlus IDE installed but never actually made use of it.
Am i right that everything that is not in sys\ is userland ? That said, i believe all
So it a proof of concept that my codemonkeying works with CI, it is yet to be extended though:
But it is! It is not my but from that zq-something guy's log in another issue. I think that is how DmgView marked kernel driver log, afterall you probably don't have ProcessIDs insise the kernel :-)
Mmmm... no. See, the reboot requirement is about drivers that patch the kernel (install hooks) and thus can not be cleanly unloaded. Those drivers are load-only. Today they are considered obsolete and replaced with WDM and mini-filters and stuff that can be loaded/unloaded cleanly on demand. And i believe that is exactly what happens with dokan driver, when it is unloaded the kernel becomes "clean" and you can replace dokan1.sys file with another version and load that new one. Am i wrong? is there some remain of the unloaded driver in the kernel that requires reboot on upgrade still ? As to my [ab]using the installer i can only say that there are packages like Microsoft Office or Thales HASP drivers that have "repair" mode, which iu believe usualyl means just reinstalling upon itself, fixing corruptions as a byproduct. I don't see such a function required for Dokan, but don't think it harmful either.
|
I am now able to directly access a subfolder like |
Feature request can skip this form. Bug report must complete it.
Check List
must be 100% match or it will be automatically closed without further discussion. Please remove this line.Environment
Check List
Description
Hi dokany team,
Using the mirror example with a UNC path e.g.
\\Host\Path
does not work with sub-directories. Example if we mount a folder as NetworkDrive using the sample mirror and that folder has a folder "test", accessing directly\\Host\Path\test
would not work. To my investigation no call for this path comes to the mirror or my implementation. See attached logs for more info.Best Regards,
Velislav
Logs
Please attach in separate files: mirror output, library logs and kernel logs.
In case of BSOD, please attach minidump or dump analyze output.
Log file: unc_path_logs.zip
Mounted with the command: "mirror.exe /r c:\test /l K /t 5 /d /s /n /u \localhost\myfs"
In it I tried the following:
\\localhost\myfs
directly from the explorer\\localhost\myfs\test
from explorer - error Directory not foundThe text was updated successfully, but these errors were encountered: