Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913126 - sys-cluster/glusterfs: access violation *iff* glusterd is running at time of merge
Summary: sys-cluster/glusterfs: access violation *iff* glusterd is running at time of ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jaco Kroon
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-08-28 05:07 UTC by Jaco Kroon
Modified: 2023-08-29 10:08 UTC (History)
0 users

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 Jaco Kroon 2023-08-28 05:07:07 UTC
* ----------------------- SANDBOX ACCESS VIOLATION SUMMARY -----------------------
 * LOG FILE: "/var/tmp/portage/sys-cluster/glusterfs-11.0-r1/temp/sandbox-misc.log"
 * 
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /var/log/glusterfs/cli.log
A: /var/log/glusterfs/cli.log
R: /var/log/glusterfs/cli.log
C: gluster volume set help 

F: open_wr
S: deny
P: /var/log/glusterfs/cli.log
A: /var/log/glusterfs/cli.log
R: /var/log/glusterfs/cli.log
C: gluster volume set help 
 * --------------------------------------------------------------------------------

From:

extras/command-completion/gluster.bash

  3 if pidof glusterd > /dev/null 2>&1; then
  4         GLUSTER_SET_OPTIONS="
  5         $(for token in `gluster volume set help 2>/dev/null | grep "^Option:" | cut -d ' ' -f 2`
  6         do
  7                 echo "{$token},"
  8         done)
  9         "
 10         GLUSTER_RESET_OPTIONS="$GLUSTER_SET_OPTIONS"
 11 fi


It seems that for some (unknown to myself) reason during the merge process the bash completion script is sourced, which results in the access violation.  Obviously we don't want to execute the above during merge, but I believe some QA processes require this in order to check for:

 * Problems with installed bash completions were found:
 * 
 * 	gluster.bash: incorrect name, no completions for 'gluster.bash' command defined.
 * 	glusterfs: incorrect name, no completions for 'glusterfs' command defined.
 * 	gluster: missing alias (symlink) for completed command.
 * 	gluster: missing alias (symlink) for completed command.
 * 
 * For more details on installing bash-completions, please see:
 * https://wiki.gentoo.org/wiki/Bash/Installing_completion_files

On some systems (haven't yet figured out the pattern) this results in glusterfs failing to merge.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-28 05:10:51 UTC
Can you pass some argument to stop it probing, or give it a fake empty pid dir etc in ${T}?
Comment 2 Jaco Kroon 2023-08-28 07:23:44 UTC
Sam,

I'm trying to figure out *why* it's even sources/running that during install in the first place.  Can't see that this should be happening unless there is something in make install itself which is doing that.

Is there a way to get the parent command of the command that caused the violation too?

Kind regards,
Jaco
Comment 3 Larry the Git Cow gentoo-dev 2023-08-29 10:08:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e1eb910497ba0fca83c9a9a1200a9d2ebcf6c14

commit 3e1eb910497ba0fca83c9a9a1200a9d2ebcf6c14
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2023-08-28 08:32:03 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-08-29 10:08:36 +0000

    sys-cluster/glusterfs: rev bump to 11.0-r2
    
    Includes patch for bashcompletion.
    Fixes python related QA issues.
    Avoids environment variable (and assists my unused files script for
    false positives in files/).
    
    Closes: https://bugs.gentoo.org/913125
    Closes: https://bugs.gentoo.org/913126
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Closes: https://github.com/gentoo/gentoo/pull/32483
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 ...r-invoking-of-gluster-volume-set-help-as-.patch |  85 ++++++++
 sys-cluster/glusterfs/glusterfs-11.0-r2.ebuild     | 216 +++++++++++++++++++++
 2 files changed, 301 insertions(+)