Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19508

Issue with: #define SI_KERNEL in include/my_pthread.h

Details

    Description

      Compilation error:

      mariadb-10.4.3/sql/mysqld.cc:3272:36: error: 'SI_KERNEL' was not declared in this scope
             if (!abort_loop && origin != SI_KERNEL)
      

      Attachments

        Issue Links

          Activity

            robertbindar Robert Bindar added a comment -

            I reviewed svoj's patch a while ago and IIRC the only concern I had at that time was whether or not `setsid()` would affect the distribution of signals, and potentially break parts of the server or multi-process setups such as Galera or Debian scripts or even external unknown-to-us scripts that rely on signals happening in a particular way.

            Svoj argued that windows and embedded are not affected and that systemd/launchd should work.

            The question is how do we test the patch to make sure at least scripts we can control don't break?
            Elena suggested that testing this is "as whitebox as it gets" and that, in terms of external scripts we don't control, we should also think if we want to guarantee any specific behavior upon sending any specific signals.

            Can danblack or serg help with any suggestions on this?

            robertbindar Robert Bindar added a comment - I reviewed svoj's patch a while ago and IIRC the only concern I had at that time was whether or not `setsid()` would affect the distribution of signals, and potentially break parts of the server or multi-process setups such as Galera or Debian scripts or even external unknown-to-us scripts that rely on signals happening in a particular way. Svoj argued that windows and embedded are not affected and that systemd/launchd should work. The question is how do we test the patch to make sure at least scripts we can control don't break? Elena suggested that testing this is "as whitebox as it gets" and that, in terms of external scripts we don't control, we should also think if we want to guarantee any specific behavior upon sending any specific signals. Can danblack or serg help with any suggestions on this?
            danblack Daniel Black added a comment -

            serg's test plan from comment 2019-08-29

            Test 2 from 1st paragraph of original commit 07e9b1389857, run mysqld in terminal in foreground. gdb attach from different terminal. Kill terminal. Trace generated SIGHUP and if it results in a reload. Add setsid patch. Observe behaviour.

            danblack Daniel Black added a comment - serg 's test plan from comment 2019-08-29 Test 2 from 1st paragraph of original commit 07e9b1389857, run mysqld in terminal in foreground. gdb attach from different terminal. Kill terminal. Trace generated SIGHUP and if it results in a reload. Add setsid patch. Observe behaviour.
            robertbindar Robert Bindar added a comment -

            Hi danblack, sorry for the delay. Sure, but manual test will only conclude that SIGHUP is properly handled and that Sergei's bug doesn't reproduce anymore. But I don't see how it addresses the concerns Svoj, Elena and Robert pointed out, setsid might have side effects in some weird corner cases. It is also true that I don't have a solution on how to test this myself properly unless some more experienced dev helps me out. So if serg is ok with taking the risk to manually test this like he suggested, push the patch and address (if any) bugs that are discovered at some later point, feel free to push.

            robertbindar Robert Bindar added a comment - Hi danblack , sorry for the delay. Sure, but manual test will only conclude that SIGHUP is properly handled and that Sergei's bug doesn't reproduce anymore. But I don't see how it addresses the concerns Svoj, Elena and Robert pointed out, setsid might have side effects in some weird corner cases. It is also true that I don't have a solution on how to test this myself properly unless some more experienced dev helps me out. So if serg is ok with taking the risk to manually test this like he suggested, push the patch and address (if any) bugs that are discovered at some later point, feel free to push.
            danblack Daniel Black added a comment -

            By Elena's quote above, suggests that it's up to us to define if there is expected signal behaviour. By your concerns you seem to think we should conform to something regarding signal handling. If these two are compatible correct statements its up to you to examine what behaviour existing scripts, just a minimum of galera and debian packaging expect. Given these are bash scripts the signal handling is usually fairly explicit. Come up with an expected signal behaviour.

            "debug_gdb" mode, I assume this is a `mtr --gdb`, have you tested this? --bootstrap AFAIK doesn't depend on any signalling or session information, just that stdin contains the bootstrap information.

            danblack Daniel Black added a comment - By Elena's quote above, suggests that it's up to us to define if there is expected signal behaviour. By your concerns you seem to think we should conform to something regarding signal handling. If these two are compatible correct statements its up to you to examine what behaviour existing scripts, just a minimum of galera and debian packaging expect. Given these are bash scripts the signal handling is usually fairly explicit. Come up with an expected signal behaviour. "debug_gdb" mode, I assume this is a `mtr --gdb`, have you tested this? --bootstrap AFAIK doesn't depend on any signalling or session information, just that stdin contains the bootstrap information.
            danblack Daniel Black added a comment - A work around commit was finally added in 10.4 - https://github.com/MariaDB/server/commit/f69c1c9dcb815d7597ec2035470a81ac3b6c9380

            People

              danblack Daniel Black
              anel Anel Husakovic
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.