-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
[Tests] Avoid memory leak bug with msodbcsql #12615
Conversation
Deadlock? why? |
ext/odbc/tests/odbc_connect_001.phpt
Outdated
@@ -16,35 +16,40 @@ include 'skipif.inc'; | |||
include 'config.inc'; | |||
$dsn = str_replace(";uid={$user};pwd={$pass}", '', $dsn); | |||
|
|||
/* | |||
* A bug in msodbcsql causes a memory leak when reconnecting after closing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xfail with link to a bug tracker might be better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wouldn't comment all the close statements etc. We have xleak to handle this specifically. I'd advise to keep the test running when not under ASAN and use xleak + a link to the bugtracker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nielsdos @mvorisek
Thank you.
This memory leak is not detected in normal debug mode and requires the following option:
php-src/.github/workflows/nightly.yml
Line 352 in 4022e28
CFLAGS='-fsanitize=undefined,address -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC' |
Will XLEAK still work in this case? In my Local environment, the test was treated as Failed even if I specified XLEAK.
812759f
to
408c972
Compare
A completely unrelated test is failing. Time-wise, it seems like it's a time zone issue, but I haven't looked into it in detail yet. |
408c972
to
897af32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Have you reported this to upstream yet? If not, might be worth doing so.
I'm just wondering a bit whether we should do some msodbc-specific cleanup when reconnecting, as I'm surprised by this leak bug...
Thank you! I'm trying to find place to report the issue to, so I haven't report it yet. I will report as soon as I find it. This bug surprises me too. It may be a good idea to do a workaround, because it may not be fixed right away even if I report. |
I don't know if this is the right place to report it, I posted it on the forum. I also posted it here. |
Alright, thanks. Hopefully we'll hear something soon. |
@iluuu1994 (Just changing it to 18 is not enough, you need to add a little bit to the DSN.) I'm trying to change the driver to 18 in GitHub Actions, but I don't know where the 17 driver is being prepared in the first place. If you know anything, please let me know. |
Apparently, it is included in the ubuntu image in github actions from the beginning. And since msodbc18 is not yet compatible with ubuntu22.04, it may not be possible to remove XLEAK for a while. |
Please see #12306 (comment)