rclcpp icon indicating copy to clipboard operation
rclcpp copied to clipboard

Add support for timers on reset callback

Open mauropasse opened this issue 2 years ago • 3 comments

Based on https://github.com/ros2/rcl/pull/995, this PR adds support for the "on reset" callback for timers.

The issue which originated this need, is to wake up an events based executor when a timer is reset (which could also be caused by a time jump).

@alsora

mauropasse avatar Aug 02 '22 14:08 mauropasse

CI including rcl PR

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

alsora avatar Aug 02 '22 14:08 alsora

Any updates here?

Flova avatar Oct 17 '22 22:10 Flova

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

alsora avatar Oct 27 '22 11:10 alsora

The CI fails because https://github.com/ros2/rcl/pull/995 is needed.

Flova avatar Nov 24 '22 18:11 Flova

The main issue here is the Windows CI that is failing. However, I see that the same failure is also present in a completely unrelated PR https://github.com/ros2/rclcpp/pull/1982

alsora avatar Nov 24 '22 19:11 alsora

When I looked at the Win CI output it seemed that something related to the parameters interface in tf2_ros was failing. This seems to be kind of unrelated. Can we maybe try to tun the CI against some documentation PR to see if this is an issue with the current master of tf2?

Flova avatar Nov 24 '22 19:11 Flova

The main issue here is the Windows CI that is failing. However, I see that the same failure is also present in a completely unrelated PR #1982

I think that was fixed in https://github.com/ros2/rclcpp/pull/2018, the error is not happening in nightlies anymore. It would be nice to rebase and rerun to confirm.

ivanpauno avatar Nov 28 '22 17:11 ivanpauno

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

fujitatomoya avatar Nov 28 '22 18:11 fujitatomoya

There seems to be another Windows build issue:

19:58:26 Running handlers complete
19:58:26 [2022-11-28T18:58:25+00:00] ERROR: Exception handlers complete
19:58:26 Cinc Client failed. 65 resources updated in 12 minutes 01 seconds
19:58:26 [2022-11-28T18:58:26+00:00] FATAL: LoadError: cannot load such file -- inspec/utils/deprecation/global_method
19:58:26 The command 'cmd /S /C c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -Eros2ci -j C:\TEMP\install_ros2_%ROS_DISTRO%.json' returned a non-zero code: 1

Flova avatar Nov 28 '22 21:11 Flova

Also seems unrelated imo...

Flova avatar Nov 28 '22 21:11 Flova

Seems like a random CI network issue, running it again:

  • Windows Build Status

ivanpauno avatar Nov 29 '22 13:11 ivanpauno

Seems like a random CI network issue, running it again:

The Windows CI still seems to have Network issues:

Relevant Jenkins Traceback
17:31:39 FATAL: command execution failed
17:33:44 java.nio.channels.ClosedChannelException
17:33:44 	at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
17:33:44 	at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:179)
17:33:44 	at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:790)
17:33:44 	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
17:33:44 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
17:33:44 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
17:33:44 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
17:33:44 	at java.lang.Thread.run(Thread.java:748)
17:33:44 Caused: java.io.IOException: Backing channel 'JNLP4-connect connection from ip-10-0-1-137.ec2.internal/10.0.1.137:49694' is disconnected.
17:33:44 	at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:216)
17:33:44 	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:286)
17:33:44 	at com.sun.proxy.$Proxy76.isAlive(Unknown Source)
17:33:44 	at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1213)
17:33:44 	at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1205)
17:33:44 	at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:194)
17:33:44 	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:144)
17:33:44 	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:91)
17:33:44 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
17:33:44 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
17:33:44 	at hudson.model.Build$BuildExecution.build(Build.java:198)
17:33:44 	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
17:33:44 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
17:33:44 	at hudson.model.Run.execute(Run.java:1888)
17:33:44 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
17:33:44 	at hudson.model.ResourceController.execute(ResourceController.java:99)
17:33:44 	at hudson.model.Executor.run(Executor.java:432)
17:33:44 FATAL: Unable to delete script file C:\Windows\TEMP\jenkins469429339840863473.bat
17:33:44 java.nio.channels.ClosedChannelException
17:33:44 	at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
17:33:44 	at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:179)
17:33:44 	at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:790)
17:33:44 	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
17:33:44 	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
17:33:44 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
17:33:44 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
17:33:44 	at java.lang.Thread.run(Thread.java:748)
17:33:44 Caused: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@30159803:JNLP4-connect connection from ip-10-0-1-137.ec2.internal/10.0.1.137:49694": Remote call on JNLP4-connect connection from ip-10-0-1-137.ec2.internal/10.0.1.137:49694 failed. The channel is closing down or has closed down
17:33:44 	at hudson.remoting.Channel.call(Channel.java:994)
17:33:44 	at hudson.FilePath.act(FilePath.java:1165)
17:33:44 	at hudson.FilePath.act(FilePath.java:1154)
17:33:44 	at hudson.FilePath.delete(FilePath.java:1681)
17:33:44 	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:162)
17:33:44 	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:91)
17:33:44 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
17:33:44 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
17:33:44 	at hudson.model.Build$BuildExecution.build(Build.java:198)
17:33:44 	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
17:33:44 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
17:33:44 	at hudson.model.Run.execute(Run.java:1888)
17:33:44 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
17:33:44 	at hudson.model.ResourceController.execute(ResourceController.java:99)
17:33:44 	at hudson.model.Executor.run(Executor.java:432)
17:33:44 Build step 'Execute Windows batch command' marked build as failure
17:33:44 ERROR: Step ‘Record compiler warnings and static analysis results’ aborted due to exception: 
17:33:44 java.io.IOException: No workspace found for ci_windows #18344
17:33:44 	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:577)
17:33:44 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
17:33:44 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
17:33:44 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)
17:33:44 	at hudson.model.Build$BuildExecution.post2(Build.java:178)
17:33:44 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)
17:33:44 	at hudson.model.Run.execute(Run.java:1913)
17:33:44 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
17:33:44 	at hudson.model.ResourceController.execute(ResourceController.java:99)
17:33:44 	at hudson.model.Executor.run(Executor.java:432)
17:33:44 ERROR: Step ‘Publish Cobertura Coverage Report’ failed: no workspace for ci_windows #18344
17:33:44 ERROR: Step ‘Publish xUnit test result report’ failed: no workspace for ci_windows #18344
17:33:44 Finished: FAILURE

Flova avatar Nov 29 '22 16:11 Flova

The Windows CI still seems to have Network issues:

Yes, I will run it again in some hours, after checking with the infra team if there are any windows CI issues.

ivanpauno avatar Nov 29 '22 16:11 ivanpauno

  • Windows Build Status

ivanpauno avatar Nov 30 '22 13:11 ivanpauno

it seems we are still having problems with the windows agents ...

ivanpauno avatar Nov 30 '22 14:11 ivanpauno

Thanks for everyone's patience on these infrastructure issues. We use low-bid spot instances in order to keep costs down but these cause us trouble every year around the shopping season. The ROS infra team is currently working to add some on-demand capacity to allow jobs to continue.

In order to run that transition I am unfortunately going to abort Build Status but I will requeue it again and link it here once the transition is complete.

nuclearsandwich avatar Nov 30 '22 15:11 nuclearsandwich

Alright. Because Build Status is running on a relatively fresh agent, there may still be issues related to other reliability issues caused by the holiday activity but this agent should at least stick around.

nuclearsandwich avatar Nov 30 '22 15:11 nuclearsandwich

The run still fails :/, but it at least failed relatively early with an infrastructure related error.

Flova avatar Nov 30 '22 17:11 Flova

Build Status is the same job and running now.

clalancette avatar Nov 30 '22 18:11 clalancette

CI

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

alsora avatar Dec 06 '22 16:12 alsora

CI after fixing rcl PR

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

alsora avatar Dec 07 '22 11:12 alsora

CI

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

alsora avatar Dec 07 '22 19:12 alsora

Finally 🎉

Flova avatar Dec 08 '22 09:12 Flova

@fujitatomoya @ivanpauno @hidmic it looks like all comments have been addressed; can you have a final look before we merge this PR and its related rcl PR?

alsora avatar Dec 08 '22 17:12 alsora

I am good to go with this, but requesting another review from maintainers. CC: @ivanpauno @hidmic @wjwwood

be advised that this must be merged with https://github.com/ros2/rcl/pull/995

fujitatomoya avatar Dec 08 '22 18:12 fujitatomoya

Rebased after https://github.com/ros2/rclcpp/pull/2059 got merged

mauropasse avatar Dec 16 '22 14:12 mauropasse

Ping; it looks like the rcl PR (https://github.com/ros2/rcl/pull/995) has been approved, can we get an additional review here?

alsora avatar Jan 22 '23 16:01 alsora

Hi, any update on this?

alsora avatar Feb 10 '23 11:02 alsora