{"action":"created","issue":{"url":"https://api.github.com/repos/varnish/libvmod-var/issues/12","labels_url":"https://api.github.com/repos/varnish/libvmod-var/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/varnish/libvmod-var/issues/12/comments","events_url":"https://api.github.com/repos/varnish/libvmod-var/issues/12/events","html_url":"https://github.com/varnish/libvmod-var/issues/12","id":128596330,"number":12,"title":"Crashes on pipelined requests","user":{"login":"daghf","id":1662211,"avatar_url":"https://avatars.githubusercontent.com/u/1662211?v=3","gravatar_id":"","url":"https://api.github.com/users/daghf","html_url":"https://github.com/daghf","followers_url":"https://api.github.com/users/daghf/followers","following_url":"https://api.github.com/users/daghf/following{/other_user}","gists_url":"https://api.github.com/users/daghf/gists{/gist_id}","starred_url":"https://api.github.com/users/daghf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daghf/subscriptions","organizations_url":"https://api.github.com/users/daghf/orgs","repos_url":"https://api.github.com/users/daghf/repos","events_url":"https://api.github.com/users/daghf/events{/privacy}","received_events_url":"https://api.github.com/users/daghf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-25T17:40:31Z","updated_at":"2016-01-29T14:21:29Z","closed_at":null,"body":"``get_vh`` uses the vxid of the session instead of the request, and thus we attempt to use the state from a now cleared workspace on the subsequent request.\r\n\r\nA workaround is to issue a ``var.clear()`` prior to any ``var.set()``/``var.get()`` invocation\r\n\r\nRelated: See @rezan's comment in #10 \r\n\r\nThis bug only applies to branch 4.0"},"comment":{"url":"https://api.github.com/repos/varnish/libvmod-var/issues/comments/176779235","html_url":"https://github.com/varnish/libvmod-var/issues/12#issuecomment-176779235","issue_url":"https://api.github.com/repos/varnish/libvmod-var/issues/12","id":176779235,"user":{"login":"carlosabalde","id":342614,"avatar_url":"https://avatars.githubusercontent.com/u/342614?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosabalde","html_url":"https://github.com/carlosabalde","followers_url":"https://api.github.com/users/carlosabalde/followers","following_url":"https://api.github.com/users/carlosabalde/following{/other_user}","gists_url":"https://api.github.com/users/carlosabalde/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosabalde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosabalde/subscriptions","organizations_url":"https://api.github.com/users/carlosabalde/orgs","repos_url":"https://api.github.com/users/carlosabalde/repos","events_url":"https://api.github.com/users/carlosabalde/events{/privacy}","received_events_url":"https://api.github.com/users/carlosabalde/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T14:21:29Z","updated_at":"2016-01-29T14:21:29Z","body":"Storing all possible values in the var storage as headers prior to a restart and then restore them is a possible workaround, but it's ugly. :hankey: \r\n\r\nMy suggestion is to keep the current implementation as the default behavior. It breaks the semantics of the VMOD but at least avoid crashes and it's probably ok for most users. We could add a configuration switch (e.g. ``var.enable_old_behaviour()``) to select the previous behavior during ``vcl_init``. This workaround in not going to be required in 4.1 and it would allow to have the right behavior in 4.0 (and it would require executing ``var.clear()`` on ``vcl_recv`` when ``req.restarts == 0`` to avoid crashes).\r\n"}}