8
sjwsjwsjw
261d

being asked to fix a bug that cannot be reproduced consistently

Comments
  • 1
    let it fly then
  • 2
    "don't you have logs?"
  • 0
    These are fun!
  • 5
    I am sure you know that, but this is my strategy list in such cases:

    - increase logging
    - make them call you immedeatly when it occurs
    - make them describe exactly what happened when it occured
    - write a test that repdocuces those steps in a loop until it occures
    - try it with random user input
    - try it on all kinds browsers, even old/exotic ones, that you don't intend to support (their behaviour can give hints at least)
    - try it on wndows and is and with your phone
    - since heisenbugs are mostly Timing issues, try it with simulated slow/instable network
    - put sleeps in suitable places (like in promises) to simulate different race conditions
    - increase logging even more
  • 1
    @horus loving the term heisenbugs.
  • 1
    Wish you luck!
    My first place with hard to reproduce bugs is suspecting a race condition.

    I second adding more logging, but that logging can be made so you can see in what order things happen in your program.

    I’ve also seen bugs that are hard to reproduce due to memory leaks in Electron! 🤦‍♂️

    Monitor the health of the system where the bug is showing up (cpu/memory/network usage) in case there’s a correlation (in my case the OS was killing my app because it was using 90% of the system memory and increasing)
  • 2
    @DamoMac not my invention, copyrighted by the internet.
  • 0
    @horus fab list - particularly trying to capture the bug in a characterisation test
  • 0
    Try to isolate the part of the code that « may be » buggy

    Add some logs and wait for it to happen again.

    Lay down and think about the datastreams

    Read logs, check if u had a catch, otherwise, add more logs.

    Had this on an android app that only crash of some samsungs galaxies of certain android version. Without even a warning on other devices.
    Ended up a problem with permission specific to galaxy’s phones that doesn’t allow user to store on sdcard.
Add Comment