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

Monetdb Python UDF crashes because of null aggr_group_arr #7138

Closed
tle211212 opened this issue Jun 4, 2021 · 3 comments
Closed

Monetdb Python UDF crashes because of null aggr_group_arr #7138

tle211212 opened this issue Jun 4, 2021 · 3 comments
Labels
bug
Milestone

Comments

@tle211212
Copy link

@tle211212 tle211212 commented Jun 4, 2021

Hi MonetDB dev,

I encounter this MonetDB crash when I try out the Python UDF.

Test data:
sql>select * from integers;
+------+
| i |
+======+
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
+------+

sql> select python_sum(i) from integers where i = 1 group by i; ==> segfault

python_sum is just a simple PYTHON_MAP function: return numpy.sum(v);

When I rebuild MonetDB with debuginfo, this is where the code fails.
pyapi3.c
for (element_it = 0; element_it < elements; element_it++) {
group_counts[aggr_group_arr[element_it]]++; ==> aggr_group_arr is null
}

I hope you can fix it soon. Thank you.

@PedroTadim
Copy link
Contributor

@PedroTadim PedroTadim commented Jun 4, 2021

I already spotted the issue. The void BAT case is missing there.

@tle211212
Copy link
Author

@tle211212 tle211212 commented Jun 4, 2021

Thank you. I will pull the fix and test it next week.

@PedroTadim PedroTadim added the bug label Jun 7, 2021
@PedroTadim PedroTadim added this to the NEXTRELEASE milestone Jun 7, 2021
@PedroTadim
Copy link
Contributor

@PedroTadim PedroTadim commented Jun 7, 2021

I am going to close it for now. If you still find any issue, please re-open. Thanks for the report!

@sjoerdmullender sjoerdmullender removed this from the NEXTRELEASE milestone Aug 9, 2021
@sjoerdmullender sjoerdmullender added this to the Jul2021 milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

3 participants