Description
There is a recursive call, it seems to cause stack overflow.
I use a standalone example. Here's the log.
time="2024-01-25T13:28:53+08:00" level=info msg="[ServerDiscovery]: active server change from [] to [47.96.247.98:8080], groupId=test, namespace=48abf2b9-6914-47d1-a57d-e1bc29eefe7b, namespaceSource="
time="2024-01-25T13:28:53+08:00" level=info msg="SchedulerX discovery active server addr=47.96.247.98:8080"
time="2024-01-25T13:28:53+08:00" level=info msg="SchedulerX discovery active server addr=47.96.247.98:8080"
time="2024-01-25T13:28:53+08:00" level=info msg="Receive handshake msg, msg=commandType:ASSOCIATE handshakeInfo:{origin:{system:"server" hostname:"47.96.247.98" port:8080 protocol:"tcp"} uid:1815528092} "
time="2024-01-25T13:28:53+08:00" level=info msg="SchedulerX server connected, remoteAddr=47.96.247.98:8080, localAddr=192.168.1.34:52716"
time="2024-01-25T13:28:53+08:00" level=warning msg="[containerActor] receive unknown message, msg=&{}"
time="2024-01-25T13:28:53+08:00" level=warning msg="[atLeastOnceDeliveryRoutingActor] receive unknown message, msg=&{}"
time="2024-01-25T13:28:53+08:00" level=warning msg="[heartbeatActor] receive unknown message, msg=&{}"
2024/01/25 13:28:53 INFO [REMOTE] Starting remote with address address="127.0.0.1:52718"
2024/01/25 13:28:53 INFO [REMOTE] Started Activator
2024/01/25 13:28:53 INFO [REMOTE] Started EndpointManager
2024/01/25 13:28:53 INFO [REMOTE] Starting Proto.Actor server address="127.0.0.1:52718"
time="2024-01-25T13:28:53+08:00" level=info msg="Receive handshake msg, msg=commandType:ASSOCIATE handshakeInfo:{origin:{system:"server" hostname:"47.96.247.98" port:8080 protocol:"tcp"} uid:1815528092} "
time="2024-01-25T13:29:22+08:00" level=info msg="handleSubmitJobInstance, jobInstanceId=2877356816, req=job_id:11513734 job_instance_id:2877356816 schedule_time:1706160559895 data_time:1706160559895 job_type:"golang" execute_mode:"standalone" content:"{\"jobName\":\"HelloWorld\"}" user:"1953510689910538" xattrs:"{\"pageSize\":5,\"queueSize\":10,\"consumerSize\":5,\"dispatcherSize\":5,\"taskMaxAttempt\":0,\"taskAttemptInterval\":0,\"globalConsumerSize\":1000,\"taskDispatchMode\":\"push\"}" parameters:"test11111" workers:"17202
1192001_16472_33321@192.168.1.34:52717:52718" job_concurrency:1 region_id:1000 app_group_id:24996 instance_parameters:"" group_id:"test" time_type:4 time_expression:"25" max_attempt:0 attempt:0 job_name:"test" trigger_type:1"
time="2024-01-25T13:29:22+08:00" level=info msg="TimeScanThread started"
time="2024-01-25T13:29:22+08:00" level=info msg="Standalone taskMaster init worker succeed, workerAddr=nonhost, uniqueId=11513734_2877356816_1"
time="2024-01-25T13:29:22+08:00" level=info msg="Submit jobInstanceId=2877356816 succeed"
[Process] Start process my task: Hello world!
time="2024-01-25T13:29:23+08:00" level=info msg="cycleId: 11513734_2877356816_0 instanceStatus=3 cycle update status."
time="2024-01-25T13:29:23+08:00" level=warning msg="[atLeastOnceDeliveryRoutingActor] receive unknown message, msg=success:true delivery_id:0"
[Process] End process my task: Hello world!
time="2024-01-25T13:29:25+08:00" level=info msg="cycleId: 11513734_2877356816_0 instanceStatus=4 cycle update status."
time="2024-01-25T13:29:25+08:00" level=info msg="cycleId: 11513734_2877356816_0 cycle end."
time="2024-01-25T13:29:25+08:00" level=info msg="timeQueue add plan=&{jobInstanceId:2877356816 scheduleTimeStamp:1706160590947 handler:0xc0003b5300}"
time="2024-01-25T13:29:25+08:00" level=warning msg="[atLeastOnceDeliveryRoutingActor] receive unknown message, msg=success:true delivery_id:0"
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc022b25470 stack=[0xc022b24000, 0xc042b24000]
fatal error: stack overflow
runtime stack:
runtime.throw({0x135b3ca?, 0x200000008?})
D:/Program Files/go/go_1.21.5/src/runtime/panic.go:1077 +0x65 fp=0x19329ff7e8 sp=0x19329ff7b8 pc=0x784645
runtime.newstack()
D:/Program Files/go/go_1.21.5/src/runtime/stack.go:1107 +0x5fb fp=0x19329ff990 sp=0x19329ff7e8 pc=0x79ae9b
traceback: unexpected SPWRITE function runtime.morestack
runtime.morestack()
D:/Program Files/go/go_1.21.5/src/runtime/asm_amd64.s:593 +0x87 fp=0x19329ff998 sp=0x19329ff990 pc=0x7b3347
goroutine 70 [running]:
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:137 +0x37f fp=0xc022b25480 sp=0xc022b25478 pc=0x1178a9f
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b255e0 sp=0xc022b25480 pc=0x1178770
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b25740 sp=0xc022b255e0 pc=0x1178770
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b258a0 sp=0xc022b25740 pc=0x1178770
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b25a00 sp=0xc022b258a0 pc=0x1178770
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b25b60 sp=0xc022b25a00 pc=0x1178770
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b25cc0 sp=0xc022b25b60 pc=0x1178770
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b25e20 sp=0xc022b25cc0 pc=0x1178770
github.com/alibaba/schedulerx-worker-go/internal/master.(*secondJobUpdateInstanceStatusHandler).getJobInstanceProgress(0xc0003b5300)
D:/Program Files/go/gopath/pkg/mod/github.com/alibaba/schedulerx-worker-go@v0.0.2/internal/master/second_job_update_instance_status_handler.go:138 +0x50 fp=0xc022b25f80 sp=0xc022b25e20 pc=0x1178770