Along with @maciejwolczyk we’ve been training a neural network that learns how to play NetHack, an old roguelike game, that looks like in the screenshot. Recently, something unexpected happened.

  • slurpyslop@kbin.social
    link
    fedilink
    arrow-up
    33
    ·
    6 months ago

    it was the WEIRDEST bug in our chess ai you guys

    the pawn captured another pawn that was NEXT TO IT

    like what’s going on there

  • nomad@infosec.pub
    link
    fedilink
    English
    arrow-up
    18
    ·
    6 months ago

    Reminds me of a production bug we could not replicate for the life of me.

    The condition could logically not be reached. impossible.

    Turns out, in production we had two threads per process, and one would monkey patch a function in the shared process space with a non multi threading safe locking mechanism.

    That took several days to find.

  • dohpaz42@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    6 months ago

    This is a common problem when testing time-based software. And similarly why it’s difficult to test database-drive software. You have to put a lot of effort into setting up a good environment for testing and genuinely understand the software and its dependencies.

  • ozymandias117@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    ·
    6 months ago

    A “fun” one I ran into was all our tests passing on my desk, but failing in the test farm

    After a month, we realized that having an HDMI cable plugged into the unit was corrupting the SD card due to a memory overwrite in the graphics stack

  • ObsidianNebula@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    12
    ·
    6 months ago

    I had an issue where a client reported a crash on login. The exception and stack trace reported were very generic and lent no clues to the cause. I tried debugging but could not reproduce. I eventually figured out that the crash only happened for release (non-debug) builds that were obfuscated. I couldn’t find the troublesome code, so I figured out which release introduced the issue, then which commit, then went change by change until I was able to find the cause. It turned out to be a log message in a location that was completely unrelated to login. That exact log message was fine a few lines up. Other code worked fine in that location. For some unknown reason, having that log message in that specific location caused a crash in a completely different area of code.

    • Arigion@feddit.de
      link
      fedilink
      English
      arrow-up
      8
      ·
      6 months ago

      Usually a sign of multiprocessing/multithreading going wrong, e.g. accessing the same resource without proper locks like opening the same logfile in different processes and trying to write simultaneously. Those errors can be triggered just by reformating the code (or obfuscating in this case), thus changing the runtime behaviour slightly. Hard to find, especially since they’re dependent on the speed/workload of the machine running the code.

  • RecallMadness@lemmy.nz
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    6 months ago

    I was expecting some sort of “Ai discovers new bug in 30 year old software”… cool I’m excited.

    Then they were talking about how the bug was persistent, and I’m more intrigued “is the bug some weird emergent behaviour corrupting state somewhere?”

    Nope, just another example of a shit in shit out data model.

  • spongebue@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    6 months ago

    Java was giving a no such method exception at runtime, but it compiled fine. Granted, that method was recently added to the class, but it was pretty simple and again, you’d expect the compiler to detect things like that.

    Turns out the code I inherited from a not-great team had that class in two different places. Maven replaced the one I worked on with the untouched copy, which went into the build.

    • Nithanim@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 months ago

      Yeah, if you get this exception and not doing anything not-“normal” then the chance is high that there are multiple versions of the same class. A possible way to trigger this is when extracting code to a separate module without changing the package. If you copy instead of move and change something you will have a bad time. It is also possible that the IDE complains but building and executing works.

      Fun times!

  • rodneylives@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    6 months ago

    Warning: this is secretly a Nethack thread!

    So, the model was playing on average 2,000 points worse because the player was luckier? The things about werewolves and dogs is a factor but is statistically insignificant.

    Nethack has a couple of other gotchas like this. They should be grateful they weren’t playing on Friday the 13th…

  • There was a speed runner that hit a world record or lost a world record run due to a random bit flip because of space radiation. That’s gotta be worse than just not knowing the deeper mechanics of a very old game.