[MDEV-9282] Debian: the Lintian complains about "shlib-calls-exit" in ha_innodb.so Created: 2015-12-14 Updated: 2018-01-29 Resolved: 2016-12-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.0 |
| Fix Version/s: | 10.1.21 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | innodb, xtradb | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
This is a split from Lintian reports: http://labs.seravo.fi/~otto/mariadb-repo/mariadb-10.0-sid-amd64/lintian-0f7cb30.log and https://lintian.debian.org/tags/shlib-calls-exit.html
nm ./storage/innobase/ha_innodb.so|grep exit
|
| Comments |
| Comment by Marko Mäkelä [ 2016-12-01 ] | ||||||||||||||||||||||||||||
|
In MariaDB 10.1, InnoDB calls exit() in quite a few places:
This is probably what it should do instead:
It is rather useless to call exit(), because it would not leave a core dump behind. I did some exit() removal in the MySQL 5.7 startup code, but most notably, InnoDB I/O threads will easily call exit() when encountering bad files. This causes occasional debug assertions in other threads, and some workarounds have been added to make such crashes less likely. In MariaDB 10.2 (and MySQL 5.7) the only exit() call from InnoDB is in the function srv_fatal_error(), which is called from os_file_handle_error_cond_exit() and innobase_start_or_create_for_mysql(). The latter call could be removed rather easily, but the calls from I/O threads would require considerably more effort. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2016-12-01 ] | ||||||||||||||||||||||||||||
|
marko, would you like to take over this bug? I think it doesn't make much sense to fix this in 10.1, since we're attempting to push 10.2 to debian now. | ||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2016-12-01 ] | ||||||||||||||||||||||||||||
|
Taking this bug. I think that at startup, we can properly return the error to the caller instead of calling exit(). | ||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2016-12-28 ] | ||||||||||||||||||||||||||||
|
ok to push. | ||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2016-12-28 ] | ||||||||||||||||||||||||||||
|
I successfully tested my patch with the following in the build directory:
The first commands did not generate any output, and the tests passed. |