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

QueryContext raises panic: send on closed channel #199

Open
Shamus03 opened this issue Aug 15, 2024 · 2 comments · May be fixed by #201
Open

QueryContext raises panic: send on closed channel #199

Shamus03 opened this issue Aug 15, 2024 · 2 comments · May be fixed by #201

Comments

@Shamus03
Copy link

Shamus03 commented Aug 15, 2024

After the recent commit to add support for QueryContext:
1293aff#diff-4f427d2b022907c552328e63f137561f6de92396d7a6e8f6c2ea1bcf0db52654R153

We are getting the following error:

Thursday, August 15th 2024 @ 3:41:50 pm	panic: send on closed channel
Thursday, August 15th 2024 @ 3:41:50 pm	goroutine 4794 [running]:
Thursday, August 15th 2024 @ 3:41:50 pm	github.com/alexbrainman/odbc.(*Conn).wrapQuery(0x1?, {0x99c900, 0xc0002a0150}, 0xc00031e320, {0xeb7c20?, 0x6fcc68?, 0xc0004c37d0?}, 0x6f20e5?, 0xc0007aa570?)
Thursday, August 15th 2024 @ 3:41:50 pm	/root/go/src/github.com/alexbrainman/odbc/conn.go:153 +0x145
Thursday, August 15th 2024 @ 3:41:50 pm	created by github.com/alexbrainman/odbc.(*Conn).QueryContext in goroutine 4792
Thursday, August 15th 2024 @ 3:41:50 pm	/root/go/src/github.com/alexbrainman/odbc/conn.go:104 +0x389

It is inside this goroutine:
1293aff#diff-4f427d2b022907c552328e63f137561f6de92396d7a6e8f6c2ea1bcf0db52654R104

And it seems to kill the connection or permanently damage/deadlock it.

For context: we are using unixodbc to connect to an IBM DB2 database running on an AS400. Hopefully that is helpful.

Working on steps to reproduce, but I haven't been able to nail it yet. We have about 20-30 service instances using this version of the package, and they die with this error slowly over time.

@alexbrainman
Copy link
Owner

@Shamus03 thanks for reporting the problem.

You can always go to previous version, like

go get github.com/alexbrainman/odbc@1421b829acc

I can even add git tags with version numbers, if it helps you any.

I don't have time to debug your reported panic. But I will accept fixes from anyone including @popeliv .

Alex

@Shamus03
Copy link
Author

Thanks. We have already reverted to a previous version for now.

popeliv pushed a commit to popeliv/odbc that referenced this issue Sep 4, 2024
@popeliv popeliv linked a pull request Sep 4, 2024 that will close this issue
popeliv pushed a commit to popeliv/odbc that referenced this issue Sep 4, 2024
popeliv pushed a commit to popeliv/odbc that referenced this issue Sep 4, 2024
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

Successfully merging a pull request may close this issue.

2 participants