taskManeage - Tasks: task #15643, Add valgrind and patch to maneage

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #15643: Add valgrind and patch to maneage

Submitter:  Boud Roukema <boud>
Submitted:  Fri 15 May 2020 02:51:05 AM UTC
   
 
Should Start On:  Fri 15 May 2020 12:00:00 AM UTC Should be Finished on:  Fri 15 May 2020 12:00:00 AM UTC
Category:  Software Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Percent Complete:  100%
Open/Closed:  Closed Effort:  0.00

Jump to the original submission

Sat 23 May 2020 06:29:23 PM UTC, comment #6: 

This was an impressive catch! Thanks a lot Raul. Our three commits have now been "squashed" into one and rebased over the most recent Maneage branch and pushed to the main repo.

I tried to merge all the necessary components of the three commit messages into one complete commit message.

I am really proud of this commit, each one of us tested it, committed something to operate more smoothly for our particular case and it is finally merged into Maneage as one commit (so the Maneage user's don't have to get involved in the testing discussions ;-))!

Just one tiny thing Boud: for valgrind, there was no need to set 'mergenames=0' (the URL before the tarball didn't involve the version number), so I corrected it to the standard one-line statement like 'patch', I tested it and it worked like this :-).

I am now closing this task :-D.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Sat 23 May 2020 05:03:22 PM UTC, comment #5: 

Thanks Boud, I have good news! :-)

After some time looking and trying to fix this problem, I got the solution: making a symbolic link to `mig' (DESCRIPTION: The mig command invokes the Mach Interface Generator to generate Remote Procedure Call (RPC) code for client-server style Mach IPC from specification files.) I don't understand what is it but you can see in the log file I attached in my previous post that the main problem is:


/bin/sh: mig: command not found


And after that, many errors appear. The fix is very simple and you can see it here (branch `add_valgrind_macOS'): https://gitlab.com/infantesainz/reproduce-raulfork/-/commit/a6c8b15a57

I am happy that now it works in my macOS laptop, I think it is ready to be merged ;-)

Raul Infante-Sainz <infantesainz>
Group Member
Fri 22 May 2020 02:22:34 PM UTC, comment #4: 

Valgrind is very useful, but not urgent. We have a small enough
number of 'maneage' users for the moment that having problem-free
installs is probably a higher priority than putting valgrind
into the master branch. Rebasing the branch later on should not
be difficult. So I propose that we leave this in TODO mode
until you (Raul) or someone else has the time to find out
how to make this installable on OSX 10.13.6 - and to check
that it actually works. :) Since valgrind checks (especially)
memory usage, it could be a lot more hardware dependent than
ordinary tools, and getting it to work on OSX might not be
easy.

In the long term, I do think it's worth including, because
using the default system valgrind together with the maneage
gcc and shared libraries is likely to yield difficult-to-trace
errors. A within-maneage valgrind is more likely (as in my
recent experience) to be useful.

Boud Roukema <boud>
Group Member
Fri 22 May 2020 08:33:00 AM UTC, comment #3: 

I tried but it didn't work. My laptop is a macOS High Sierra, v10.13.6. You can have a look at the error in the attached file `valgrind-crash-macOS.tar.gz'.

I also make some changes in order to try to fix it, but at the end it didn't work. In short, I went to Homebrew formulae for installing valgrind in macOS (https://github.com/Homebrew/homebrew-core/blob/master/Formula/valgrind.rb). There, in the configure step there are some options:


   --disable-dependency-tracking
   --enable-only64bit
   --build=amd64-darwin


With these options, it also crashed. So, I investigated a bit more and it seems that there are some hard coded paths into `coregrind/Makefile.in`, that had to be replaced by the proper path for macOS systems (with Xcode). To resume, I did the following changes (showed as Git diff):


diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index efaa3c6..14eab09 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -761,7 +761,8 @@ $(ibidir)/valgrind: $(ibidir)/patch \
              patch --verbose -p1 < $(patchdir)/valgrind-3.15.0-mpi-fix2.patch; \
            fi \
         && autoreconf \
-        && ./configure --prefix=$(idir) \
+        && sed -i -e's|/usr/include/mach|/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach|g' $(ddir)/valgrind-$(valgrind-version)/coregrind/Makefile.in \
+        && ./configure --prefix=$(idir) --disable-dependency-tracking --enable-only64bit --build=amd64-darwin \
         && make -j$(numthreads) \
         && if ! make check -j$(numthreads); then \
              echo; echo "Valgrind's 'make check' failed!"; echo; \


But, again, it didn't work :-(((
At this point, I think if we want to merge with the master branch, we should put a warning for noticing the user that Valgrind is not ready for macOS systems yet. What do you think? I will try to fix this if I have time, but let me know if you have any idea.

Raul Infante-Sainz <infantesainz>
Group Member
Fri 15 May 2020 07:24:38 PM UTC, comment #2: 

Raul, just one correction: you don't need to add valgrind to TARGETS.conf, its already there :-).

Later, I will rebase all the commits in this branch into commit in the core maneage branch, so there is no problem, we'll remove it then ;-).

Mohammad Akhlaghi <makhlaghi>
Group administrator
Fri 15 May 2020 07:21:27 PM UTC, comment #1: 

Thanks Boud, I just tried them and with some minor corrections it worked cleanly. As explained in the commit message, I just had to stop 'make check' breaking Maneage.

Raul, when you get the chance, can you try this branch on your macOS? We'll merge it into the main branch afterwards.


git remote add maneage-dev git@gitlab.com:maneage/project-dev.git
git fetch maneage-dev add_valgrind
git checkout -b add_valgrind maneage-dev/add_valgrind
# Add 'valgrind' to TARGETS.conf
./project configure -e


Mohammad Akhlaghi <makhlaghi>
Group administrator
Fri 15 May 2020 02:51:05 AM UTC, original submission:  

The maneage branch at

https://codeberg.org/boud/maneage_dev/src/branch/add_valgrind

adds valgrind and patch. Many users will want patch .

This is a branch from commit 96a299b by Raul on 6 May 2020.

Users who already know how to use valgrind , or who are willing to learn how to use it, will help to reduce the number of memory leaks in reproducible packages provided within the `maneage` system. Valgrind also helps to trace segmentation faults.


For more information about valgrind, see https://valgrind.org and
https://en.wikipedia.org/wiki/Valgrind .

Boud Roukema <boud>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by infantesainz (Posted a comment)
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by makhlaghi
  • -email is unavailable- added by boud (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-23 makhlaghi StatusReady For Test Done
        Percent Complete90% 100%
        Open/ClosedOpen Closed
    2020-05-15 makhlaghi Percent Complete0% 90%
        Carbon-Copy- Added -email is unavailable-
    2020-05-15 boud CategoryNone Software
        StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code