macOS reports error on shutdown of GUI #26490

issue xjmzx openend this issue on November 11, 2022
  1. xjmzx commented at 1:34 pm on November 11, 2022: none

    macOS reports error on shutdown of GUI. “Bitcoin Core quit unexpectedly…” Although this may be hardware related , memory and cpu load seem normal (screenshots and logs attached.)

    Expected behavior

    Application closes without error message.

    Actual behavior

    Application quits (and restarts without error or corruption of data) but message persists.

    To reproduce

    The error message seems to persist every time under normal conditions, (closing the application invokes the message “Bitcoin Core is shutting down, do not shut down the computer until this window has disappeared” Then opens fine on relaunch.

    System information

    Bitcoin Core 23.0.0 Version: 23.0.0 (23.0.0) Code Type: X86-64 (Native) Parent Process: launchd [1]

    OS Version: macOS 13.0 (22A380)

    log2022-11-11.txt

  2. xjmzx added the label Bug on Nov 11, 2022
  3. hebasto commented at 2:35 pm on November 11, 2022: member

    @xjmzx

    Bitcoin Core 23.0.0

    Is it reproducible with the latest v24.rc3 or rc4? If so, what are exact steps to reproduce the issue (the way to quit app)?

  4. hebasto added the label GUI on Nov 11, 2022
  5. hebasto added the label macOS on Nov 11, 2022
  6. daniel-andradec commented at 4:21 pm on November 11, 2022: none
    I have exactly the same problem, I guess it started happening after macOS Ventura update. I have Bitcoin Core v23 installed since day one, and no problems before. Now it happens almost all the time at shutdown, but sometimes it doesn’t. Boots up fine if I open Bitcoin Core again. Currently I’ve got macOS 13.0.1, the latest version. Running on an Intel MA.
  7. hebasto commented at 4:37 pm on November 11, 2022: member

    @daniel-andradec

    I had Bitcoin Core v23

    Could you please test recent v24.rc3 or rc4?

  8. xjmzx commented at 4:44 pm on November 11, 2022: none
    @hebasto Was v23.0.0 installed with homebrew. Compiling release candidate, will test and get back.
  9. daniel-andradec commented at 4:50 pm on November 11, 2022: none
    I can’t test it right now, but I can do it later if needed. I guess @xjmzx testing will be enough for now, since the issue is exactly the same.
  10. xjmzx commented at 5:28 pm on November 11, 2022: none

    @hebasto Compiled v24.0rc4 and same error occured. The error occurs on choosing either menu > Quit Bitcoin Core, or command + q. Looking at other operations, the chain is fully synced to tip, peers are connected. I waited for a while on second close with menu > quit.

    logs..

    2022-11-11T17:25:21Z [rpc] Interrupting RPC 2022-11-11T17:25:21Z [rpc] Stopping RPC 2022-11-11T17:25:21Z [rpc] RPC stopped. 2022-11-11T17:25:21Z [rpc] Interrupting HTTP RPC server 2022-11-11T17:25:21Z tor: Thread interrupt 2022-11-11T17:25:21Z i2paccept thread exit 2022-11-11T17:25:21Z Shutdown: In progress… 2022-11-11T17:25:21Z opencon thread exit 2022-11-11T17:25:21Z addcon thread exit 2022-11-11T17:25:21Z torcontrol thread exit 2022-11-11T17:25:21Z [rpc] Stopping HTTP RPC server 2022-11-11T17:25:21Z net thread exit 2022-11-11T17:25:21Z msghand thread exit 2022-11-11T17:25:22Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat started 2022-11-11T17:25:22Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat completed (0.02s) 2022-11-11T17:25:22Z scheduler thread exit 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [specter/…] Releasing wallet 2022-11-11T17:25:24Z [specter/…] Releasing wallet 2022-11-11T17:25:24Z [specter/…] Releasing wallet 2022-11-11T17:25:24Z [sparrow] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z [sparrow] Releasing wallet 2022-11-11T17:25:24Z [wallet/…] Releasing wallet 2022-11-11T17:25:24Z […] Releasing wallet 2022-11-11T17:25:24Z [specter/…] Releasing wallet 2022-11-11T17:25:25Z [jm_wallet] Releasing wallet 2022-11-11T17:25:25Z [default wallet] Releasing wallet 2022-11-11T17:25:25Z Shutdown: done

    There’s a fair few wallet files. Filenames are omitted […] Will check back tomorrow in case you need any further info.

  11. hebasto commented at 7:18 pm on November 11, 2022: member
    Does closing all wallets prior to shutting down help?
  12. daniel-andradec commented at 7:20 pm on November 11, 2022: none
    I never have a wallet open, so it may not have anything to do with it.
  13. xjmzx commented at 2:05 am on November 12, 2022: none

    I took out all but one of the wallets which gave the expected warning that they are missing. (Warning: Skipping -wallet path that doesn’t exist. Failed to load database path ‘/Users/…/…/…/…/…’. Path does not exist.) Then closed after synced fully. Same result I’m afraid.

    macOS 13.0 (22A380)

    ….

    nb. Just updated to macOS 13.0.1 (22A400) and still happens.

    2022-11-12T04:22:00Z [rpc] Interrupting RPC 2022-11-12T04:22:00Z [rpc] Stopping RPC 2022-11-12T04:22:00Z [rpc] RPC stopped. 2022-11-12T04:22:00Z [rpc] Interrupting HTTP RPC server 2022-11-12T04:22:00Z tor: Thread interrupt 2022-11-12T04:22:00Z Shutdown: In progress… 2022-11-12T04:22:00Z addcon thread exit 2022-11-12T04:22:00Z i2paccept thread exit 2022-11-12T04:22:00Z opencon thread exit 2022-11-12T04:22:00Z [rpc] Stopping HTTP RPC server 2022-11-12T04:22:00Z torcontrol thread exit 2022-11-12T04:22:00Z net thread exit 2022-11-12T04:22:00Z msghand thread exit 2022-11-12T04:22:00Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat started 2022-11-12T04:22:00Z DumpAnchors: Flush 2 outbound block-relay-only peer addresses to anchors.dat completed (0.02s) 2022-11-12T04:22:00Z scheduler thread exit 2022-11-12T04:22:01Z [default wallet] Releasing wallet 2022-11-12T04:22:01Z Shutdown: done

  14. xjmzx commented at 6:39 am on November 12, 2022: none
    Oddly, I just successfully closed the application without error :/
  15. Blessme102 commented at 10:31 am on November 12, 2022: none
    @hebasto Please I just got bitcoin core software installed on my MacBook but it can’t be opened
  16. kouloumos commented at 10:37 am on November 12, 2022: contributor

    hebasto Please I just got bitcoin core software installed on my MacBook but it can’t be opened @Blessme102 what you are reporting seems unrelated to this issue but please check #24140 for what you are describing. Your issue is probably related to #15774.

  17. Blessme102 commented at 10:40 am on November 12, 2022: none
    @kouloumos Okay. thanks
  18. john-moffett referenced this in commit a822a6e898 on Nov 14, 2022
  19. john-moffett referenced this in commit 66905db3a4 on Nov 14, 2022
  20. john-moffett referenced this in commit f6c5ce9fe2 on Nov 14, 2022
  21. john-moffett referenced this in commit 2eb518abbb on Nov 14, 2022
  22. jarolrod commented at 3:18 pm on November 15, 2022: member
    @john-moffett your commit seems to resolve the issue, mind opening up a pr in the gui repo?
  23. john-moffett commented at 3:30 pm on November 15, 2022: contributor

    @jarolrod I think there’s actually a cleaner way to fix it than the one I already committed. I’ll open a PR with that new method on the GUI repo within a couple hours.

    The problem is that the menu bar subscribes to QApplication notifications, one of which gets sent after the main window (along with the menu bar) gets destroyed, but before the QApplication gets destroyed. My first solution was to unsubscribe to all of the notifications in the main window’s destructor, but that’s somewhat brittle. A better solution would have the subscription cancelled automatically when the main window is destroyed, which would happen if you pass in a context to the connect function that subscribes to the signals.

  24. hebasto referenced this in commit fb01af6c77 on Nov 17, 2022
  25. hebasto closed this on Nov 17, 2022

  26. hebasto referenced this in commit fc93446117 on Nov 17, 2022
  27. hebasto referenced this in commit e54a4deff8 on Nov 17, 2022
  28. hebasto referenced this in commit 39af5f2164 on Nov 17, 2022
  29. mateusgalasso commented at 9:27 pm on November 17, 2022: none
    the error continuous for me Some solution?
  30. john-moffett commented at 9:32 pm on November 17, 2022: contributor
    @mateusgalasso Can you attach a log like the original poster did?
  31. mateusgalasso commented at 9:51 pm on November 17, 2022: none

    @mateusgalasso Can you attach a log like the original poster did?

    2022-11-17T21:50:20Z UpdateTip: new best=0000000000000383ad5eae5815f5b65d3e102e79b22cdece2d2867f9d9cfd27c height=142625 version=0x00000001 log2_work=66.343656 tx=1373977 date=‘2011-08-26T05:26:05Z’ progress=0.001763 cache=61.8MiB(454071txo) 2022-11-17T21:50:20Z UpdateTip: new best=0000000000000324fc4102f1f309ef23790ebfa7279b0df7ee466e90452436c7 height=142626 version=0x00000001 log2_work=66.343776 tx=1373982 date=‘2011-08-26T05:26:21Z’ progress=0.001763 cache=61.8MiB(454076txo) 2022-11-17T21:50:20Z UpdateTip: new best=00000000000007664fadff938474752a43f16b6f9304398ed4729c6e28da1e93 height=142627 version=0x00000001 log2_work=66.343895 tx=1373984 date=‘2011-08-26T05:27:07Z’ progress=0.001763 cache=61.8MiB(454078txo) 2022-11-17T21:50:20Z UpdateTip: new best=00000000000001c570b945541100c0ff0a04449475fafcd8c3d237d4e61b4a39 height=142628 version=0x00000001 log2_work=66.344015 tx=1374015 date=‘2011-08-26T05:39:35Z’ progress=0.001763 cache=61.8MiB(454089txo) 2022-11-17T21:50:20Z UpdateTip: new best=00000000000009004852481fe4afd6214d089f10f43bd52579c002fdf152f903 height=142629 version=0x00000001 log2_work=66.344134 tx=1374018 date=‘2011-08-26T05:40:34Z’ progress=0.001763 cache=61.8MiB(454211txo) 2022-11-17T21:50:20Z UpdateTip: new best=00000000000007580a916d619dc909037682ab851b5529c7e5afbf6270520030 height=142630 version=0x00000001 log2_work=66.344254 tx=1374129 date=‘2011-08-26T06:02:09Z’ progress=0.001763 cache=61.8MiB(454288txo) 2022-11-17T21:50:20Z UpdateTip: new best=00000000000003c721370f17203829f945491e36a7a38a28c7e97bdcc00d68cd height=142631 version=0x00000001 log2_work=66.344373 tx=1374174 date=‘2011-08-26T06:12:55Z’ progress=0.001763 cache=61.8MiB(454424txo) 2022-11-17T21:50:20Z FileCommit: fcntl F_FULLFSYNC failed: 25 2022-11-17T21:50:20Z ERROR: Flush: failed to commit file 3 2022-11-17T21:50:20Z *** Flushing block file to disk failed. This is likely the result of an I/O error. 2022-11-17T21:50:20Z Error: A fatal internal error occurred, see debug.log for details

  32. hebasto commented at 10:31 pm on November 17, 2022: member

    @mateusgalasso

    Considering your log:

    2022-11-17T21:50:20Z FileCommit: fcntl F_FULLFSYNC failed: 25

    your issue differs from the one discussed here, and it looks like not related to the GUI.

    Mind submitting a new issue?

    UPDATE. Also make sure your data directory does not reside on a remote filesystem.

  33. fanquake referenced this in commit c1061be14a on Nov 18, 2022
  34. mateusgalasso commented at 11:42 am on November 18, 2022: none

    @mateusgalasso

    Considering your log:

    2022-11-17T21:50:20Z FileCommit: fcntl F_FULLFSYNC failed: 25

    your issue differs from the one discussed here, and it looks like not related to the GUI.

    Mind submitting a new issue?

    UPDATE. Also make sure your data directory does not reside on a remote filesystem.

    The data directory is on external SSD, that is ok?

  35. hebasto commented at 3:04 pm on November 18, 2022: member

    @mateusgalasso

    The data directory is on external SSD, that is ok?

    #26530 (comment)

  36. sidhujag referenced this in commit 1d3cf7bf86 on Nov 18, 2022
  37. fanquake referenced this in commit d14dc8e2c6 on Nov 21, 2022
  38. hebasto referenced this in commit 272fa25304 on Nov 21, 2022
  39. fanquake referenced this in commit c192b86c0b on Nov 22, 2022
  40. daniel-andradec commented at 6:33 pm on November 24, 2022: none
    Hi, I’ve just updated to the latest v24 release, and this issue was not solved. Was the fix supposed to be on this version? Using the same computer I said above. Thanks!
  41. hebasto commented at 10:56 pm on November 24, 2022: member

    Hi, I’ve just updated to the latest v24 release, and this issue was not solved. Was the fix supposed to be on this version? Using the same computer I said above. Thanks!

    The fix was backported to the 24.x branch and it will be a part of the next minor or patch release (not the recent v24.0).

  42. daniel-andradec commented at 10:59 pm on November 24, 2022: none

    Hi, I’ve just updated to the latest v24 release, and this issue was not solved. Was the fix supposed to be on this version? Using the same computer I said above. Thanks!

    The fix was backported to the 24.x branch and it will be a part of the next minor or patch release (not the recent v24.0).

    Ok! Thank you!

  43. asylejmani commented at 9:19 pm on December 6, 2022: none

    @hebasto I created a new issue here about:

    2022-11-17T21:50:20Z FileCommit: fcntl F_FULLFSYNC failed: 25

    as I still see the same issue both via GUI and CLI in MacOS Ventura! Cheers!

  44. asylejmani commented at 9:30 pm on December 6, 2022: none
    @sipa I don’t have 24.0.1 as I don’t compile it myself (should start doing it though), but looking at this this issue the one I created is already closed as it turns out to be a Ventura issue instead! I’m gonna try the 13.1 public beta
  45. sipa commented at 9:31 pm on December 6, 2022: member
    @asylejmani Yeah, sorry, I was confusing which issue this was about. I deleted my comment.
  46. asylejmani commented at 9:35 pm on December 6, 2022: none

    No worries, maybe I was also wrong to point it here too but I was addressing hebasto in a comment above somewhere, saying:

    Mind submitting a new issue?

  47. PastaPastaPasta referenced this in commit cb8cc71b8d on Jan 14, 2023
  48. UdjinM6 referenced this in commit 512503ca13 on Jan 22, 2023
  49. gades referenced this in commit 53409d82df on Dec 3, 2023
  50. bitcoin locked this on Dec 6, 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: 2024-11-21 09:12 UTC

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