libreport version: 2.0.10 abrt_version: 2.0.10 backtrace_rating: 4 cmdline: /usr/bin/modulecmd bash load DOLFIN crash_function: _int_realloc executable: /usr/bin/modulecmd kernel: 3.4.2-4.fc17.x86_64 pid: 29214 pwd: /home/jens/temp time: Wed 20 Jun 2012 04:53:00 PM CEST uid: 1000 username: jens backtrace: Text file, 29395 bytes maps: Text file, 4826 bytes build_ids: :d32cbeacfd9f41e3cd29b697dd111f44a2d9c127 :1b7abd5c8129b91c0ca4f0f0812e61660236fd38 :5dd234206476b0387cd251598aa72a2c95c763c5 :5b4f3d35b4612be98f2bbb635b3eabf0ee7e437d :1e9772327ece6c5af71822cfdba5a2861380573a :a4ec59d7fc9c453fb4287d7ebc5fcf6579792e65 :dec0de92024bee74c75c04bde4c54c097fe68ae8 :247132297f287226a24c12e683292f5c94013066 :16f3edd888475d3736de0131d6d9685f57e68d5d :127f8958b602715234a02b88adb08afd9e34c203 :4d09d82785dab5f95c01b69bc0785145a5954d30 cgroup: :9:perf_event:/ :8:blkio:/ :7:net_cls:/ :6:freezer:/ :5:devices:/ :4:memory:/ :3:cpuacct,cpu:/ :2:cpuset:/ :1:name=systemd:/user/jens/2 comment: :It happens when I load a module I created myself (DOLFIN). : :This module loads a bunch of other module files (dependencies with each another bunch of dependencies). This seems to fail if to much are loaded at the same time. :When I first load the dependencies and then load the module everything works fine. : :The module in question: :[jens@ca60c173 otrs]$ module show DOLFIN :------------------------------------------------------------------- :/home/jens/easybuild/modules/all//DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3: : :module-whatis DOLFIN is the C++/Python interface of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations. - Homepage: https://launchpad.net/dolfin :conflict DOLFIN :module load goalf/1.1.0-no-OFED :module load Python/2.7.3-goalf-1.1.0-no-OFED :module load Boost/1.49.0-goalf-1.1.0-no-OFED :module load UFC/2.0.5-goalf-1.1.0-no-OFED :module load SWIG/2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3 :module load FFC/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3 :module load FIAT/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3 :module load Instant/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3 :module load Viper/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3 :module load UFL/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3 :module load SCOTCH/5.1.12b_esmumps-goalf-1.1.0-no-OFED :module load Armadillo/2.4.4-goalf-1.1.0-no-OFED :module load ParMETIS/4.0.2-goalf-1.1.0-no-OFED :module load SuiteSparse/3.7.0-goalf-1.1.0-no-OFED-withparmetis :module load CGAL/4.0-goalf-1.1.0-no-OFED :module load zlib/1.2.7-goalf-1.1.0-no-OFED :prepend-path LD_LIBRARY_PATH /home/jens/easybuild/software/DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3/lib :prepend-path MANPATH /home/jens/easybuild/software/DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3/share/man :prepend-path PATH /home/jens/easybuild/software/DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3/bin :prepend-path PKG_CONFIG_PATH /home/jens/easybuild/software/DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3/lib/pkgconfig :setenv SOFTROOTDOLFIN /home/jens/easybuild/software/DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3 :setenv SOFTVERSIONDOLFIN 1.0.0 :prepend-path PYTHONPATH /home/jens/easybuild/software/DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3/lib/python2.7/site-packages :setenv BOOST_DIR /home/jens/easybuild/software/Boost/1.49.0-goalf-1.1.0-no-OFED :prepend-path PKG_CONFIG_PATH /home/jens/easybuild/software/UFC/2.0.5-goalf-1.1.0-no-OFED/lib/pkgconfig :prepend-path PKG_CONFIG_PATH /home/jens/easybuild/software/DOLFIN/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3/lib/pkgconfig :setenv I_MPI_CXX None :setenv I_MPI_CC None :------------------------------------------------------------------- : :I can provide a full list of modules if needed. :Or alternatively you can recreate the entire environment I use here with EasyBuild ( https://github.com/JensTimmerman/easybuild/tree/236_DOLFIN ) by downloading the tarbal, exporting it, and running: :easybuild.sh easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb -ldr easybuild/easyconfigs : (warning this will create a load of software and modules) core_backtrace: :a4ec59d7fc9c453fb4287d7ebc5fcf6579792e65 0x7bc4d malloc_consolidate libc.so.6 - :a4ec59d7fc9c453fb4287d7ebc5fcf6579792e65 0x7ce1e _int_malloc libc.so.6 - :a4ec59d7fc9c453fb4287d7ebc5fcf6579792e65 0x7e71c _int_realloc libc.so.6 - :a4ec59d7fc9c453fb4287d7ebc5fcf6579792e65 0x80355 realloc libc.so.6 - :1e9772327ece6c5af71822cfdba5a2861380573a 0x382f5 Tcl_Realloc libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0xcc3cf Tcl_DStringSetLength libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0x70759 Tcl_ExternalToUtfDString libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0xdb6ff - libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0x712b6 TclGetEnv libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0x7142b - libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0xc75d9 TclCallVarTraces libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0xcf379 - libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0xd14c0 Tcl_ObjGetVar2 libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0xd15d4 Tcl_GetVar2Ex libtcl8.5.so - :1e9772327ece6c5af71822cfdba5a2861380573a 0xd1649 Tcl_GetVar2 libtcl8.5.so - :16f3edd888475d3736de0131d6d9685f57e68d5d 0x12756 - [exe] - :16f3edd888475d3736de0131d6d9685f57e68d5d 0x1344b - [exe] - :16f3edd888475d3736de0131d6d9685f57e68d5d 0x2b2c - [exe] - dso_list: :/usr/bin/modulecmd environment-modules-3.2.9c-2.fc17.x86_64 (Fedora Project) 1338553444 :/usr/lib64/libxcb.so.1.1.0 libxcb-1.8.1-1.fc17.x86_64 (Fedora Project) 1338394206 :/usr/lib/locale/locale-archive glibc-common-2.15-37.fc17.x86_64 (Fedora Project) 1337719194 :/usr/lib64/libnss_files-2.15.so glibc-2.15-37.fc17.x86_64 (Fedora Project) 1337719195 :/usr/lib64/libm-2.15.so glibc-2.15-37.fc17.x86_64 (Fedora Project) 1337719195 :/usr/lib64/libc-2.15.so glibc-2.15-37.fc17.x86_64 (Fedora Project) 1337719195 :/usr/lib64/libX11.so.6.3.0 libX11-1.4.99.901-2.fc17.x86_64 (Fedora Project) 1337719247 :/usr/lib64/libtcl8.5.so tcl-1:8.5.11-2.fc17.x86_64 (Fedora Project) 1337719209 :/usr/lib64/libgcc_s-4.7.0-20120507.so.1 libgcc-4.7.0-5.fc17.x86_64 (Fedora Project) 1337719189 :/usr/lib64/ld-2.15.so glibc-2.15-37.fc17.x86_64 (Fedora Project) 1337719195 :/usr/lib64/libXau.so.6.0.0 libXau-1.0.6-3.fc17.x86_64 (Fedora Project) 1337719199 :/usr/lib64/libdl-2.15.so glibc-2.15-37.fc17.x86_64 (Fedora Project) 1337719195 environ: :XDG_VTNR=1 :XDG_SESSION_ID=2 :HOSTNAME=ca60c173 :IMSETTINGS_INTEGRATE_DESKTOP=yes :GPG_AGENT_INFO=/run/user/jens/keyring-C9LA7J/gpg:0:1 :TERM=xterm :SHELL=/bin/bash :HISTSIZE=1000 :GJS_DEBUG_OUTPUT=stderr :WINDOWID=48235037 :OLDPWD=/home/jens :GNOME_KEYRING_CONTROL=/run/user/jens/keyring-C9LA7J :QTDIR=/usr/lib64/qt-3.3 :QTINC=/usr/lib64/qt-3.3/include :'GJS_DEBUG_TOPICS=JS ERROR;JS LOG' :IMSETTINGS_MODULE=none :QT_GRAPHICSSYSTEM_CHECKED=1 :USER=jens :HPC_UGENT_MANAGE_ENV=config :LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:*.pdf=00;33:*.ps=00;33:*.ps.gz=00;33:*.txt=00;33:*.patch=00;33:*.diff=00;33:*.log=00;33:*.tex=00;33:*.xls=00;33:*.xlsx=00;33:*.ppt=00;33:*.pptx=00;33:*.rtf=00;33:*.doc=00;33:*.docx=00;33:*.odt=00;33:*.ods=00;33:*.odp=00;33:*.xml=00;33:*.epub=00;33:*.abw=00;33:*.html=00;33:*.wpd=00;33: :SSH_AUTH_SOCK=/run/user/jens/keyring-C9LA7J/ssh :USERNAME=jens :SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/989,unix/unix:/tmp/.ICE-unix/989 :PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/jens/bin :MAIL=/var/spool/mail/jens :DESKTOP_SESSION=gnome :QT_IM_MODULE=xim :PWD=/home/jens/temp :XMODIFIERS=@im=none :GNOME_KEYRING_PID=985 :LANG=en_US.UTF-8 :MODULEPATH=/home/jens/easybuild/modules/all/:/usr/share/Modules/modulefiles:/etc/modulefiles :LOADEDMODULES= :GDMSESSION=gnome :HISTCONTROL=ignoredups :HOME=/home/jens :XDG_SEAT=seat0 :SHLVL=2 :GNOME_DESKTOP_SESSION_ID=this-is-deprecated :LOGNAME=jens :PYTHONPATH=/home/jens/workspace/ugenthpc/rpms/python-vsc-packages-logging/:/home/jens/workspace/ugenthpc/rpms/python-vsc-packages-utils/ :QTLIB=/usr/lib64/qt-3.3/lib :DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-JCFIe0lhxV,guid=aca8006b6f4bdcf10812286700000012 :MODULESHOME=/usr/share/Modules :'LESSOPEN=||/usr/bin/lesspipe.sh %s' :WINDOWPATH=1 :XDG_RUNTIME_DIR=/run/user/jens :DISPLAY=:0 :COLORTERM=gnome-terminal :XAUTHORITY=/var/run/gdm/auth-for-jens-tIFhDS/database :'module=() { eval `/usr/bin/modulecmd bash $*`\n}' :_=/usr/bin/modulecmd event_log: :2012-06-22-15:39:40> Analyzing coredump 'coredump' :2012-06-22-15:39:41 Coredump references 11 debuginfo files, 11 of them are not installed :2012-06-22-15:39:41 Setting up yum repositories :2012-06-22-15:39:45 Looking for needed packages in repositories :2012-06-22-15:39:55 Packages to download: 7 :2012-06-22-15:39:56 Downloading (1 of 7) tcl-debuginfo-8.5.11-2.fc17.x86_64.rpm: 100% :2012-06-22-15:39:56 Extracting cpio from /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196/tcl-debuginfo-8.5.11-2.fc17.x86_64.rpm :2012-06-22-15:39:56 Caching files from unpacked.cpio made from tcl-debuginfo-8.5.11-2.fc17.x86_64.rpm :2012-06-22-15:39:56 Downloading (2 of 7) gcc-base-debuginfo-4.7.0-5.fc17.x86_64.rpm: 100% :2012-06-22-15:39:56 Extracting cpio from /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196/gcc-base-debuginfo-4.7.0-5.fc17.x86_64.rpm :2012-06-22-15:39:57 Caching files from unpacked.cpio made from gcc-base-debuginfo-4.7.0-5.fc17.x86_64.rpm :2012-06-22-15:39:57 Downloading (3 of 7) environment-modules-debuginfo-3.2.9c-2.fc17.x86_64.rpm: 100% :2012-06-22-15:39:57 Extracting cpio from /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196/environment-modules-debuginfo-3.2.9c-2.fc17.x86_64.rpm :2012-06-22-15:39:57 Caching files from unpacked.cpio made from environment-modules-debuginfo-3.2.9c-2.fc17.x86_64.rpm :2012-06-22-15:39:57 Downloading (4 of 7) libX11-debuginfo-1.4.99.901-2.fc17.x86_64.rpm: 100% :2012-06-22-15:39:57 Extracting cpio from /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196/libX11-debuginfo-1.4.99.901-2.fc17.x86_64.rpm :2012-06-22-15:39:57 Caching files from unpacked.cpio made from libX11-debuginfo-1.4.99.901-2.fc17.x86_64.rpm :2012-06-22-15:39:59 Downloading (5 of 7) glibc-debuginfo-2.15-37.fc17.x86_64.rpm: 100% :2012-06-22-15:39:59 Extracting cpio from /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196/glibc-debuginfo-2.15-37.fc17.x86_64.rpm :2012-06-22-15:40:00 Caching files from unpacked.cpio made from glibc-debuginfo-2.15-37.fc17.x86_64.rpm :2012-06-22-15:40:01 Downloading (6 of 7) libXau-debuginfo-1.0.6-3.fc17.x86_64.rpm: 100% :2012-06-22-15:40:01 Extracting cpio from /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196/libXau-debuginfo-1.0.6-3.fc17.x86_64.rpm :2012-06-22-15:40:01 Caching files from unpacked.cpio made from libXau-debuginfo-1.0.6-3.fc17.x86_64.rpm :2012-06-22-15:40:01 Downloading (7 of 7) libxcb-debuginfo-1.8.1-1.fc17.x86_64.rpm: 100% :2012-06-22-15:40:01 Extracting cpio from /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196/libxcb-debuginfo-1.8.1-1.fc17.x86_64.rpm :2012-06-22-15:40:01 Caching files from unpacked.cpio made from libxcb-debuginfo-1.8.1-1.fc17.x86_64.rpm :2012-06-22-15:40:01 Removing /tmp/abrt-tmp-debuginfo-2012-06-22-15:39:40.23196 :2012-06-22-15:40:01 All debuginfo files are available :2012-06-22-15:40:01 Generating backtrace :2012-06-22-15:40:02 Backtrace is generated and saved, 29395 bytes limits: :Limit Soft Limit Hard Limit Units :Max cpu time unlimited unlimited seconds :Max file size unlimited unlimited bytes :Max data size unlimited unlimited bytes :Max stack size 8388608 unlimited bytes :Max core file size 0 unlimited bytes :Max resident set unlimited unlimited bytes :Max processes 1024 30639 processes :Max open files 1024 4096 files :Max locked memory 65536 65536 bytes :Max address space unlimited unlimited bytes :Max file locks unlimited unlimited locks :Max pending signals 30639 30639 signals :Max msgqueue size 819200 819200 bytes :Max nice priority 0 0 :Max realtime priority 0 0 :Max realtime timeout unlimited unlimited us open_fds: :0:/dev/pts/9 :pos: 0 :flags: 0100002 :1:pipe:[1118268] :pos: 0 :flags: 01 :2:/dev/pts/9 :pos: 0 :flags: 0100002 var_log_messages: :Jun 20 13:40:27 ca60c173 abrt[5440]: Saved core dump of pid 5439 (/usr/bin/modulecmd) to /var/spool/abrt/ccpp-2012-06-20-13:40:26-5439 (6922240 bytes) :Jun 20 14:25:52 ca60c173 abrt[6502]: Saved core dump of pid 6501 (/usr/bin/modulecmd) to /var/spool/abrt/ccpp-2012-06-20-14:25:52-6501 (6922240 bytes) :Jun 20 15:03:32 ca60c173 abrt[9452]: Saved core dump of pid 9451 (/usr/bin/modulecmd) to /var/spool/abrt/ccpp-2012-06-20-15:03:32-9451 (6103040 bytes) :Jun 20 16:40:01 ca60c173 kernel: [65144.215847] modulecmd[26084]: segfault at 13600e8 ip 00000000013600e8 sp 00007fff19e47a38 error 15 :Jun 20 16:40:01 ca60c173 abrt[26085]: Saved core dump of pid 26084 (/usr/bin/modulecmd) to /var/spool/abrt/ccpp-2012-06-20-16:40:01-26084 (6946816 bytes) :Jun 20 16:53:00 ca60c173 kernel: [65922.035626] modulecmd[29214] general protection ip:360da7bc4d sp:7fff66b712b0 error:0 in libc-2.15.so[360da00000+1ac000] :Jun 20 16:53:00 ca60c173 abrt[29215]: Saved core dump of pid 29214 (/usr/bin/modulecmd) to /var/spool/abrt/ccpp-2012-06-20-16:53:00-29214 (7208960 bytes)
Created attachment 593751 [details] File: backtrace
Created attachment 593752 [details] File: coredump
Created attachment 593753 [details] File: maps
Please tar up and attach the contents of /etc/modulefiles and /usr/share/Modules/modulefiles.
Created attachment 597737 [details] Module files relevant to this crash Since I also have /home/jens/easybuild/modules/all/ added to my MODULEPATH I added the contents of this directory aswell.
I would also like to mention that I can also reproduce this under RedHat 5 and 6...
I think we're missing some files in the tarball: $ module load DOLFIN UFC(31):ERROR:105: Unable to locate a modulefile for 'UFC/2.0.5-goalf-1.1.0-no-OFED' FFC(38):ERROR:105: Unable to locate a modulefile for 'FFC/1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3' These are empty: $ ls /export/home/orion/easybuild/modules/all/UFC/ $ ls /export/home/orion/easybuild/modules/all/FFC $
I seem to have removed some of my modules, and was unable to recreate the issue. Until it reoccured again today. I have here a set of modulefiles which recreate this segfault: http://users.ugent.be/~kehoste/modules.tar.gz How to reproduce: $ cd /tmp $ wget http://users.ugent.be/~kehoste/modules.tar.gz $ tar xf modules.tar.gz $ export MODULEPATH=$PWD/modules $ module load goalf $ modulecmd bash load PETSc Segmentation fault (core dumped) $ modulecmd -V VERSION=3.2.9 DATE=2011-11-24 AUTOLOADPATH=undef BASEPREFIX="/usr/share" BEGINENV=99 CACHE_AVAIL=undef DEF_COLLATE_BY_NUMBER=undef DOT_EXT="" EVAL_ALIAS=1 HAS_BOURNE_FUNCS=1 HAS_BOURNE_ALIAS=1 HAS_TCLXLIBS=undef HAS_X11LIBS=1 LMSPLIT_SIZE=1000 MODULEPATH="/etc/modulefiles" MODULES_INIT_DIR="/usr/share/Modules/init" PREFIX="/usr/share/Modules" TCL_VERSION="8.5" TCL_PATCH_LEVEL="8.5.11" TMP_DIR="/tmp" USE_FREE=undef VERSION_MAGIC=1 VERSIONPATH=undef WANTS_VERSIONING=0 WITH_DEBUG_INFO=undef
Note: I was looking into this together with Jens, and on my end the "module load goalf" is already failing, but then the PETSc loading works. So, new list of commands to try and reproduce this: $ cd /tmp $ wget http://users.ugent.be/~kehoste/modules.tar.gz $ tar xf modules.tar.gz $ export MODULEPATH=$PWD/modules $ modulecmd bash load goalf # if above command spits out output, and doesn't crash, then continue $ module load goalf $ modulecmd bash load PETSc Segmentation fault (core dumped) modulecmd -V gave the exact same output on my end as it did for Jens.
Here's a nice test case (same set of modules as before): $ export MODULEPATH=`pwd`/modules $ env | wc 51 59 3196 $ /usr/bin/modulecmd bash load goalf &> /dev/null Segmentation fault (core dumped) $ echo $? 139 $ unset module $ /usr/bin/modulecmd bash load goalf &> /dev/null $ echo $? 0 $ env | wc 49 52 3081 'module' is just a bash function wrapper for modulecmd, i.e. module uses modulecmd, not the other way around (output below if before the unset, of course): $ type module module is a function module () { eval `/usr/bin/modulecmd bash $*` } So, by only changed the environment, the problem suddenly disappears. This may be the reason why the problem for Jens occurs differently, i.e. he has a different environment (size). Note: I'm using Fedora 16, Jens is using Fedora 17, but we've also seen this on SL5 and SL6 systems. I've attached the modules.tar.gz file to this ticket for easy access.
Created attachment 606560 [details] set of modules to reproduce problem
I've been spending some more time on this, and have made some progress. Seems like this is not a bug in environment modules, but rather it Tcl on which it supports. Below is a valgrind memcheck trace on a self-compiled modulecmd 3.5.9c and Tcl 8.5.12 (same issue occurs with the system modulecmd, I needed to self-built ones to get full debug info). Seems like this is a memory corruption issue in Tcl; I'll try and come up with a patch that solves this. ==28152== Invalid write of size 8 ==28152== at 0x4D08239: Tcl_RegExpExec (tclRegexp.c:195) ==28152== by 0x41820A: ReturnValue (utility.c:3076) ==28152== by 0x40BE7A: Execute_TclFile (cmdModule.c:612) ==28152== by 0x40BC7C: Read_Modulefile (cmdModule.c:493) ==28152== by 0x406324: ModuleCmd_Load (ModuleCmd_Load.c:217) ==28152== by 0x40AEEF: cmdModule (cmdModule.c:217) ==28152== by 0x4C43E1D: TclInvokeStringCommand (tclBasic.c:2158) ==28152== by 0x4C45EB3: TclEvalObjvInternal (tclBasic.c:3706) ==28152== by 0x4CABE2C: TclExecuteByteCode (tclExecute.c:2416) ==28152== by 0x4CA9F52: TclCompEvalObj (tclExecute.c:1538) ==28152== by 0x4C48315: TclEvalObjEx (tclBasic.c:5275) ==28152== by 0x4C55DBD: Tcl_IfObjCmd (tclCmdIL.c:268) ==28152== Address 0x50f07b0 is 64 bytes inside a block of size 120 free'd ==28152== at 0x4A0662E: free (vg_replace_malloc.c:366) ==28152== by 0x4C41497: TclpFree (tclAlloc.c:723) ==28152== by 0x4C4DC75: Tcl_Free (tclCkalloc.c:1217) ==28152== by 0x4D09163: FreeRegexp (tclRegexp.c:1022) ==28152== by 0x4D08F62: CompileRegexp (tclRegexp.c:978) ==28152== by 0x4D081D9: Tcl_RegExpCompile (tclRegexp.c:140) ==28152== by 0x40C9E7: cmdSetPath (cmdPath.c:264) ==28152== by 0x4C43E1D: TclInvokeStringCommand (tclBasic.c:2158) ==28152== by 0x4C45EB3: TclEvalObjvInternal (tclBasic.c:3706) ==28152== by 0x4C472F8: TclEvalEx (tclBasic.c:4405) ==28152== by 0x4C466F4: Tcl_EvalEx (tclBasic.c:4062) ==28152== by 0x4C47E29: Tcl_Eval (tclBasic.c:4977)
Created attachment 606842 [details] patch for fixing modulecmd segfaults
The attached patch for the environment modules package solved the issue. The problem is that the ReturnValue function in utility.c only requested the compilation of Tcl regexps once; once it had a pointer (in a static variable) to a compiled regexp, it kept using that same pointer. However, Tcl keeps track of a cache of compiled regexps, and when pushing out regexps as the cache is filling up. When a regexp used in ReturnValue gets pushed out, the object is freed, but ReturnValue is holding onto the pointer. This causes the segfault in the end. The solution is simple: ReturnValue just needs to ask Tcl again to compile the regexp, so it's kept in the cache (or recompiled if really needed). It shouldn't try to be smart, Tcl takes care of that (i.e. it pushing already compiled regexps to the top of the cache itself). Patch tested with modules v3.2.9c and Tcl 5.8.12 (latest available versions).
I can confirm that after applying this patch the segfaults no longer occur.
Excellent! Thanks for all the work on this. I'll get an update out shortly.
environment-modules-3.2.9c-4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/environment-modules-3.2.9c-4.fc17
environment-modules-3.2.9c-4.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/environment-modules-3.2.9c-4.fc16
environment-modules-3.2.9c-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/environment-modules-3.2.9c-4.fc18
Package environment-modules-3.2.9c-4.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing environment-modules-3.2.9c-4.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-12637/environment-modules-3.2.9c-4.fc18 then log in and leave karma (feedback).
environment-modules-3.2.9c-4.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
environment-modules-3.2.9c-4.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
environment-modules-3.2.9c-4.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.