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

vdagent: fixing 90s timeout on shutdown #85853

merged 1 commit into from May 15, 2020

Conversation

@sjau
Copy link
Contributor

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
Contributor

symphorien commented Apr 23, 2020

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

@sjau
Copy link
Contributor Author

sjau commented Apr 23, 2020

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

@jonringer
Copy link
Contributor

jonringer commented Apr 23, 2020

@jonringer
Copy link
Contributor

jonringer commented Apr 23, 2020

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

git pull -r origin/master
git push --force .. ..
(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>";})
Comment on lines 13 to 15

This comment has been minimized.

Copy link
@cole-h

cole-h Apr 23, 2020

Member

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 :)

This comment has been minimized.

Copy link
@Mic92

Mic92 Apr 24, 2020

Contributor

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

@sjau
Copy link
Contributor 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
Contributor 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 sjau:vdagent_timeout branch 2 times, most recently from cec36cb to b426995 Apr 28, 2020
@sjau
Copy link
Contributor Author

sjau commented May 6, 2020

@symphorien @Mic92 @jonringer

Any suggestion?

@sjau sjau force-pushed the sjau:vdagent_timeout branch from b426995 to facbf40 May 6, 2020
@sjau
Copy link
Contributor Author

sjau commented May 8, 2020

Fixed according to Mic92's suggestion.

@sjau
Copy link
Contributor Author

sjau commented May 13, 2020

@symphorien
anything else?

@Mic92
Copy link
Contributor

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
14 checks passed
14 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="facbf40"; rev="facbf402ac3e9230e796fb54f7431851c1182aa1"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="facbf40"; rev="facbf402ac3e9230e796fb54f7431851c1182aa1"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="facbf40"; rev="facbf402ac3e9230e796fb54f7431851c1182aa1"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="facbf40"; rev="facbf402ac3e9230e796fb54f7431851c1182aa1"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="facbf40"; rev="facbf402ac3e9230e796fb54f7431851c1182aa1"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="facbf40"; rev="facbf402ac3e9230e796fb54f7431851c1182aa1"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="facbf40"; rev="facbf402ac3e9230e796fb54f7431851c1182aa1"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@sjau
Copy link
Contributor 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
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.