0

I have a Gatling CSV feeder reading in circular mode from a 10 lines file and my simulation crashes after a little more than 6,000 sessions with the message:

[ERROR] i.g.a.Gatling$ - Run crashed
java.lang.IllegalStateException: Feeder crashed: j.l.NullPointerException: Cannot invoke "scala.collection.mutable.Map.toMap(scala.$less$colon$less)" because the return value of "scala.collection.convert.AsScalaExtensions$MapHasAsScala.asScala()" is null

Since this was the last feeder added to the simulation I tried commenting it out and the simulation runs to the end. I then tried leave only the part that uses the feeder and comment everything else and it also worked. Putting it all together made the error return.

I'm a bit lost on how to debug this. Can you help me?

I'm running the simulation using maven-gatling-plugin.

Update: I've tried using a static values instead of retrieving them from a feeder but I still get crashes with "Feeder is now empty". How can I find which feeder is empty?

lpacheco
  • 976
  • 1
  • 14
  • 27
  • You could catch the error and in the error processing code check all feeders to see which one(s) is/are empty. Alternatively, perhaps try running for 5,000 sessions, save where you have got to, close the feeders and restart from the saved position. – rossum Aug 03 '22 at 19:24
  • All my feeders are very short, 10-15 lines, and I use `circular()` or `random()` for both of them. I have a custom feeder which generates a random value for each session. I don't see how any of them could be empty if they run for thousands of sessions before failing. – lpacheco Aug 03 '22 at 19:30
  • You don't see it, but it is better to check. A lot of errors in computer programs are down to something the programmer didn't see. Been there; done that, too many times! :( – rossum Aug 03 '22 at 20:28
  • I made another test, commenting the suspect feeder and hardcoding a value for the request that uses it. The simulation still fails with "Feeder empty" and stops failing if I comment just this request. So it doesn't seem to be a feeder issue, even if the message says so, but the request is a very simple GET to a parameterless URL. – lpacheco Aug 04 '22 at 13:28

1 Answers1

0

You're not mentioning the version of Gatling you're using, which might mean you haven't considered your version might be outdated and a fix might be already available. The latest version is 3.8.3. Your issue looks similar to https://github.com/gatling/gatling/issues/4240.

Please first upgrade to 3.8.3. If you still experience an issue, then please report with a proper reproducer.

Stéphane LANDELLE
  • 6,076
  • 2
  • 10
  • 12