News for hackers. Stuff that matters.
Re:What is a coder's worst nightmare? (2014) by sethammons on Saturday November 21, 2015 @10:06PM (#10608918)
The one I'm dealing with currently. Sometimes half an array in perl is missing its data, but the program should terminate early if that data is missing. So it gets past one check and then disappears sometimes. Never locally in dev. Only in prod. And not always reproducible. Customer data is getting messed up sometimes, and the code paths don't support this possibility. frustration.
Re:What is a coder's worst nightmare? (2014) by rcfox on Sunday November 22, 2015 @09:53AM (#10610201)
Kinda sounds like you've got a race. Are you using threads at all?
Re:What is a coder's worst nightmare? (2014) by sethammons on Sunday November 22, 2015 @10:21AM (#10610289)
AnyEvent for concurrency; no threads aside from the fork that causes child workers to pick up a message. The validation is in the parent, the child uses the data. The race would have to be something mutating the array, but I can only find one place where mutation happens. That part is a tight for each loop that appends source data to the target array. I will likely have to add logging, but the issue is so infrequent that the extra logging will be a mess due to the volume of data this service handles (around a billion requests per day, and maybe between zero and 200 requests will face this issue). Something will work out eventually; the bug must be exterminated ;)