Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Address already in use: Race condition between isolated executions

Actually, as being isolated docker containers, one instance interfering with another should be impossible...

Sooo, the error message and the hanging behavior is the same between my actual application and the simple 'example' attached. They may still be related though.

I guess I still have to look around for some answers, but the hanging/exception part is a problem in general!


On Tue, Nov 3, 2020 at 2:08 PM Marcelo Andrade Rodrigues D Almeida <md@xxxxxxxxx> wrote:
Hi everyone

Trying to open two simulations with the same port hangs the entire execution, instead of raising an exception

Error
"Error: tcpip::Socket::accept() Unable to create listening socket: Address already in use
Quitting (on error)."


I'm currently running several experiments, simultaneously, in isolated docker containers. And inside every experiment, running several parallel simulations

The problem is that my experiments can step (and eventually does) into address conflict problems (race condition) and the hanging prevents any chance of retrying it with a new port, suspending the entire experiment forever.

The use of synchronization locks prevents address conflicts inside one experiment, so I'm basically limited to run one experiment at a time, which is very time consuming.


As a workaround, I'm going to specify port ranges for each simulation and check it for availability

Let me know if there is a better solution as workaround

And thank you in advance


P.S. I've included a trivial example to show the hanging behavior, but there is nothing special about it.


Sincerely,

Marcelo d'Almeida

Back to the top