gue icon indicating copy to clipboard operation
gue copied to clipboard

panic recovery is broken

Open metropolisenchanting opened this issue 3 years ago • 7 comments

defer recoverPanic(ctx, ll, j) in worker.go:206 doesn't log the panic and populates lastError with an empty string, even tho it increases the errerCount value

I'm using the zap and pq adapter and

I spend some time looking into the issue but I couldn't find the reason

metropolisenchanting avatar Jun 05 '22 08:06 metropolisenchanting

What version are you using?

Are you using hooks? If yes - can be related to https://github.com/vgarvardt/gue/issues/65 and should be fixed in the latest version. Can you pls check?

vgarvardt avatar Jun 07 '22 20:06 vgarvardt

I've been using github.com/vgarvardt/gue/v3 v3.3.0 so far

is v4.0.0-alpha.9 the latest version ?

metropolisenchanting avatar Jun 08 '22 12:06 metropolisenchanting

Yes, v4 is currently the latest version I'm working on. The main difference between v3 and v4 is some old adapters and deprecated functionality removal, all the core functionality remained unchanged. You can check the full changelog at https://github.com/vgarvardt/gue/blob/master/CHANGELOG.md

vgarvardt avatar Jun 08 '22 12:06 vgarvardt

I upgraded to the latest commit github.com/vgarvardt/gue/v4 v4.0.0-alpha.9.0.20220607211303-a7e770730350 and tested it with and without WithPoolHooksJobDone.

The issue is still present.

Would it be an option to remove panic recovery, or is it required to requeue the job?

metropolisenchanting avatar Jun 22 '22 00:06 metropolisenchanting

Yes, it is required to requeue the job. I would really appreciate if you could implement a test that will reproduce the behaviour so that I could fix it.

vgarvardt avatar Jun 22 '22 08:06 vgarvardt

Tried to reproduce the issue with the test at https://github.com/vgarvardt/gue/pull/68 but could not.

vgarvardt avatar Jun 22 '22 09:06 vgarvardt

I can't reproduce it either. I'll look further into it.

metropolisenchanting avatar Jun 22 '22 11:06 metropolisenchanting

Will close the issue as it is pretty outdated. In case you'll be able to reproduce empty panic stacktrace feel free to reopen the issue.

vgarvardt avatar Nov 17 '22 21:11 vgarvardt