ports/189484: sysutils/modules segfaults when adding a new path
Marcus Breese
marcus at breese.com
Thu May 8 20:20:00 UTC 2014
>Number: 189484
>Category: ports
>Synopsis: sysutils/modules segfaults when adding a new path
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 08 20:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Marcus Breese
>Release: 10
>Organization:
Stanford University
>Environment:
FreeBSD cabiopeds-s1 10.0-RELEASE-p2 FreeBSD 10.0-RELEASE-p2 #0: Tue Apr 29 17:06:01 UTC 2014 root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Environment modules is used to selectively choose which version of programs to load into the environment. It is commonly used on HPC clusters. It is included in ports as sysutils/modules
The stock installation of sysutils/modules includes a configuration file: /usr/local/Modules/3.1.6/init/.modulespath
This is what is in the file:
#
# @(#).modulespath.in 1.3\t95/08/06
# Module version 3.1.6
#
# Modulepath initial setup
# ========================
#
# This file defines the initial setup for the module files search path.
# Comments may be added anywhere. The begin on # and continue until the
# end of the line
# Each line containing a single path will be added to the MODULEPATH
# environment variable. You may add as many as you want - just
# limited by the variable size of your shell.
#
/usr/local/Modules/versions # location of version files
/usr/local/Modules/$MODULE_VERSION/modulefiles # Module pkg modulefiles
/usr/local/lib/ # General module files
# /usr/local/Modules/3.1.6/your_contribs # Edit for your requirements
If you try to add a new path to the list (at the bottom), the program segfaults and dumps a core in the current directory.
>How-To-Repeat:
Install sysutils/modules, add a new path to the end of the .modulepath file. Run 'module avail'. (Modules is usually setup as part of a shell function, to test it directly, run '/usr/local/Modules/3.1.6/bin/modulecmd bash avail` (or zsh, or tcsh, etc...).
>Fix:
The problem is that /usr/local/lib is getting added as a location for possible new module definitions. Something in the parsing of /usr/local/lib is causing the program to segfault.
Commenting out /usr/local/lib solves the problem.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list