Bitcoin Institute

Satoshi to Hal Finney: Isolating the crash (January 10, 2009)

Satoshi Nakamoto January 11, 2009 02:55 UTC

I isolated the problem. If I spawn a thread and do mapAddresses.count, even as the very first thing in the program, it segfaults. The workaround is to needlessly call mapAddresses.count in the main thread once and it’s fine from then on. I hate to blame the compiler, and I’ve never had a GCC compiler bug before, but this feels like one. Maybe some bit of init code it tries to optimize out if it’s not called at least once in the same thread, or some STL optimization that’s not thread friendly. I’m really dismayed to have this botch up the release after all that stress testing.

The attached file: bitcoin-0.1.1.rar (filesize 2,132,686) is the version where I deleted the mapAddresses.count line, and that should be the safest version. (that was the only use of mapAddresses.count) If you could try this version and confirm that the crash is fixed, I’d appreciate it.

Thanks,

Satoshi

Original external source

https://online.wsj.com/public/resources/documents/finneynakamotoemails.pdf
Transcribed from the Wall Street Journal PDF. Hal Finney supplied the emails to the Journal in spring 2014. Subject: "Re: Crash in bitcoin 0.1.0". PDF header: Sat, Jan 10, 2009 at 6:55 PM; no time zone is given, so the time is converted to UTC assuming Pacific Standard Time (UTC−8). Visual line wraps have been rejoined. Attachments mentioned in the email are not preserved.

Other external sources