Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Change test miner max memory to support malloc allocator #10024

Merged
merged 1 commit into from
Dec 7, 2018

Conversation

cheme
Copy link
Contributor

@cheme cheme commented Dec 6, 2018

Malloc uses a bit more memory for its allocation on small objects (thanks @ordian for noticing).
It breaks some of the mining tests.
This PR changes the test transaction queue memory limit to reflect this. This is a short term solution to #9953.

Ideally the limit could be set depending on the global allocator definition, I am not sure it is worth the additional complexity but is totally doable (I am currently working on swapping heapsize with malloc_size_of and we need at some point to get a handle other the allocator).

@parity-cla-bot
Copy link

It looks like @cheme signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@cheme cheme added A0-pleasereview 🤓 Pull request needs code review. A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). M4-core ⛓ Core client code / Rust. labels Dec 6, 2018
Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, heapsize actually works with malloc, it's just malloc can consume more memory than jemalloc in some cases , so that's why our tests in ethore-miner, which depended on max_mem, failed. This PR fixes that for the case of malloc allocator. We still need to replace heapsize because of issues on macOS like #9167. And malloc_size_of could be a viable candidate for the replacement.

@ordian ordian added this to the 2.3 milestone Dec 6, 2018
@ordian ordian added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 6, 2018
@ordian ordian requested a review from tomaka December 6, 2018 09:42
@5chdn 5chdn added B1-patch-beta 🕷🕷 B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. labels Dec 6, 2018
@niklasad1 niklasad1 merged commit 23d25a0 into openethereum:master Dec 7, 2018
This was referenced Dec 11, 2018
Tbaut added a commit that referenced this pull request Dec 13, 2018
* bump beta to 2.2.5

* Fix empty steps (#9939)

* Don't send empty step twice or empty step then block.

* Perform basic validation of locally sealed blocks.

* Don't include empty step twice.

* Strict empty steps validation (#10041)

* Add two failings tests for strict empty steps.

* Implement strict validation of empty steps.

* ethcore: enable constantinople on ethereum (#10031)

* ethcore: change blockreward to 2e18 for foundation after constantinople

* ethcore: delay diff bomb by 2e6 blocks for foundation after constantinople

* ethcore: enable eip-{145,1014,1052,1283} for foundation after constantinople

* Change test miner max memory to malloc reports. (#10024)

* Fix: test corpus_inaccessible panic (#10019)

If system uptime is less than the duration in the test, thread
will panic due to: 'overflow when subtracting duration from instant'.

Changed duration to 20 seconds to make it unlikely the test will
fail due to this condition.

Since no operations that carry a similar risk of panic occur outside
of the tests, it doesn't seem warranted to depend on an external crate
to fix this.

* Bump crossbeam. (#10048)
Tbaut added a commit that referenced this pull request Dec 13, 2018
* bump stable to 2.1.10

* RPC: parity_getBlockReceipts (#9527)

* Block receipts RPC.

* Use lazy evaluation of block receipts (ecrecover).

* Optimize transaction_receipt to prevent performance regression.

* Fix RPC grumbles.

* Add block & transaction receipt tests.

* Fix conversion to block id.

* Update a few parity-common dependencies (#9663)

* Update a few parity-common dependencies

* cleanup

* cleanup

* revert update of ethereum/tests

* better reporting of network rlp errors

* Use rlp 0.3.0-beta.1

* fix util function get_dummy_blocks

* Already a Vec

* encode_list returns vec already

* Address grumble

* No need for betas

* Fix double spaces

* Fix empty steps (#9939)

* Don't send empty step twice or empty step then block.

* Perform basic validation of locally sealed blocks.

* Don't include empty step twice.

* Strict empty steps validation (#10041)

* Add two failings tests for strict empty steps.

* Implement strict validation of empty steps.

* ethcore: enable constantinople on ethereum (#10031)

* ethcore: change blockreward to 2e18 for foundation after constantinople

* ethcore: delay diff bomb by 2e6 blocks for foundation after constantinople

* ethcore: enable eip-{145,1014,1052,1283} for foundation after constantinople

* Change test miner max memory to malloc reports. (#10024)

* Bump crossbeam. (#10048)

* Revert "Bump crossbeam. (#10048)"

This reverts commit ed1db0c.
insipx pushed a commit to insipx/parity-ethereum that referenced this pull request Dec 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). A8-looksgood 🦄 Pull request is reviewed well. B0-patch-stable 🕷 Pull request should also be back-ported to the stable branch. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants