dice-group / IGUANA

IGUANA is a benchmark execution framework for RDF triple stores and quad stores
http://iguana-benchmark.eu
GNU Affero General Public License v3.0
24 stars 15 forks source link

Requests are still sent after HttpClient was closed #173

Closed liss-h closed 7 months ago

liss-h commented 2 years ago

IGUANA sometimes sends more requests to triplestores than is specified. The problem is that it tries to send them even after it closed it's HttpClient which then results in a SocketException. Note: if the logs don't show the queries thats because I removed them for debugging purposes.

[pool-4-thread-1] INFO [org.aksw.iguana.cc.worker.AbstractWorker] - <Starting Worker[{HttpGetWorker} : {0}].>
[pool-2-thread-1] INFO [org.aksw.iguana.cc.worker.AbstractWorker] - <Worker executed 1.0 queryMixes>
[pool-4-thread-1] WARN [org.aksw.iguana.cc.worker.AbstractWorker] - <Worker[HttpGetWorker : 0]: Socket closed on query (ID sparql0)>

To reproduce:

  1. Create a suite with noOfQueryMixes: 1 containing an HttpPostWorker with threads: 1 that sends sparql-update queries to a triplestore
  2. Run it

Another interesting observation (not sure how helpful it is): replacing this line with client = HttpClients.createDefault(); changes the behaviour to:

[pool-4-thread-1] INFO [org.aksw.iguana.cc.worker.AbstractWorker] - <Starting Worker[{HttpGetWorker} : {0}].>
[pool-2-thread-1] INFO [org.aksw.iguana.cc.worker.AbstractWorker] - <Worker executed 1.0 queryMixes>
[pool-4-thread-1] WARN [org.aksw.iguana.cc.worker.AbstractWorker] - <Worker[HttpGetWorker : 0]: Cannot invoke "org.apache.http.impl.client.CloseableHttpClient.execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext)" because "this.client" is null on query (ID sparql0)>

Debugging hint:

  1. place breakpoints
  2. They get executed in order: a, b, a, c, b (and sometimes another c, I think it happens when the debugger is advanced fast enough)
frensing commented 1 year ago

Hi, i could not recreate the problem locally. Could you provide more information on how to possibly recreate this? Also, is it currently a problem? Like is it affecting the IGUANA results? or is it just a weird behaviour?

Otherwise we will look into this again when we revisit the whole architecture of IGUANA.

liss-h commented 1 year ago

Hi, i could not recreate the problem locally. Could you provide more information on how to possibly recreate this? Also, is it currently a problem? Like is it affecting the IGUANA results? or is it just a weird behaviour?

Otherwise we will look into this again when we revisit the whole architecture of IGUANA.

I think it might be very hardware dependent as it seems to be a race condition. I'm somewhat sure that it is only weird behaviour and not affecting the results. So revisiting later is probably fine.

nck-mlcnv commented 7 months ago

Should probably be fixed by now with the new worker implementations.