Bug 1390282

Summary: valgrind subdir test triggers kojid problem
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: valgrindAssignee: Mark Wielaard <mjw>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dennis, dodji, jakub, mjw, mjw
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: valgrind-3.12.0-9.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-13 19:19:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kevin Fenzi 2016-10-31 15:34:42 UTC
I've also filed this on koji as it should handle things: 
https://pagure.io/koji/issue/201

but also perhaps valgrind might clean up /tmp/ after it's tests. 

One of the valgrind tests makes a /tmp/wd_test_*/subdir/ tree that is MAXDIRS deep. This seems to do about 585 subdirs deep. kojid has trouble deleting it. Other things might also. 

Perhaps valgrind after it's tests pass (either in tests themselves or in the spec) could wipe this tmp dir/tests ?

Comment 1 Mark Wielaard 2016-10-31 15:52:03 UTC
Sorry about that. The test is to make sure that valgrind when launched in a cwd that is > MAXPATH deep and/or in a directory that has been deleted and/or one of the cwd subdirs is inaccessible still works.

The testcase does:

  /* Go deep. */
  int dirslen = PATH_MAX;
  while (dirslen > 0)
    {
      /* We don't do any error checking in case some OS fails. */
      mkdir ("subdir", S_IRWXU);
      chdir ("subdir");
      dirslen -= strlen ("subdir");
    }

  /* Make one component inaccessible. */
  chmod(tmpdir, 0);

  /* Remove the current dir (don't check error, might fail). */
  rmdir ("../subdir");

  execlp ("echo", "echo", "Hello", "World", (char *) NULL);

That is also why it doesn't clean up after itself, it execs and forgets.

I'll see if I can add a wrapper that does the cleanup.

Comment 2 Kevin Fenzi 2016-11-12 15:01:16 UTC
Any news on a cleanup wrapper? ;)

Comment 3 Dennis Gilmore 2016-11-12 15:03:06 UTC
or just add a rm -rf after the tests are run?

Comment 4 Mark Wielaard 2016-11-12 20:07:04 UTC
I integrated upstream valgrind svn r16134 as valgrind-3.12.0-nocwd-cleanup.patch into valgrind-3.12.0-3 which is currently building:
//koji.fedoraproject.org/koji/taskinfo?taskID=16425855

Comment 5 Fedora End Of Life 2017-02-28 10:32:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 6 Fedora Update System 2017-07-05 14:02:10 UTC
valgrind-3.12.0-9.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ffd8b851cc

Comment 7 Fedora Update System 2017-07-06 03:53:43 UTC
valgrind-3.12.0-9.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ffd8b851cc

Comment 8 Fedora Update System 2017-07-13 19:19:48 UTC
valgrind-3.12.0-9.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.