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

Maid 22 bad alloc #14

Open
wants to merge 15 commits into
base: next
Choose a base branch
from
Open

Conversation

ned14
Copy link
Contributor

@ned14 ned14 commented Aug 28, 2014

Ok, this is a fairly breaking change to how RUDP works in that ASIO worker threads decreases to 1, and therefore all concurrency within RUDP ceases, and therefore the cause of this bug where Socket was being destroyed concurrently to its use in other threads goes away. The other change is I ripped out my previous remedial work in making Multiplexer reference count deleted, because it was obviously obscuring the problem rather than fixing it.

I soak tested this last night and it hanged exactly once which may or may not be important - out of 500 iterations, that's a hang rate of 0.2%, and could be a false positive. The removal of the remedial work has introduced lots of ThreadSanitiser fails, this is a good thing and I'll try to figure out the new cause. Various tests still sporadically fail, but this branch doesn't have my increased timeouts, so that is expected.

So, if you start seeing hangs after applying this patch, get back to me :) Otherwise it probably fixes more problems than it causes, and therefore is an improvement.

maqi and others added 15 commits August 27, 2014 11:58
This reverts commit e2a1b08.
…e it is being used in favour of Transport::Close() dispatching the connection teardown onto the appropriate ASIO thread instead.

Unfortunately this creates occasional deadlocks, so I disabled all ASIO multithreading, thus solving mutex brittleness in one fell swoop. If the performance hit isn't terrible I'm keeping ASIO single threaded.
@Fraser999
Copy link
Contributor

Your other pull requests have been merged Niall - I guess that makes this one obsolete?

@ned14
Copy link
Contributor Author

ned14 commented Sep 3, 2014

It'll have to be redone I'd say. Anyway Peter is on it, I explained to him the cause and likely fixes.

@jenkinsmaidsafe
Copy link

test this please.

@jenkinsmaidsafe
Copy link

Builds Triggered;
CAREFUL: positive marking does not reflect build or test results!
Refer to this link for build results: http://ci.maidsafe.net:8080/job/ms_rudp_ghpr/39/

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.

4 participants