Skip to content
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

Velo Error/Crash while using hunt_delete() #3970

Open
hendrkss opened this issue Dec 13, 2024 · 2 comments
Open

Velo Error/Crash while using hunt_delete() #3970

hendrkss opened this issue Dec 13, 2024 · 2 comments

Comments

@hendrkss
Copy link
Contributor

hendrkss commented Dec 13, 2024

Hello,

I am deleting hunts with the hunt_delete() plugin. I am sending the command to the API and figured out if I cancel/disrupt the job, the Velociraptor server is crashing with the following error.
The hunt_delete() is used within a foreach query which is looping over a list of hunts.

panic: send on closed channel
goroutine 232458 [running]:
www.velocidex.com/golang/velociraptor/api.(*logWriter).Write(0xc0473a1b48, {0xc02614af60, 0x5f, 0x437f85?})
        /builds/linux-packages/pkg-velociraptor-server/upstream-src/api/query.go:216 +0x1d4
log.(*Logger).output(0xc0409869f0, 0x0, 0x2, 0xc001753c78)
        /root/go/src/log/log.go:245 +0x45a
log.(*Logger).Print(...)
        /root/go/src/log/log.go:260
www.velocidex.com/golang/vfilter/scope.(*protocolDispatcher).Log(0xc02fcdfe10?, {0x24b36ce, 0x13}, {0xc04690e660, 0x2, 0x2})
        /root/go/pkg/mod/www.velocidex.com/golang/vfilter@v0.0.0-20241009150353-76c3a28b1767/scope/dispatcher.go:258 +0x168
www.velocidex.com/golang/vfilter/scope.(*Scope).Log(0xc002b9bf30?, {0x24b36ce?, 0x3dfb0a0?}, {0xc04690e660?, 0xc04806da40?, 0xc000a34000?})
        /root/go/pkg/mod/www.velocidex.com/golang/vfilter@v0.0.0-20241009150353-76c3a28b1767/scope/scope.go:433 +0x25
www.velocidex.com/golang/velociraptor/vql/server/hunts.DeleteHuntPlugin.Call.func1()
        /builds/linux-packages/pkg-velociraptor-server/upstream-src/vql/server/hunts/delete.go:103 +0xa96
created by www.velocidex.com/golang/velociraptor/vql/server/hunts.DeleteHuntPlugin.Call in goroutine 232457
        /builds/linux-packages/pkg-velociraptor-server/upstream-src/vql/server/hunts/delete.go:29 +0xc5
systemd[1]: velociraptor_master.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
@scudette
Copy link
Contributor

Thanks for reporting this! I looked into it but was not able to replicate a crash. I did fix some of the channel management a bit in #3972 - can you plase see if it fixes the issue using the latest CI build?

@hendrkss
Copy link
Contributor Author

Hi,
I tested the fix - unfortunately the problem still exist. I am trying to get some more information about the issue and will come back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants