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

vdagent: fixing 90s timeout on shutdown #85853

Merged
merged 1 commit into from May 15, 2020
Merged

Conversation

sjau
Copy link

@sjau sjau commented Apr 23, 2020

Motivation for this change

In vdagent 0.20.0 was a bug introduced that causes a 90s timeout during shutdown. Upstream it's already fixed: https://gitlab.freedesktop.org/spice/linux/vd_agent/-/merge_requests/7 so the patch just needs to be applied here.

Fixes: #85235

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@symphorien
Copy link
Member

Is it possible to use fetchpatch on the commits which were merged instead of copying the patch in the repo ?

@sjau
Copy link
Author

sjau commented Apr 23, 2020

No idea how to do that with gitlab - but feel free to do so.

@jonringer
Copy link
Contributor

@GrahamcOfBorg eval

@jonringer
Copy link
Contributor

please rebase your branch ontop of master, and force push to fix eval:

git pull -r origin/master
git push --force .. ..

Comment on lines 13 to 15
(fetchpatch { url = "https://gitlab.freedesktop.org/spice/linux/vd_agent/-/commit/7b0435ef66af088c1a1be20b6bc6b0fcb76e4e1a.patch"; sha256 = "<FIXME>";})
(fetchpatch { url = "https://gitlab.freedesktop.org/spice/linux/vd_agent/-/commit/9b8c0ebb9fb573e6ce3c5416371509f416503d0c.patch"; sha256 = "<FIXME>";})
Copy link
Member

@cole-h cole-h Apr 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so you don't forget: these two hashes need to be changed.

Also, you need to specify fetchpatch in the arguments at the top of the file in order to use it.

Also also, you can drop timeout.diff because of this change :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the <FIXME> part was meant as a place holder.

@sjau
Copy link
Author

sjau commented Apr 25, 2020

Is it possible to use fetchpatch on the commits which were merged instead of copying the patch in the repo ?

That's not working because:

building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/7grgqj1xvfbjfass17hd1a86z8zyp4qp-spice-vdagent-0.20.0.drv
  /nix/store/24w90iy5lilllhn8k08xw0cmhfsd151w-system-path.drv
  /nix/store/87m9hi02x3l3aiim416za38wdy6yzp60-dbus-1.drv
  /nix/store/nx1kkjdfsr20fif0wi8pb468i997l00w-unit-dbus.service.drv
  /nix/store/0ds4qi3aq7s10d1ql1q46s3q4al2bks6-user-units.drv
  /nix/store/2i3k6305vpd3y2l4k1aijfd6m0sfm49w-system-crontab.drv
  /nix/store/3kb1zagnpgd4vhxsww53yhrijs2qjrj5-unit-systemd-fsck-.service.drv
  /nix/store/4bj9db82flh1swv84xzfdx7ks19c79nf-unit-dbus.service.drv
  /nix/store/5l56mvk87s1kl3spfrb9xkc7nyl5pv0g-unit-spice-vdagentd.service.drv
  /nix/store/7hgyhzlfi11hyv7ydsvzvz8hqiyv5dnc-crontabs.drv
  /nix/store/ris1rabinrq5ynr94724lx70chzfsb11-unit-polkit.service.drv
  /nix/store/nj4aqnypb62rqww9wma4yafh8y805w5y-system-units.drv
  /nix/store/lj79bp2waj12nc0vyg2bkf1zcr000y4r-etc.drv
  /nix/store/5qyqvgzb4gkkzi2kbg9qvgkzz7xa7alj-nixos-system-subi-20.09.git.07320362ff1M.drv
building '/nix/store/7grgqj1xvfbjfass17hd1a86z8zyp4qp-spice-vdagent-0.20.0.drv'...
unpacking sources
unpacking source archive /nix/store/vvdingxmr5g9wyzvqz0q2fwf4pliidfa-spice-vdagent-0.20.0.tar.bz2
source root is spice-vdagent-0.20.0
setting SOURCE_DATE_EPOCH to timestamp 1583846554 of file spice-vdagent-0.20.0/test-driver
patching sources
applying patch /nix/store/cbv4jz23x2cn6yzww3fbhlj2s30a61i6-7b0435ef66af088c1a1be20b6bc6b0fcb76e4e1a.patch
patching file src/vdagentd/vdagentd.c
Hunk #1 succeeded at 1228 (offset 4 lines).
Hunk #2 FAILED at 1233.
1 out of 2 hunks FAILED -- saving rejects to file src/vdagentd/vdagentd.c.rej
builder for '/nix/store/7grgqj1xvfbjfass17hd1a86z8zyp4qp-spice-vdagent-0.20.0.drv' failed with exit code 1
cannot build derivation '/nix/store/24w90iy5lilllhn8k08xw0cmhfsd151w-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/5l56mvk87s1kl3spfrb9xkc7nyl5pv0g-unit-spice-vdagentd.service.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/5qyqvgzb4gkkzi2kbg9qvgkzz7xa7alj-nixos-system-subi-20.09.git.07320362ff1M.drv': 1 dependencies couldn't be built

So you'd need to patch those patch files also that are aimed at a slightly modified source code...

@sjau
Copy link
Author

sjau commented Apr 27, 2020

@symphorien @Mic92 @jonringer

Since the original provided patches can't patch the stable version used because some alterations have been meanwhile made upstream, I think it's best again to revert to our own patch file.

@sjau sjau force-pushed the vdagent_timeout branch 2 times, most recently from cec36cb to b426995 Compare April 28, 2020 11:01
@sjau
Copy link
Author

sjau commented May 6, 2020

@symphorien @Mic92 @jonringer

Any suggestion?

@sjau
Copy link
Author

sjau commented May 8, 2020

Fixed according to Mic92's suggestion.

@sjau
Copy link
Author

sjau commented May 13, 2020

@symphorien
anything else?

@Mic92
Copy link
Member

Mic92 commented May 15, 2020

Result of nixpkgs-review pr 85853 1

1 package built:
- spice-vdagent

@Mic92 Mic92 merged commit 4de5006 into NixOS:master May 15, 2020
@sjau
Copy link
Author

sjau commented May 15, 2020

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spice-vdagent: 90s timeout on shutdown/reboot
5 participants