View Issue Details

IDProjectCategoryView StatusLast Update
0005209Talermerchant backendpublic2024-01-12 13:04
ReporterFlorian Dold Assigned ToFlorian Dold Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritylowSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Versiongit (master) 
Target Version0.7.1Fixed in Version0.8 
Summary0005209: test cases should not use fixed port numbers
DescriptionFor example the merchant lib test uses port 8081, which clashes with some buildbot port.

We can also run into cases where two tests are executed simultaneously, with some bad luck one of them will fail.

We can find free ports e.g. with this method: https://www.dnorth.net/2012/03/17/the-port-0-trick/

The idea is to:
1) select a port that is currently free
2) start the exchange (or whatever component we need to run)
3) if it failed (because of a race on the port), try again with another port for some small number of tries

And on systems where it's not supported, we fall back to a fixed port number.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2017-12-10 14:11

manager   ~0012650

We actually have logic for picking free ports like that in GNUnet (testing subsystem uses it). But it's usually quite a bit of extra work to achieve this level of flexibility, especially as we would have to _write_ configuration files with those port numbers in them in many cases.

So for now, I think we should simply avoid conflicting port numbers on taler.net, maybe use more, eh, unusual ones, but consistently changing the test logic to pick free ports is really not worth the trouble.

Florian Dold

2017-12-10 14:19

manager   ~0012651

I've already changed the offending port, and now the tests work again.

Then let's not make the dynamic port selection a priority now, but eventually I'd like to have it, since when more people do something with the backend we'll hear about this again eventually ;-)

Florian Dold

2020-04-06 19:00

manager   ~0015537

I think this not relevant anymore, as we have the netjail now!

Issue History

Date ModifiedUsernameFieldChange
2017-12-10 13:47Florian DoldNew Issue
2017-12-10 13:47Florian DoldStatusnew => assigned
2017-12-10 13:47Florian DoldAssigned To => Marcello Stanisci
2017-12-10 13:49Florian DoldDescription Updated
2017-12-10 13:49Florian DoldAssigned ToMarcello Stanisci => Christian Grothoff
2017-12-10 14:11Christian GrothoffNote Added: 0012650
2017-12-10 14:11Christian GrothoffAssigned ToChristian Grothoff => Florian Dold
2017-12-10 14:11Christian GrothoffStatusassigned => feedback
2017-12-10 14:11Christian GrothoffProduct Version => git (master)
2017-12-10 14:19Florian DoldNote Added: 0012651
2017-12-10 14:19Florian DoldPrioritynormal => low
2020-04-06 19:00Florian DoldStatusfeedback => informing
2020-04-06 19:00Florian DoldResolutionopen => no change required
2020-04-06 19:00Florian DoldNote Added: 0015537
2020-04-13 00:40Christian GrothoffTarget Version => 0.7.1
2020-07-24 09:56Christian GrothoffFixed in Version => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend