[MDEV-9195] Segmentation fault when using the embedded library Created: 2015-11-26 Updated: 2016-06-05 Resolved: 2016-01-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Embedded Server |
| Affects Version/s: | 10.1.9 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | markus makela | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Fedora release 22 (Twenty Two) |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
When testing MaxScale with the 10.1.9 embedded library and running the attached PHP script with the data.sql loaded in and after a while MaxScale gets a segmentation fault in mysql_init. I ran it under valgrind and I'm getting first an invalid read then an invalid write:
This does not occur with 10.0.22. From MaxScale's point of view, we've ruled out concurrent usage and closing of the THD, it always seems to be a different THD which causes the segfault. |
| Comments |
| Comment by Elena Stepanova [ 2015-12-26 ] |
|
markus makela, |
| Comment by markus makela [ 2015-12-27 ] |
|
Added a small test which mimics MaxScale's behavior but with it, I wasn't able to reproduce this problem. Due to this, I don't think it's a problem with the embedded server but somehow relates to how MaxScale uses it. I'll continue investigating if it's reproducible without MaxScale being involved. |
| Comment by Elena Stepanova [ 2016-01-25 ] |
|
markus makela, any luck? |
| Comment by markus makela [ 2016-01-25 ] |
|
So far I haven't been able to reproduce it without MaxScale so I'd say it's something related to how MaxScale uses it. I'd close this and once we've managed to reproduce it without MaxScale, we could open it again. |
| Comment by Yuval Hager [ 2016-06-02 ] |
|
@markus makela, Have you ever found a solution to this? Is this tracked somewhere within MXS? the issue linked here ( |
| Comment by markus makela [ 2016-06-05 ] |
|
I've actually made some progress and so far the fix to this is to disable the malloc callback function by calling set_malloc_size_cb(NULL) after mysql_library_init. elenst, I think this can be closed as Not a Bug since it is caused by wrong usage of the library (at least that's my conclusion when I tried to look at the code). |