Andrea Maria Piana 24a30d7a7c Fix deadlock in peerpoool
This is a bit complicated, so:

1) Peerpool was subscribing to `event.Feed`, which is a global event
emitter for ethereum.
2) The p2p.Server was publshing on `event.Feed`, this triggered in the
same routine a publish on `event.Feed`.
3) Peerpool was listening to `event.Feed`, react on it, and in the same
routine, trigger some code on p2p.Server that would publish on
`event.Feed`

This meant that if the size of the channel was unbufferred, it would deadlock, as
peerPool would not be consuming when it would publish (the same go
routine publishes and listen effectively, through a lot of indirection
and non-buffered channels, p2p.Server->event.Feed)

The channel though was a buffered channel with size 10, and this meant that most of the times is
fine.

The issue is that peerpool is not the only producer to this channel.
So it's possible that while is processing an event, the buffer would
fill up, and it would hange trying to publish, and nobody is listening
to the channel, hanging EVERYTHING.

At least that's what I think, needs to be tested, but definitely an
issue.

I kept the code changes to a minimum, this code is a bit hairy, but it's
fairly critical so I don't want to make too many changes.
2021-01-29 14:15:44 +01:00
2020-12-28 16:55:14 +01:00
2021-01-26 09:39:54 +01:00
2020-01-06 10:17:23 +01:00
2020-01-06 10:17:23 +01:00
2020-03-04 09:30:31 +01:00
2020-12-17 14:10:00 +01:00
2021-01-26 09:39:54 +01:00
2021-01-26 09:39:57 +01:00
2021-01-29 14:15:44 +01:00
2018-03-23 14:58:40 +01:00
2020-01-20 13:15:17 +01:00
2021-01-26 09:39:54 +01:00
2021-01-26 09:39:57 +01:00
2020-01-20 13:15:17 +01:00
2020-11-24 12:20:57 +01:00
2021-01-27 09:23:11 +01:00
2021-01-26 17:58:25 +01:00
2021-01-26 17:58:25 +01:00
2020-04-21 10:40:39 +02:00
2019-06-12 13:12:00 +02:00
2021-01-27 09:23:11 +01:00
2021-01-27 09:23:11 +01:00
2016-09-21 10:00:29 +08:00
2021-01-27 10:54:52 +01:00
Description
The Status module that consumes go-ethereum
https://status.im
Readme
Languages
Go 98.7%
Python 0.7%
Shell 0.3%
Makefile 0.1%
Groovy 0.1%