Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost 1.66 incompatible with Bitshares Undo process #852

Closed
jmjatlanta opened this issue Apr 16, 2018 · 6 comments
Closed

Boost 1.66 incompatible with Bitshares Undo process #852

jmjatlanta opened this issue Apr 16, 2018 · 6 comments
Labels
4a Low Priority Priority indicating minimal impact to system/user -OR- an inexpensive workaround exists informative low priority

Comments

@jmjatlanta
Copy link
Contributor

jmjatlanta commented Apr 16, 2018

Boost 1.66 does a rollback of index modifications if an exception is thrown. This conflicts with the bitshares-core undo process, which does the same thing.

To see the problem, compile with Boost 1.66 or above and run the operation_tests/call_order_update_test, specifically the "attempting to claim all collateral without paying off debt".

The exception is thrown within the lambda of graphene/db/generic_index.hpp:modify method (a divide by zero, which may or may not be what is expected). This causes the rest of the operations to not be run, as the undo process expects. Therefore the (later) undo process looks for index entries that do not exist (specifically the call_order_object (1.8.n)).

@ryanRfox ryanRfox added the 4a Low Priority Priority indicating minimal impact to system/user -OR- an inexpensive workaround exists label May 23, 2018
@abitmore abitmore mentioned this issue Jul 7, 2018
@nathanielhourt
Copy link
Contributor

nathanielhourt commented Jul 8, 2018

I think I inadvertently fixed this in 7f17d17 (see also #1126) -- please confirm

@nathanielhourt
Copy link
Contributor

Rofl, I was also the one who introduced this bug way back in 2015... nathanielhourt@127ca9f ... my bad, lol

@abitmore
Copy link
Member

abitmore commented Jul 8, 2018

Looks like the PR #1126 will fix this issue.

However, I think this is a generic issue, other code may cause similar problems as well. We need to thoroughly check all code but not simply close this one.

@nathanielhourt
Copy link
Contributor

Cool, I can check that no other modify functors can throw exceptions.

@nathanielhourt
Copy link
Contributor

nathanielhourt commented Jul 9, 2018

So I was going to check that, but I decided to immunize rather than cure, and made generic_index resilient to modify functors that throw. Ref 7dd4ce0

@abitmore
Copy link
Member

Fixed by #1161.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4a Low Priority Priority indicating minimal impact to system/user -OR- an inexpensive workaround exists informative low priority
Projects
None yet
Development

No branches or pull requests

4 participants