Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

desktop/transaction: log transaction commit attempts #5846

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xyene
Copy link
Member

@Xyene Xyene commented Nov 30, 2020

This information is helpful when debugging transaction timeout issues.

Some examples:

  • successful multi-instruction transaction
00:01:37.624 [sway/desktop/transaction.c:428] Transaction 0x55a1f581e5e0 committing with 9 instructions
00:01:37.624 [sway/desktop/transaction.c:449] Transaction 0x55a1f581e5e0[1]: configure view 0x55a1f58621c0 to 1257x1357+2091+586, serial 689
00:01:37.624 [sway/desktop/transaction.c:449] Transaction 0x55a1f581e5e0[2]: configure view 0x55a1f55b5aa0 to 1257x1357+1456+597, serial 690
00:01:37.624 [sway/desktop/transaction.c:449] Transaction 0x55a1f581e5e0[3]: configure view 0x55a1f58e63b0 to 1257x1357+1456+597, serial 691
00:01:37.624 [sway/desktop/transaction.c:449] Transaction 0x55a1f581e5e0[4]: configure view 0x55a1f5823620 to 1257x1357+1456+597, serial 692
00:01:37.624 [sway/desktop/transaction.c:449] Transaction 0x55a1f581e5e0[5]: configure view 0x55a1f5895740 to 1257x1357+1456+597, serial 693
00:01:37.624 [sway/desktop/transaction.c:449] Transaction 0x55a1f581e5e0[7]: configure view 0x55a1f59033d0 to 1257x1357+2727+597, serial 694
00:01:37.625 [sway/desktop/transaction.c:530] Transaction 0x55a1f581e5e0: view 0x55a1f59033d0 acked serial 694
00:01:37.625 [sway/desktop/transaction.c:530] Transaction 0x55a1f581e5e0: view 0x55a1f55b5aa0 acked serial 690
00:01:37.678 [sway/desktop/transaction.c:530] Transaction 0x55a1f581e5e0: view 0x55a1f5823620 acked serial 692
00:01:37.692 [sway/desktop/transaction.c:530] Transaction 0x55a1f581e5e0: view 0x55a1f5895740 acked serial 693
00:01:37.715 [sway/desktop/transaction.c:530] Transaction 0x55a1f581e5e0: view 0x55a1f58621c0 acked serial 689
00:01:37.719 [sway/desktop/transaction.c:530] Transaction 0x55a1f581e5e0: view 0x55a1f58e63b0 acked serial 691
00:01:37.719 [sway/desktop/transaction.c:514] Transaction 0x55a1f581e5e0 is ready
  • transaction from a JetBrains IDE timing out
00:01:53.181 [sway/desktop/transaction.c:428] Transaction 0x55fac9d04730 committing with 1 instructions
00:01:53.181 [sway/desktop/transaction.c:449] Transaction 0x55fac9d04730[0]: configure view 0x55fac9cf49f0 to 974x1114+2233+708, serial 0
00:01:53.201 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 976x1114+2234+708, was expecting 974x1114+2233+708
00:01:53.220 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 924x1114+2258+708, was expecting 974x1114+2233+708
00:01:53.238 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 884x1114+2274+708, was expecting 974x1114+2233+708
00:01:53.255 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 884x1114+2293+708, was expecting 974x1114+2233+708
00:01:53.267 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 850x1114+2306+708, was expecting 974x1114+2233+708
00:01:53.286 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 825x1114+2307+708, was expecting 974x1114+2233+708
00:01:53.293 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 825x1114+2307+708, was expecting 974x1114+2233+708
00:01:53.349 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 814x1114+2313+708, was expecting 974x1114+2233+708
00:01:53.366 [sway/desktop/transaction.c:559] Transaction 0x55fac9d04730: view 0x55fac9cf49f0 acked geometry 814x1114+2316+708, was expecting 974x1114+2233+708
00:01:53.389 [sway/desktop/transaction.c:389] Transaction 0x55fac9d04730 timed out (1 waiting)

(this is the Sway bug from #5745)

@Xyene Xyene requested a review from emersion November 30, 2020 02:37
@Xyene Xyene force-pushed the log-configure-attempts branch 4 times, most recently from 6ad96bf to 5538a07 Compare November 30, 2020 03:01
This information is helpful when debugging transaction timeout issues.
@Xyene Xyene force-pushed the log-configure-attempts branch from 5538a07 to 69aee89 Compare November 30, 2020 03:02
@emersion
Copy link
Member

Does this display a message on each wl_surface.commit? We may want to consider adding a debug flag to enable all of these messages.

@rpigott
Copy link
Member

rpigott commented Dec 3, 2020

Does this display a message on each wl_surface.commit? We may want to consider adding a debug flag to enable all of these messages.

Well, not every commit is party to a transaction. If the client commits without acking a configure or changing it's size it won't be logged.

That said, I like the messages but also think a debug flag is in order. I had begun to litter transaction.c with debugging myself and it can get pretty verbose. It's a lot of logging for interactive resizes.

I actually wonder if more of the transaction related logging should be put behind a flag. All except the "transaction timed out" message are pretty unexceptional imo. I suppose this new message which notifies when a view acks a configure with a geometry different than requested is interesting as well.

Xyene added a commit to Xyene/wlroots that referenced this pull request Jan 29, 2021
If our ConvertSelection failed, we would previously leak the pending
Wayland client fd.

Refs swaywm/sway#5846.
@emersion emersion added the enhancement New feature or incremental improvement label Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement
Development

Successfully merging this pull request may close these issues.

3 participants