Skip to content

Conversation

@TheBlueMatt
Copy link
Contributor

This fixes #981 and should fix #956

I havent tested 956 after this patch, but it does fix #981 and afaict, they are actually the same underlying issue.
It would be nice to have someone do more digging and find out what is actually going on in the win32 api calls boost is making and find the real issue, but this fixes the problem. Also, someone should file a boost bugreport.

@TheBlueMatt
Copy link
Contributor Author

@TheBlueMatt
Copy link
Contributor Author

Note that because /all/ of boost::interprocess is implemented in headers, this patch can be applied in contrib/gitian-descriptors/gitian-win32.yml or contrib/gitian-descriptors/boost-win32.yml
I chose boost-win32.yml as it seemed more sane, but it does mean everyone has gets to rebuild boost

@Diapolo
Copy link

Diapolo commented Mar 25, 2012

Prove me wrong, isn't boost::interprocess a compiled lib? It would make sense to get that bug fixed with the boost guys and use a safe work-around until this is done and we can upgrade.

@TheBlueMatt
Copy link
Contributor Author

Though boost is a collection of compiled libs, as it turns out, boost::interprocess isnt. If you look in the boost source at boost/interprocess you will notice that there are no files that end in .cpp, all of them are hpp (header files). Nothing is compiled to a library in boost::interprocess.
And, yes, it would be much better to have a nice workaround in bitcoin and let the boost guys fix the problem, however, afaict it would be impossible to do without modifying the boost source in some way (either removing the definitions of BOOST_INTERPROCESS_HAS_BOOTTIME, or this pull).

@Diapolo
Copy link

Diapolo commented Mar 26, 2012

You are right, only true libs we have from boost are filesystem, program_options, system and thread.

@Diapolo
Copy link

Diapolo commented Mar 26, 2012

I tested your fix and what it does (and what I should have observed before), is to create a directory in the boost_interprocess folder whose name is based on the Windows bootup time. This is broken in the official 1.47 and 1.49, too.

I suggest we combine your work here and my work (with ipcRecover()), as there still could be a chance to have an orphan message queue file, but only during the current Windows session.

Your fix ensures that after a restart a new folder with current bootup-time will be created and mine covers stale message queue files. Seems like a pretty decent combination :).

@TheBlueMatt
Copy link
Contributor Author

Yea, I dont think the two are at all mutually exclusive. If boost's interprocess stuff were to die with bitcoin (not sure how boost handles it, did I read that it was thrown in a service somewhere or something?) without the OS dying, the same issue could still appear that ipcRecover fixes. That said, I dont think we need to merge ipcRecover in 0.6, its more of a safety net and being (hopefully) this late in the 0.6 release cycle, I dont think merging it would be the best choice.

@Diapolo
Copy link

Diapolo commented Mar 26, 2012

I updated it a few minutes ago, but I have no problem with getting it integreated into early 0.7. It were many many hours of debugging and trial and error, so it would be very nice, to include it :).

@sipa
Copy link
Member

sipa commented Mar 31, 2012

The patch looks sane to me, the only thing we have to make sure is that it remains compatible with a range of boost releases (past and future...).

Also, I don't really like how this is limited to gitian builds. Is it impossible to do from qmake?

@Diapolo
Copy link

Diapolo commented Apr 1, 2012

It would make sens to get this integrated with boost, so we would not have to handle it in the future. Are we allowed to modify the boost headers, so we can redistribute the fixed version of that file in i.e. the deps.zip for Windows?

@Diapolo
Copy link

Diapolo commented Apr 2, 2012

Update in the boost discussion: https://svn.boost.org/trac/boost/ticket/5392#comment:29
I will try the latest boost SVN version tomorrow / later.

@Diapolo
Copy link

Diapolo commented Apr 10, 2012

See here what the boost dev had to say to your patch:
https://svn.boost.org/trac/boost/ticket/5392#comment:29

I did some further tests and it seems with boost 1.49 it's sufficient to edit a hpp as per https://svn.boost.org/trac/boost/ticket/5392#comment:29

@TheBlueMatt
Copy link
Contributor Author

Yea, I never said it was suitable for upstream inclusion. It was written specifically to fix the issue in bitcoin.

@Diapolo
Copy link

Diapolo commented Apr 10, 2012

No problem I only wanted to point out that we could achieve better IPC handling without a monkey-patch :). Your initial work was great and helped me a lot to progress further, so thanks!

@TheBlueMatt
Copy link
Contributor Author

Alright then.

@TheBlueMatt TheBlueMatt mentioned this pull request Jun 10, 2012
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Oct 30, 2019
b63f033 [Doc] Add more notable changes (Fuzzbawls)
2efa84a [Doc] Add Release notes draft for 932, 943 and 957 (warrows)
0116060 [Doc] Add historical release notes for 3.3.0 (warrows)

Pull request description:

  Update release notes for the next release.

ACKs for top commit:
  Fuzzbawls:
    ACK b63f033
  random-zebra:
    ACK b63f033

Tree-SHA512: b096e839246393e9a1d80802d46bf0c0070e3b5a6a9a496ffc5cb7fee9afd90f2b9f121dc173df48e96eba107d3ab5bf8d51d0fb9c9df10da29991ce8feac772
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

general Bitcoin URL handling on Windows 0.6rc4 gui frozen on Windows 7

4 participants