Segfault running master on NetBSD #17379

issue fanquake openend this issue on November 5, 2019
  1. fanquake commented at 3:01 pm on November 5, 2019: member

    While testing 17270 I noticed that master (bdda137878904e9401a84e308ac74c93c2ef87c1) does not run on NetBSD. I assume this started after #17085 changed the fallback locale from C to C.UTF-8. There doesn’t seem to be a C.UTF-8 locale on NetBSD.

    0src/bitcoind
    1terminate called after throwing an instance of 'std::runtime_error'
    2  what():  locale::facet::_S_create_c_locale name not valid
    3Abort trap (core dumped)
    

    LC_ALL=C src/bitcoind works, LC_ALL=en_US.UTF-8 src/bitcoind does not.

    0locale
    1LANG=""
    2LC_CTYPE="en_US.UTF-8"
    3LC_COLLATE="C"
    4LC_TIME="C"
    5LC_NUMERIC="C"
    6LC_MONETARY="C"
    7LC_MESSAGES="C"
    8LC_ALL=""
    
  2. fanquake added the label Linux/Unix on Nov 5, 2019
  3. laanwj commented at 4:39 pm on November 5, 2019: member
    This is an eternal source of problems. I wonder if we can get rid of all locale dependency at some point and just ignore the locale. Probably not as long as we use boost::filesystem … :cry:
  4. practicalswift commented at 5:13 pm on November 5, 2019: contributor

    @laanwj

    Setting aside the boost::filesystem the list of places where we’re using locale dependent operations is quite short:

    https://github.com/bitcoin/bitcoin/blob/e204dc11b562c2cf31d320774a4dcbe49f3b6468/test/lint/lint-locale-dependence.sh#L5-L20

    Perhaps a “good first issue” could be created to tackle the list above? Some of them are really low hanging fruits suitable for new contributors.

  5. laanwj commented at 6:49 pm on November 5, 2019: member
    I’m all for replacing those, but none of those functions crashes on having a wrong locale configured, that’s very much a boost thing.
  6. kayront commented at 1:28 pm on March 21, 2021: none

    FYI, after progress on #21485, bitcoind on SmartOS (Illumos) suffers from the same issue.

    0terminate called after throwing an instance of 'std::runtime_error'
    1  what():  locale::facet::_S_create_c_locale name not valid
    2Abort (core dumped)
    
  7. laanwj commented at 12:56 pm on March 22, 2021: member
    @fanquake has been working on replacing boost::filesystem, which should get rid of this issue entirely, maybe help testing #20744.
  8. kayront commented at 6:04 pm on March 24, 2021: none
    @fanquake do you need help testing those changes on SmartOS? I can try to compile your branch.
  9. fanquake referenced this in commit fdd71448e7 on Jul 2, 2021
  10. fanquake closed this on Sep 9, 2021

  11. fanquake referenced this in commit 8805e06663 on Sep 9, 2021
  12. sidhujag referenced this in commit 6077987d2e on Sep 11, 2021
  13. fanquake referenced this in commit 6a8b2cd4ea on Oct 20, 2021
  14. fanquake referenced this in commit e234015617 on Oct 21, 2021
  15. luke-jr referenced this in commit 1ec778dc67 on Dec 14, 2021
  16. fanquake referenced this in commit 7c1d4ed183 on Feb 14, 2022
  17. fanquake referenced this in commit c95b188fc0 on Feb 15, 2022
  18. PastaPastaPasta referenced this in commit 2c8fffb44b on Mar 13, 2022
  19. DrahtBot locked this on Oct 30, 2022

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-07-08 22:13 UTC

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