diff --git a/config/graceful_shutdown.go b/config/graceful_shutdown.go index bbc7e64a7ab3b2a80f02c84514d105670ab66d3a..dc715d5ed2778ed46ec49b08da1a2e6c96e3a84a 100644 --- a/config/graceful_shutdown.go +++ b/config/graceful_shutdown.go @@ -42,6 +42,7 @@ import ( * * So the signals SIGKILL, SIGSTOP, SIGHUP, SIGINT, SIGTERM, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGSTKFLT, SIGEMT, SIGSYS * should be processed. + * syscall.SIGEMT cannot be found in CI * It's seems that the Unix/Linux does not have the signal SIGSTKFLT. https://github.com/golang/go/issues/33381 * So this signal will be ignored. * @@ -53,7 +54,7 @@ func GracefulShutdownInit() { signal.Notify(signals, os.Interrupt, os.Kill, syscall.SIGKILL, syscall.SIGSTOP, syscall.SIGHUP, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGILL, syscall.SIGTRAP, - syscall.SIGABRT, syscall.SIGEMT, syscall.SIGSYS, + syscall.SIGABRT, syscall.SIGSYS, ) go func() { @@ -66,7 +67,7 @@ func GracefulShutdownInit() { switch sig { // those signals' original behavior is exit with dump ths stack, so we try to keep the behavior case syscall.SIGQUIT, syscall.SIGILL, syscall.SIGTRAP, - syscall.SIGABRT, syscall.SIGEMT, syscall.SIGSYS: + syscall.SIGABRT, syscall.SIGSYS: debug.WriteHeapDump(os.Stdout.Fd()) default: time.AfterFunc(totalTimeout(), func() { diff --git a/config/testdata/consumer_config.yml b/config/testdata/consumer_config.yml index 9fd50bb4d35a40d8532c9a644a86ad6834f8e89b..f44ea449fd16235050f6a7ba7823a87e24791780 100644 --- a/config/testdata/consumer_config.yml +++ b/config/testdata/consumer_config.yml @@ -49,6 +49,10 @@ references: "soa.com.ikurento.user.UserProvider" "forks": 5 +shutdown_conf: + timeout: 60s + step_timeout: 10s + protocol_conf: dubbo: reconnect_interval: 0 diff --git a/config/testdata/consumer_config_with_configcenter.yml b/config/testdata/consumer_config_with_configcenter.yml index 0550cc89741b6a490aaba9ff8906d7dda1b3ed49..ebe56fa93f9f5728aa365ee5b7a99b6bb5857a8e 100644 --- a/config/testdata/consumer_config_with_configcenter.yml +++ b/config/testdata/consumer_config_with_configcenter.yml @@ -17,6 +17,10 @@ references: - name: "GetUser" retries: "3" +shutdown_conf: + timeout: 60s + step_timeout: 10s + protocol_conf: dubbo: reconnect_interval: 0 diff --git a/config/testdata/consumer_config_withoutProtocol.yml b/config/testdata/consumer_config_withoutProtocol.yml index 5e57c7ddf6e82152e4f207b2d06df1443766717c..32bad8b91db3fac9c026fca36c5dc3b84f4c3fc9 100644 --- a/config/testdata/consumer_config_withoutProtocol.yml +++ b/config/testdata/consumer_config_withoutProtocol.yml @@ -48,6 +48,10 @@ references: "soa.com.ikurento.user.UserProvider" "forks": 5 +shutdown_conf: + timeout: 60s + step_timeout: 10s + protocol_conf: dubbo: reconnect_interval: 0 diff --git a/config/testdata/provider_config.yml b/config/testdata/provider_config.yml index 080feb7dcd1cccd06ae436b2854b2531177d23e3..7c46f9101aa9a6ecb88a92953dfcec28dda4e0ff 100644 --- a/config/testdata/provider_config.yml +++ b/config/testdata/provider_config.yml @@ -71,6 +71,10 @@ protocols: # ip: "127.0.0.1" # port: 20001 +shutdown_conf: + timeout: 60s + step_timeout: 10s + protocol_conf: dubbo: session_number: 700 diff --git a/config/testdata/provider_config_withoutProtocol.yml b/config/testdata/provider_config_withoutProtocol.yml index 2f65868d4948db9a8b99c500014ea1307569d86f..532d3005aa351820bd540b31e2721dc2a0b5c6ed 100644 --- a/config/testdata/provider_config_withoutProtocol.yml +++ b/config/testdata/provider_config_withoutProtocol.yml @@ -51,6 +51,10 @@ protocols: # ip: "127.0.0.1" # port: 20001 +shutdown_conf: + timeout: 60s + step_timeout: 10s + protocol_conf: dubbo: session_number: 700