New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Racy backend selection #2027

Closed
gquintard opened this Issue Aug 2, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@gquintard
Contributor

gquintard commented Aug 2, 2016

We tripped on a WRONG():

-- panic.show --
Last panic at: Sun, 31 Jul 2016 01:43:54 GMT
"Wrong turn at vdir.c:209:

thread = (cache-worker)
version = varnish-4.1.3 revision 5e3b6d2
ident =
Linux,2.6.32-573.18.1.el6.x86_64,x86_64,-junix,-sfile,-sfile,-sfile,-smalloc,-hcritbit,epoll

It looks like that while in vdir_pick_by_weight, somebody in vdir_pick_be changes vd->vbm under us.

Expected Behavior

Not panicking would be nice

Possible Solution

Switching vdir_pick_be lock acquisition to vdir_wrlock instead of vdir_rdlock.

Your Environment

EL6, varnish 4.1.3

@slimhazard slimhazard self-assigned this Aug 2, 2016

@slimhazard

This comment has been minimized.

Show comment
Hide comment
@slimhazard

slimhazard Aug 2, 2016

Contributor

As discussed in IRC, I will look into this.

Contributor

slimhazard commented Aug 2, 2016

As discussed in IRC, I will look into this.

@hermunn

This comment has been minimized.

Show comment
Hide comment
@hermunn

hermunn Sep 6, 2016

Contributor

Backport review: Fix backported as c3374b1

Contributor

hermunn commented Sep 6, 2016

Backport review: Fix backported as c3374b1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment