#7652 closed bug (wontfix)

Testing freezes on FreeBSD 9.1.

Reported by: kazu-yamamoto Owned by: pgj
Priority: high Milestone: 7.8.1
Component: Compiler Version: 7.7
Keywords: Cc: pgj@…
Operating System: FreeBSD Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by simonmar)

"gmake THREADS=10 fast" in the testsuite/tests directory does not finish.

The following processes use CPU 100%:

  • 367_letnoesca
  • throwto001
  • Chan002
  • ghc-stage2 compiling conc070.hs

The following process is waiting for something forever:

  • signals004

Change History (10)

comment:1 Changed 15 months ago by simonmar

  • Description modified (diff)
  • Difficulty set to Unknown

367_letnoescape(llvm) is currently failing: #7297. It should fail by a timeout; if the timeout script is not working on FreeBSD that needs looking into.

throwto001 and Chan002 are worrying, they shouldn't hang.

ghc-stage2 compiling conc070.hs is probably conc070(ghci). It shouldn't fail either.

comment:2 Changed 15 months ago by pgj

  • Cc pgj@… added
  • Owner set to pgj

Take.

comment:3 Changed 15 months ago by kazu-yamamoto

It seems to me that "timeout.py" cannot receive SIGALM. Since I could not find an easy way to call "sigprocmask", I used timeout.hs instead and put "unblockSignals fullSignalSet". In this case, testing can finish.

comment:4 Changed 12 months ago by igloo

  • Milestone set to 7.8.1
  • Priority changed from normal to high

comment:5 Changed 12 months ago by pgj

It looks like the FreeBSD port of Python (lang/python27) differs from Linux in how it handles threads due to some changes in the run-time system, and this seems to be the problem here. So I found if I build lang/python27 with the (non-default) PTH option enabled then it works as expected, the testsuite finishes.

Please verify if this solves the problem for you.

comment:6 Changed 12 months ago by kazu-yamamoto

Thank you for your effort.

I have installed python 2.7 with pth. Unfortunately, "validate" stops when configuring the terminfo library:

% config_args="--prefix=/ghc-head --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-gcc=/usr/local/bin/gcc47 --with-gcc-4.2=/usr/local/bin/gcc47 --with-system-libffi  --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib" THREADS=10 sh validate
"inplace/bin/ghc-cabalghc-cabal" configure --with-ghc="/usr/local/bin/ghc" --wit
h-ghc-pkg="/usr/local/bin/ghc-pkg"  --package-db=/usr/home/kazu/work/ghc/librari
es/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disa
ble-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-sta
ck-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-o
ption=LDFLAGS=" -Wl,--hash-size=31 -Wl,--reduce-memory-overheads  " --configure-
option=CPPFLAGS="   " --configure-option=--with-iconv-includes="/usr/local/inclu
de" --configure-option=--with-iconv-libraries="/usr/local/lib" --configure-optio
n=--with-gmp-includes="/usr/local/include" --configure-option=--with-gmp-librari
es="/usr/local/lib"   --constraint "Cabal == 1.17.0"   --constraint "hpc == 0.6.
0.1"   --constraint "bin-package-db == 0.0.0.0"   --constraint "hoopl == 3.10.0.
0"   --constraint "transformers == 0.3.0.0"   --constraint "terminfo == 0.3.2.5"
 --with-gcc="cc" --configure-option=--with-cc="cc" --with-ar="/usr/bin/ar" --wit
h-ranlib="true" --with-alex="/usr/local/bin/alex" --with-happy="/usr/local/bin/h
appy" -- dist-boot libraries/terminfo
Configuring terminfo-0.3.2.5...
configure: WARNING: unrecognized options: --with-compiler, --with-iconv-includes
, --with-iconv-libraries, --with-gmp-includes, --with-gmp-libraries, --with-gcc
checking for gcc... cc
checking whether the C compiler works... no
configure: error: in `/usr/home/kazu/work/ghc/libraries/terminfo':
configure: error: C compiler cannot create executables
configure: error: in `/usr/home/kazu/work/ghc/libraries/terminfo':
configure: error: C compiler cannot create executables
See `config.log' for more details
gmake[1]: *** [libraries/terminfo/dist-boot/package-data.mk] Error 77
gmake: *** [all] Error 2

gcc47 is not inherited to terminfo. This is strange. Before DLL, these configuration options works fine to "validate".

Note that "build" works fine with these configuration options.

comment:7 follow-up: Changed 12 months ago by kazu-yamamoto

After commenting out of

SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable

in mk/validate-settings.mk, "validate" finished.

Thank you for letting me know this.

We should write an document about python on FreeBSD.

comment:8 in reply to: ↑ 7 Changed 12 months ago by pgj

Replying to kazu-yamamoto:

After commenting out of

SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable

in mk/validate-settings.mk, "validate" finished.

I am not sure that this is the right solution as gcc47 shall support this flag. I believe this is just a consequence of the problem you have mentioned here: gcc, i.e. the base compiler is invoked instead of gcc47. The base gcc does not support the flag as it is of version 4.2.1. Note that invoking cc is the same as invoking gcc (4.2.1).

By the way, you may want to try setting the CC environment variable to /usr/local/bin/gcc47 as well.

We should write an document about python on FreeBSD.

I have tracked down the source of the problem: it turned out the aforementioned modification for the run-time system is not needed so if you just remove the associated patch and rebuild your lang/python27 port without PTH everything shall just work.

I am hoping to see this issue fixed in the Ports Collection so users will not be affected by this any more. However, I can mention this in the FreeBSD Building Guide.

comment:9 Changed 12 months ago by kazu-yamamoto

I confirmed that after removing files/patch-Python_threadpthread.h, python 2.7 without pth can finish "validate".

I think we can close this issue.

comment:10 Changed 12 months ago by pgj

  • Resolution set to wontfix
  • Status changed from new to closed

Close the ticket per the submitter's request.

Note: See TracTickets for help on using tickets.