Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 941384 - [guru] sci-misc/boinc-wrapper updates cause boinc job failures
Summary: [guru] sci-misc/boinc-wrapper updates cause boinc job failures
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: GURU project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-12 13:30 UTC by Benn Snyder
Modified: 2024-10-19 00:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benn Snyder 2024-10-12 13:30:04 UTC
When using boinc-wrapper for anonymous platform boinc projects (e.g. sci-misc/cmdock), any update which changes the size of /usr/bin/boinc-wrapper causes new jobs to fail and all jobs to be lost upon restart.

    [SiDock@home] File projects/www.sidock.si_sidock/cmdock-l_wrapper has wrong size: expected 1474184, got 543984

This happens because boinc-client validates the size of files in each project directory, and it follows the cmdock-l_wrapper -> ../../../../../usr/bin/boinc-wrapper symlink while doing so.  At this point, boinc-client detects a size mismatch and deletes the symlink which causes all future jobs to fail.

Reproducible: Always

Steps to Reproduce:
1. Use boinc-wrapper with a project like cmdock
2. Start some jobs in boinc-client
3. Change the size of /usr/bin/boinc-wrapper
4. Wait for a new job to start and observe the error message



Workaround

1. Stop boinc-client.
2. Update boinc-wrapper.
3. Manually edit /var/lib/boinc/sched_request_www.sidock.si_sidock.xml and change the cmdock-l_wrapper <nbytes> entry to the new size.
4. Start boinc-client.


Potential solutions

1. In boinc-app.eclass generate a wrapper script instead of a symlink, something like

    #!/bin/sh
    exec "${EPREFIX}/usr/bin/boinc-wrapper" "\${@}"

This script should never (almost never) change size so boinc-client will not notice any difference.  This is what I do in my custom cmdock ebuild - https://github.com/piedar/overboard/blob/a7972f8b8dcfc1042f307b62a79554ad4323413d/sci-biology/cmdock/cmdock-0.2.0-r15.ebuild#L252

2. OR convince upstream to avoid following symlinks when validating file sizes.
Comment 1 Anna Vyalkova 2024-10-16 10:33:06 UTC
Shell wrapper seems like a good solution, eclass update sent for review.

https://marc.info/?l=gentoo-guru&m=172907433029987&w=2
Comment 2 Larry the Git Cow gentoo-dev 2024-10-19 00:05:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ea3ff719b1395d31235029ef86ae290a5872382c

commit ea3ff719b1395d31235029ef86ae290a5872382c
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
AuthorDate: 2024-10-16 10:15:51 +0000
Commit:     Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
CommitDate: 2024-10-18 14:24:18 +0000

    boinc-app.eclass: replace symlink with shell wrapper
    
    Closes: https://bugs.gentoo.org/941384
    Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>

 eclass/boinc-app.eclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)