wallet: Can't Access System Volume Information #20081

issue Linrono opened this issue on October 5, 2020
  1. Linrono commented at 12:08 AM on October 5, 2020: contributor

    I have the C:\Users\username\AppData\Roaming\Bitcoin folder as a soft link to a separate internal drive. This apparently caused an issue when trying to access another wallet. NTFS has created a hidden folder called System Volume Information on the root of the drive where the data directory is. When I try to open another wallet inside of Bitcoin-QT, it freezes up. The error I get in the log is ListWalletDir: Access is denied C:\Users\Linrono\AppData\Roaming\Bitcoin\System Volume Information. This shows up in the logs over and over until I force close Bitcoin-QT. It took up my entire 10MB log file at one point. I also tested this using bitcoind.exe and the same thing happens when running bitcoin-cli.exe getwalletdir. An easy fix for me would be to just create a folder in the volume and move my soft link to point there. I just wanted to bring this to your attention.

    Expected behavior

    I thought I would get a list of wallets I have created in the directory with the createwallet command.

    Actual behavior

    This caused a freeze that required the program to be force closed.

    To reproduce

    Just store the Bitcoin Data Directory in the root of a Windows Volume, and then try to find local wallets. This has happened to me every time I go to File and then mouse over Open Wallet or use the listwalletdir bitcoin-cli command.

    System information

    I am using Bitcoin Core v.20.1 from the BitcoinCore.org website.

    Windows 10, Ryzen 5, Hard Drive

    I believe this issue is related to the NTFS system folder on the root of volumes.

    ListWalletDir: Access is denied C:\Users\Linrono\AppData\Roaming\Bitcoin\System Volume Information

  2. Linrono added the label Bug on Oct 5, 2020
  3. fanquake added the label Windows on Oct 5, 2020
  4. MarcoFalke renamed this:
    Bitcoin Can't Access System Volume Information
    wallet: Can't Access System Volume Information
    on Oct 5, 2020
  5. MarcoFalke added the label Wallet on Oct 5, 2020
  6. Saibato commented at 8:26 AM on October 5, 2020: contributor

    please take a view at #19419 could u check if that PR applied on top of master might fix ur problem?

  7. Linrono commented at 7:34 PM on October 11, 2020: contributor

    I am having trouble compiling bitcoind on my Windows machine so I am afraid I cannot test that PR.

  8. sipsorcery commented at 8:42 PM on December 2, 2020: member

    The Bitcoin Core software uses stock standard win32 API's to access the Windows file system. I think the main issue here is how the software ended up trying to access the System Volume Information directory in the first place. That directory isn't meant to be directly accessed by applications.

    If you still have it could you paste a copy of your bitcoin.conf file (with any sensitive info removed)?

  9. sipsorcery commented at 9:51 AM on December 7, 2020: member

    @fanquake I think this issue can be closed. No Windows application will work properly if it attempts to use the System Volume Information directory.

    The only outstanding question is how/why bitcoin-qt attempted to use that directory in the first place. Without further info it's just guess work.

  10. Linrono commented at 6:13 PM on December 7, 2020: contributor

    I'm sorry, I guess I wasn't clear as to why I believe this is happening. Bitcoin-QT is trying to find any local wallets. Default setting created wallets beyond the initial wallet are stored in folders in the Data Directory. When I try to open a different wallet, Bitcoin-QT searches the Data Directory for folders with possible wallets in them, and it finds the System Volume Information folder, and tries to access it, then it crashes. At least without a dive into the code, that is what it looks like is happening. This only happens when the Data Directory is set to the Root of a Hard Drive because that is where the System Volume Information folder is. All I had to do was move the Data Directory into a folder a step up from the Root of the Drive and this was no longer an issue. I guess a fix would be for Bitcoin-QT to recognize that any folder named System Volume Information is off limits, or at least stop trying to access it if it fails. By the way, this also happens when just running bitcoind.exe and bitcoin-cli.exe getwalletdir, so it isn't just Bitcoin-QT that is affected. Here is my bitcoin.conf if that helps.
    server=1 txindex=1 daemon=0 zmqpubrawblock=tcp://127.0.0.1:28332 zmqpubrawtx=tcp://127.0.0.1:28333 assumevalid=0

  11. sipsorcery commented at 8:33 PM on December 7, 2020: member

    @Linrono great, thanks for the additional info. I'll attempt to replicate the problem and if it does cause a crash or fills up the log it's definitely something that should be fixed.

  12. sipsorcery commented at 9:10 PM on December 7, 2020: member

    @Linrono I'm not having much luck being able to replicate the problem with the latest code. It could well be that the #19419 PR mentioned above has removed the attempt to list the contents of the wallet directory.

    Using a recent build of the master I've used the command below and get the expected error that the wallet path does not exist. The debug log does not record anything untoward and there's no unexpected crash:

    bitcoin-qt -regtest -walletdir="c:\system volume information"

    If you're able to execute that command from the command line and report your results that would be very useful.

    Failing that, or in addition to it, you can download the latest release candidate from https://bitcoincore.org/bin/bitcoin-core-0.21.0/test.rc2/ and see if it now behaves.

    Of course don't try any of this with a mainnet wallet.

  13. Linrono commented at 6:45 PM on December 20, 2020: contributor

    I have tried your command, and yes that does seem to be the case. I think the difference is your command is specifically trying to create a wallet while I'm talking about looking for an unknown existing wallet.

    I tried recreating the issue with the version 0.21.0rc3 and it still happens. I launch it like this.

    'C:\Program Files\Bitcoin\bitcoin-qt.exe' --datadir="e:\"

    This time, when I go to File and mouse over Open Wallet, it complains about the Recycle Bin.

    ListWalletDir: Access is denied e:\$RECYCLE.BIN\S-1-5-18

    Hard crash. Log is full of the error above.

  14. hebasto commented at 7:19 PM on May 10, 2021: member

    @Linrono @prusnak

    Do you mind testing #21907?

  15. prusnak commented at 7:30 PM on May 10, 2021: contributor

    I am not using Windows, so can't test #21907

  16. Linrono commented at 7:41 PM on May 10, 2021: contributor

    The last time I tried compiling Bitcoin Core for Windows didn't go well. I will try again and see if I can test #21907.

  17. Linrono commented at 5:56 AM on May 12, 2021: contributor

    I just tested your pull request and it did not crash in either bitcoin-qt or bitcoind. Very quick testing looks good.

  18. hebasto commented at 8:16 AM on May 12, 2021: member

    @Linrono

    I just tested your pull request and it did not crash in either bitcoin-qt or bitcoind. Very quick testing looks good.

    Thanks for testing! Could you post your comment in #21907 ?

  19. meshcollider closed this on May 13, 2021

  20. sidhujag referenced this in commit da5c7248f0 on May 13, 2021
  21. DrahtBot locked this on Aug 18, 2022
  22. PastaPastaPasta referenced this in commit cd47c6bd48 on Apr 10, 2023
  23. PastaPastaPasta referenced this in commit dc1f37e51a on Apr 15, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me