OpenVPN / OpenVPN/openvpn

dco counter update at multi_close_instance() needs work

Open
#792 1 comment 0 reactions 1 assignee View on GitHub

@ordex is already working on this.

Since Jul 25, 2025.

DCO enhancement
Dominant language
C
Stars
14.6k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

So we have this in the log:

2025-07-18 12:12:02 us=277382 cron2-freebsd-tc-amd64/udp4:193.149.48.172:53644 peer-id=1 SIGTERM[soft,delayed-exit] received, client-instance exiting
2025-07-18 12:12:02 us=277467 MULTI: multi_close_instance called
2025-07-18 12:12:02 us=277551 GERT: multi_close_instance, closing peer_id=1   (my doing)
2025-07-18 12:12:02 us=277677 dco_get_peer_stats_multi
2025-07-18 12:12:02 us=277990 dco_parse_peer_multi: parsing message...
2025-07-18 12:12:02 us=278083 dco_parse_peer_multi: cannot store DCO stats for peer 1
2025-07-18 12:12:02 us=278204 register signal: SIGTERM (close_context)
2025-07-18 12:12:02 us=278322 dco_del_peer: peer-id 1

which I read as "when we close an instance, we want to get a final counter value, write to stats file and everything, and then forget about everything" - but it seems the order of things is not right, and when we actually reach dco_get_peer_stats_multi(), the "peer-id=1" instance has already been destroyed - so the whole excercise is not very useful.

Can we fix that?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.