[MDEV-12760] CONNECT Engine crashes with signal 7 with JSON table type Created: 2017-05-09 Updated: 2020-08-25 Resolved: 2017-06-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.1.20 |
| Fix Version/s: | 10.1.25, 10.0.32, 10.2.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Olivier Bertrand |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | connect-engine, crash, json | ||
| Description |
|
A user using the CONNECT engine with JSON table types is seeing the following crash:
|
| Comments |
| Comment by Olivier Bertrand [ 2017-05-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Is this the same problem than the one reported in If not, I cannot do anything without some basic informations: The scenario causing the crash. Table type definition, command excuted and, if possible, the data file(s) accessed by the table. Thanks. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2017-05-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi bertrandop, I emailed you that information earlier this week. Please let me know if you need any other information. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2017-05-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No, this problem is separate from | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2017-05-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello Geoff, With the table definitions and the json files I was able to reproduce the problem. It is a memory problem. For the largest file app_change_log.json the default size of the connect work area (64M) is not enough. Increasing it by:
was enough to suppress the problem. Note that on my machine I just got an error message. No crash by signal 7. I don't know why but I suspect that your version of connect was still using longjmp in case of error. There has been something weird with longjmp in this specific function like crashing when setting them. This is why I replaced all of them by try/catch. Therefore, what should be done next is:
I hope this helps, Olivier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2017-05-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi bertrandop,
The user saw a very similar crash in MariaDB 10.1.23, which is the latest MariaDB 10.1. release:
Is this the same crash or a slightly different case? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2017-05-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MariaDB 10.1.23 did not include the latest CONNECT version. I hope 10.1.24 will do it. Was it possible to avoid the crash by increasing memory? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2017-05-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ah, it's good to know that that fix might be in the next release. I'm still trying to find out if increasing connect_work_size prevents the crash. They haven't answered that question yet. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2017-05-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The user said that they have converted all JSON tables in the database to use pretty=0, and they have been setting connect_work_size, but they are still seeing the above signal 11 crash in MariaDB 10.1.23. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2017-05-31 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Indeed, this crash is different and probably not related to JSON at all. The described first one was a signal 7 occuring when parsing a JSON file and most probably a memory problem (bus error or bad address). The new one is a signal 11 (segmentation fault) occuring in PlgGetUser called by Info. This is a very small function using its pointer argument g to return another pointer. In theory, it could not fail except if given a NULL or wrong pointer g. Until now, this never happen on any machine but who knows.. Murphy's laws are there to tell us the worst is always possible. Therefore I shall fix that and it will be available in future releases. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2017-05-31 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ah, I see. Thanks for fixing it! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Olivier Bertrand [ 2017-06-01 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I hope this will fix it. However, not being able to reproduce it, I cannot be sure. This will hopefully happen in MariaDB next versions from do day. |