Synth 1.66_1 suspends and fails on port lang/sbcl

I was doing an upgrade with Synth when i noticed that it suspended out of the ncurses menu unexpectedly before the upgrade finished. My system is 11-stable in a VM with synth version 1.66_1. The port that seems to cause synth to fail and suspend is lang/sbcl.

Is this an issue for anyone else?

I can reproduce it with Synth 1.66_1 when I run the command:

synth install lang/sbcl

The synth process suspends and is still running in the background as well. I cannot restart synth either as it tells me "Synth is already running on this system"
 
was doing an upgrade with Synth when i noticed that it suspended out of the ncurses menu unexpectedly before the upgrade finished. My system is 11-stable in a VM with synth version 1.66_1. The port that seems to cause synth to fail and suspend is lang/sbcl.
I'm unable to understand what you mean by "suspended out". Can you post a screenshot ?

How much ram was assigned to your virtual machine ? How many cores are assigned to the VM ?
How is configured synth ? (number or builders ?, use of tmpfs ?)
 
I've never experienced that before. And although the creator of Synth recommends you not do a CTRL-C, (in fact CTRL-Q to use instead was specifically made) I had done it a couple times and it indeeds kill synth. My point is when you rerun Synth it will display a message something like "previous builder mounts detecting, clearing). Your issue sounds very different. Maybe a bug. If the machine appears stalled, it may very will be a cpu intensive build making it look like synth is suspended. But you seem to be saying that synth is 'jumping' out of using ncurses, but still running.

Yeah screenshot would be good.
 
At the moment the amount of ram I am giving the virtual machine is 8GB and there are 4 cores assigned to the VM.

Here is the synth configure and I have attached a screenshot of the terminal. As you can see it exits to the command line and lists suspended (tty output). On top right of the synth terminal window it says suspended with the (tty output) on the left of the terminal and my command prompt displayed in the middle.
Code:
[noparse]
Synth configuration profile: LiveSystem
===============================================================================
   [A] Ports directory            /usr/ports
   [B] Packages directory         /var/synth/live_packages
   [C] Distfiles directory        /usr/ports/distfiles
   [D] Port options directory     /var/db/ports
   [E] Build logs directory       /var/log/synth
   [F] Build base directory       /usr/obj/synth-live
   [G] System root directory      /
   [H] Compiler cache directory   disabled
   [I] Num. concurrent builders   3
   [J] Max. jobs per builder      3
   [K] Use tmpfs for work area    true
   [L] Use tmpfs for localbase    true
   [M] Display using ncurses      true
   [N] Fetch prebuilt packages    false

   [>]   Switch/create profiles
   [RET] Exit
[/noparse]

This is the build log in /var/log/synth of lang___sbcl.log:
Code:
=> Building lang/sbcl
Started : Sunday, 22 JAN 2017 at 00:21:34 UTC
Platform: 11.0-STABLE FreeBSD 11.0-STABLE #0 r312287: Mon Jan 16 05:35:06 EST 2017     root@alto:/usr/obj/usr/src/sys/GENERIC  amd64


--------------------------------------------------
--  Environment
--------------------------------------------------
UNAME_r=11.0-SYNTH
UNAME_m=amd64
UNAME_p=amd64
UNAME_v=FreeBSD 11.0-SYNTH
UNAME_s=FreeBSD
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
SSL_NO_VERIFY_PEER=1
TERM=dumb
PKG_CACHEDIR=/var/cache/pkg8
PKG_DBDIR=/var/db/pkg8
PORTSDIR=/xports
LANG=C
HOME=/root
USER=root



--------------------------------------------------
--  Options
--------------------------------------------------
===> The following configuration options are available for sbcl-1.3.13,1:
     DOCS=on: Build and/or install documentation
     QSHOW=off: C runtime with low-level debugging output
     RENAME=off: Rename suffix .core to _core
     SAFEPOINT=off: Using safepoints instead of signals
     THREADS=off: Threading support
     UNICODE=on: Unicode support
     XREF=off: XREF data for SBCL internals
     ZLIB=off: zlib compression support
====> Supported languages of the build host: you have to select exactly one of them
     CCL=on: Clozure Common Lisp
     SBCL=off: Steel Bank Common Lisp
===> Use 'make config' to modify these settings



--------------------------------------------------
--  CONFIGURE_ENV
--------------------------------------------------
MAKE=gmake
XDG_DATA_HOME=/construction/xports/lang/sbcl/work
XDG_CONFIG_HOME=/construction/xports/lang/sbcl/work
HOME=/construction/xports/lang/sbcl/work
TMPDIR="/tmp"
SHELL=/bin/sh
CONFIG_SHELL=/bin/sh



--------------------------------------------------
--  CONFIGURE_ARGS
--------------------------------------------------




--------------------------------------------------
--  MAKE_ENV
--------------------------------------------------
XDG_DATA_HOME=/construction/xports/lang/sbcl/work
XDG_CONFIG_HOME=/construction/xports/lang/sbcl/work
HOME=/construction/xports/lang/sbcl/work
TMPDIR="/tmp"
NO_PIE=yes
MK_DEBUG_FILES=no
MK_KERNEL_SYMBOLS=no
SHELL=/bin/sh
NO_LINT=YES
PREFIX=/usr/local
LOCALBASE=/usr/local
LIBDIR="/usr/lib"
CC="cc"
CFLAGS="-O2 -pipe  -fstack-protector -fno-strict-aliasing"
CPP="cpp"
CPPFLAGS=""
LDFLAGS=" -fstack-protector"
LIBS=""
CXX="c++"
CXXFLAGS="-O2 -pipe -fstack-protector -fno-strict-aliasing "
MANPREFIX="/usr/local"
BSD_INSTALL_PROGRAM="install  -s -m 555"
BSD_INSTALL_LIB="install  -s -m 444"
BSD_INSTALL_SCRIPT="install  -m 555"
BSD_INSTALL_DATA="install  -m 0644"
BSD_INSTALL_MAN="install  -m 444"



--------------------------------------------------
--  MAKE_ARGS
--------------------------------------------------
DESTDIR=/construction/xports/lang/sbcl/work/stage



--------------------------------------------------
--  PLIST_SUB
--------------------------------------------------
RENAME_DLM="."
OSREL=11.0
PREFIX=%D
LOCALBASE=/usr/local
RESETPREFIX=/usr/local
PORTDOCS=""
PORTEXAMPLES=""
LIB32DIR=lib
DOCSDIR="share/doc/sbcl"
EXAMPLESDIR="share/examples/sbcl"
DATADIR="share/sbcl"
WWWDIR="www/sbcl"
ETCDIR="etc/sbcl"



--------------------------------------------------
--  SUB_LIST
--------------------------------------------------
PREFIX=/usr/local
LOCALBASE=/usr/local
DATADIR=/usr/local/share/sbcl
DOCSDIR=/usr/local/share/doc/sbcl
EXAMPLESDIR=/usr/local/share/examples/sbcl
WWWDIR=/usr/local/www/sbcl
ETCDIR=/usr/local/etc/sbcl



--------------------------------------------------
--  /etc/make.conf
--------------------------------------------------
SYNTHPROFILE=LiveSystem
USE_PACKAGE_DEPENDS_ONLY=yes
PACKAGE_BUILDING=yes
BATCH=yes
PKG_CREATE_VERBOSE=yes
PORTSDIR=/xports
DISTDIR=/distfiles
WRKDIRPREFIX=/construction
PORT_DBDIR=/options
PACKAGES=/packages
MAKE_JOBS_NUMBER_LIMIT=3
HAVE_COMPAT_IA32_KERN=YES 
CONFIGURE_MAX_CMD_LEN=262144
_SMP_CPUS=4
UID=0
ARCH=amd64
OPSYS=FreeBSD
OSVERSION=1100509
OSREL=11.0
_OSRELEASE=11.0-SYNTH



--------------------------------------------------------------------------------
--  Phase: check-sanity
--------------------------------------------------------------------------------
===>  License sbcl accepted by the user



--------------------------------------------------------------------------------
--  Phase: pkg-depends
--------------------------------------------------------------------------------
===>   sbcl-1.3.13,1 depends on file: /usr/local/sbin/pkg - not found
===>   Installing existing package /packages/All/pkg-1.9.4_1.txz
Installing pkg-1.9.4_1...
Extracting pkg-1.9.4_1: .......... done
===>   sbcl-1.3.13,1 depends on file: /usr/local/sbin/pkg - found
===>   Returning to build of sbcl-1.3.13,1



--------------------------------------------------------------------------------
--  Phase: fetch-depends
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
--  Phase: fetch
--------------------------------------------------------------------------------
===>  License sbcl accepted by the user
===> Fetching all distfiles required by sbcl-1.3.13,1 for building



--------------------------------------------------------------------------------
--  Phase: checksum
--------------------------------------------------------------------------------
===>  License sbcl accepted by the user
===> Fetching all distfiles required by sbcl-1.3.13,1 for building
=> SHA256 Checksum OK for sbcl-1.3.13-source.tar.bz2.



--------------------------------------------------------------------------------
--  Phase: extract-depends
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
--  Phase: extract
--------------------------------------------------------------------------------
===>  License sbcl accepted by the user
===> Fetching all distfiles required by sbcl-1.3.13,1 for building
===>  Extracting for sbcl-1.3.13,1
=> SHA256 Checksum OK for sbcl-1.3.13-source.tar.bz2.



--------------------------------------------------------------------------------
--  Phase: patch-depends
--------------------------------------------------------------------------------



--------------------------------------------------------------------------------
--  Phase: patch
--------------------------------------------------------------------------------
===>  Patching for sbcl-1.3.13,1
===>  Applying FreeBSD patches for sbcl-1.3.13,1



--------------------------------------------------------------------------------
--  Phase: build-depends
--------------------------------------------------------------------------------
===>   sbcl-1.3.13,1 depends on executable: ccl - not found
===>   Installing existing package /packages/All/ccl-1.11.txz
Installing ccl-1.11...
`-- Installing cl-asdf-2.017,2...
`-- Extracting cl-asdf-2.017,2: ....... done
Extracting ccl-1.11: .......... done
Message from cl-asdf-2.017,2:
==========================================================================
To use asdf and depending ports, you will have to configure your
Lisp systems so they know where to find asdf itself and the system
definition files.

A default configuration is installed in

  /usr/local/etc/asdf-init.lisp

Review this file for further information, or simply load it from your
Lisp initialization file.
==========================================================================
Message from ccl-1.11:
You can permanently enable ASDF package management by using the
following commands in your .ccl-init.lisp file:

  (require 'asdf)
===>   sbcl-1.3.13,1 depends on executable: ccl - found
===>   Returning to build of sbcl-1.3.13,1
===>   sbcl-1.3.13,1 depends on executable: gmake - not found
===>   Installing existing package /packages/All/gmake-4.2.1_1.txz
Installing gmake-4.2.1_1...
`-- Installing indexinfo-0.2.6...
`-- Extracting indexinfo-0.2.6: .... done
`-- Installing gettext-runtime-0.19.8.1_1...
`-- Extracting gettext-runtime-0.19.8.1_1: .......... done
Extracting gmake-4.2.1_1: .......... done
===>   sbcl-1.3.13,1 depends on executable: gmake - found
===>   Returning to build of sbcl-1.3.13,1
===>   sbcl-1.3.13,1 depends on executable: makeinfo - not found
===>   Installing existing package /packages/All/texinfo-6.1.20160425,1.txz
Installing texinfo-6.1.20160425,1...
`-- Installing perl5-5.24.1...
`-- Extracting perl5-5.24.1: .......... done
Extracting texinfo-6.1.20160425,1: .......... done
Message from perl5-5.24.1:
The /usr/bin/perl symlink has been removed starting with Perl 5.20.
For shebangs, you should either use:

#!/usr/local/bin/perl

or

#!/usr/bin/env perl

The first one will only work if you have a /usr/local/bin/perl,
the second will work as long as perl is in PATH.
===>   sbcl-1.3.13,1 depends on executable: makeinfo - found
===>   Returning to build of sbcl-1.3.13,1



--------------------------------------------------------------------------------
--  Phase: lib-depends
--------------------------------------------------------------------------------
===>   sbcl-1.3.13,1 depends on shared library: libgmp.so - not found
===>   Installing existing package /packages/All/gmp-5.1.3_3.txz
Installing gmp-5.1.3_3...
Extracting gmp-5.1.3_3: .......... done
===>   sbcl-1.3.13,1 depends on shared library: libgmp.so - found (/usr/local/lib/libgmp.so)
===>   Returning to build of sbcl-1.3.13,1
===>   sbcl-1.3.13,1 depends on shared library: libmpfr.so - not found
===>   Installing existing package /packages/All/mpfr-3.1.5.txz
Installing mpfr-3.1.5...
Extracting mpfr-3.1.5: .......... done
===>   sbcl-1.3.13,1 depends on shared library: libmpfr.so - found (/usr/local/lib/libmpfr.so)
===>   Returning to build of sbcl-1.3.13,1



--------------------------------------------------------------------------------
--  Phase: configure
--------------------------------------------------------------------------------
===>  Configuring for sbcl-1.3.13,1



--------------------------------------------------------------------------------
--  Phase: build
--------------------------------------------------------------------------------
===>  Building for sbcl-1.3.13,1
(cd /construction/xports/lang/sbcl/work/sbcl-1.3.13 && /bin/sh make.sh --prefix="/usr/local"  --xc-host="ccl --no-init --batch --quiet" --without-sb-qshow --without-sb-safepoint --without-sb-thruption --without-sb-wtimer --without-sb-thread --without-restore-fs-segment-register-from-tls --with-sb-unicode --without-sb-xref-for-internals --without-sb-core-compression)
gmake[1]: Entering directory '/construction/xports/lang/sbcl/work/sbcl-1.3.13/doc/manual'
find: ../../obj/asdf-cache/sb-md5: No such file or directory
find: ../../obj/asdf-cache/sb-queue: No such file or directory
find: ../../obj/asdf-cache/sb-concurrency: No such file or directory
find: ../../obj/asdf-cache/sb-rotate-byte: No such file or directory
find: ../../obj/asdf-cache/sb-grovel: No such file or directory
find: ../../obj/asdf-cache/sb-sprof: No such file or directory
find: ../../obj/asdf-cache/sb-bsd-sockets: No such file or directory
find: ../../obj/asdf-cache/sb-cover: No such file or directory
find: ../../obj/asdf-cache/sb-posix: No such file or directory
rm -f *~ *.bak *.orig \#*\# .\#* texput.log *.fasl
rm -rf sbcl asdf version "docstrings/"
rm -f  sbcl.html asdf.html
rm -f contrib-docs.texi-temp
rm -f package-locks.texi-temp
rm -f variables.texinfo
rm -f sbcl.ps asdf.ps sbcl.pdf asdf.pdf html-stamp tempfiles-stamp
rm -f asdf.aux asdf.cp asdf.cps asdf.fn asdf.fns asdf.ky asdf.log asdf.pg asdf.toc asdf.tp asdf.tps asdf.vr asdf.vrs sbcl.aux sbcl.cp sbcl.cps sbcl.fn sbcl.fns sbcl.ky sbcl.log sbcl.pg sbcl.toc sbcl.tp sbcl.tps sbcl.vr sbcl.vrs 
rm -f sbcl.info sbcl.info-* asdf.info
gmake[1]: Leaving directory '/construction/xports/lang/sbcl/work/sbcl-1.3.13/doc/manual'
gmake[1]: Entering directory '/construction/xports/lang/sbcl/work/sbcl-1.3.13/doc/internals'
rm -rf *.include *.info *.pdf *~ *.cp *.fn *.ky *.log *.pg *.toc \
        *.tp *.vr *.aux *.eps *.png *.dvi *.ps *.txt *.fns \
        html-stamp sbcl-internals/
gmake[1]: Leaving directory '/construction/xports/lang/sbcl/work/sbcl-1.3.13/doc/internals'
//entering make-config.sh
//ensuring the existence of output/ directory
//guessing default target CPU architecture from host architecture
//setting up CPU-architecture-dependent information
sbcl_arch="x86-64"
//initializing /construction/xports/lang/sbcl/work/sbcl-1.3.13/local-target-features.lisp-expr
//setting up OS-dependent information
gmake[1]: Entering directory '/construction/xports/lang/sbcl/work/sbcl-1.3.13/tools-for-build'
cc -fno-omit-frame-pointer -I../src/runtime   determine-endianness.c   -lutil -o determine-endianness
gmake[1]: Leaving directory '/construction/xports/lang/sbcl/work/sbcl-1.3.13/tools-for-build'
//finishing /construction/xports/lang/sbcl/work/sbcl-1.3.13/local-target-features.lisp-expr
//Starting build: Mon Jan 23 00:21:42 UTC 2017
//Options: --prefix='/usr/local' --xc-host='ccl --no-init --batch --quiet'
WHITESPACE-P
CANONICALIZE-WHITESPACE
CANONICALIZE-WHITESPACE/FILE
*STAMP-FILE*
READ-STAMP-FILE
WRITE-STAMP-FILE
*SOURCE-TYPES*
*EXCEPTIONS*
CANONICALIZE-WHITESPACE/DIRECTORY
NIL
//entering make-host-1.sh
//building cross-compiler, and doing first genesis
#P"/construction/xports/lang/sbcl/work/sbcl-1.3.13/loader.lisp"
target features *SHEBANG-FEATURES*=
(:OS-PROVIDES-POLL :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-SUSECONDS-T :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-PUTWC :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :LITTLE-ENDIAN :SYMBOL-INFO-VOPS :ASH-RIGHT-VOPS :SB-SIMD-PACK :MULTIPLY-HIGH-VOPS :MEMORY-BARRIER-VOPS :INLINE-CONSTANTS :INTEGER-EQL-VOP :FLOAT-EQL-VOPS :RAW-SIGNED-WORD :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :ALIEN-CALLBACKS :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS :STACK-ALLOCATABLE-CLOSURES :UNBIND-N-VOP :FP-AND-PC-STANDARD-SAVE :PRECISE-ARG-COUNT-ERROR :RAW-INSTANCE-INIT-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP :COMPARE-AND-SWAP-VOPS :LINKAGE-TABLE :C-STACK-IS-CONTROL-STACK :STACK-GROWS-DOWNWARD-NOT-UPWARD :GENCGC :64-BIT-REGISTERS :64-BIT :GCC-TLS :FREEBSD :ELF :BSD :UNIX :X86-64 :SB-UNICODE :ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-EVAL :SB-SOURCE-LOCATIONS :PACKAGE-LOCAL-NICKNAMES :IEEE-FLOATING-POINT)
target backend-subfeatures *SHEBANG-BACKEND-FEATURES*=NIL
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/code/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/compiler/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/compiler/generic/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/compiler/x86-64/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/pcl/
//caught: parse-unknown COMPILED-FUNCTION
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/assembly/
Creating directory: /construction/xports/lang/sbcl/work/sbcl-1.3.13/obj/from-host/src/assembly/x86-64/

//slurp-ucd

143 
8843 
beginning GENESIS, creating headers in "src/runtime/genesis"
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
(can't portably mask float traps, proceeding anyway)
 

Attachments

  • Synth_suspended.png
    Synth_suspended.png
    35.3 KB · Views: 483
The synth creator recommends swap at 32G when using 8 GB of RAM. It uses tempfs and it can be memory intensive. https://forums.freebsd.org/threads/59107/ discusses the issue a bit--for me, in that thread, I found that it worked best for me if I limited parallel builds, but that doesn't seem to be the issue here.

I think that marino@ responds fairly quickly to posts in the giant synth thread (but appreciates specific problems being given their own thread), so you might mention this thread in that one. https://forums.freebsd.org/threads/54690/
 
I was able to replicate your problem, on my machine: what is happening here (and should not) is that a background process is trying to write some output on the controlling terminal, when that happens the tty driver send a SIGTTOU signal to synth which is effectively suspended.

The message "Suspended (tty output)" is printed on the screen at the current cursor position.

What's happening is something specific to that port lang/sbcl, most likely some unusual build procedure.

You can temporarily workaround the problem by disabling the ncurses interface using synth configure, you will be able to monitor the build progress by using the following link from a browser: file:///var/log/synth/Report/index.html
(I did it and the build succeeded).
Before doing that, be sure to kill the suspended instance of synth, even better simply reboot your VM.

Because I have no knowledge of Synth internals, I will leave at marino@ any further evaluation of the problem.
 
ASX has diagnosed it correctly. lang/sbcl was updated by a big jump on 15 January. You should immediately open a PR against it so that ler (the new maintainer) understands there is an unacceptable issue with the port now so he can fix it.
Until then, I can suggest these workarounds:
  1. Create a second, nearly identical profile to LiveSystem, which the only difference is that the curses display is disabled. Only use the second profile to build sbcl
  2. Run Synth inside screen or tmux and close the window so that tty is disconnected (and thus not broken)
  3. As ASX suggested, keep one profile but just never use the curses display (the web display still works)
I've seen the same thing happen when "you've got mail" is sent by the server. At the time, the only solution was to make sure that A) that user didn't get mail or B) turn off the "you've got mail" alert. I don't know how to avoid the signal completely. Maybe a specific signal handler?
 
I don't know how to avoid the signal completely. Maybe a specific signal handler?

A couple of notes:

- the signal SIGTTOU is controlled by a tty local flag and should not be sent when "-tostop" is set, see: stty(1)
tostop (-tostop)
Send (do not send) SIGTTOU for background output. This causes background jobs to stop if they attempt terminal output.
my consoles (both vt and my xfce4 terminal) by default are using "-tostop", but the signal is however delivered, that make me wonder if the tty driver is buggy for itself.

- a background process may send some output to the controlling terminal (thus triggering the signal) when its output is not redirected: as far as I can understand synth redirect the build output to a log file, and therefore that should not happen, but it does. Here I wonder if a different redirect might be used (stderr is also redirected ?) and/or how the build is started in background, or if the exec of a subprocess (builder) broke the output redirection.

- I think that synth could perform a call to signal(SIGTTOU, SIG_IGN) to ignore the signal SIGTTOU completely, please see signal(3), but I don't know Ada language ... so am unsure.
 
well, i think the signal affects the main process, not the builders.
For example, the "you've got mail" message from the background demon has the same effect; I think it's affecting the main thread.
Your last suggestion is the one that I was thinking about -- just handle the signal.
I'll have reproduce this before I can test a fix.
 
by the way, typing fg after the suspend message lets the sbcl build continue.

edit: spoke too soon, it fails again with "hangup" message.
 
FYI, this sbcl update is questionable. Before it used a previous binary version of sbcl to build itself, and the new maintainer removed that and now builds it with ccl.
This broke DragonFly so I'm advocating that the proper bootstrap method be returned (meaning use sbcl, not ccl to build sbcl)
 
well, i think the signal affects the main process, not the builders.
Of course yes, the signal suspend the main thread, but the competing output is coming from a background process (at least in the case of sbcl), that's why I would evaluate the output redirection of the builders.

For example, the "you've got mail" message from the background demon has the same effect; I think it's affecting the main thread.
I didn't know that before your post, and I'm inclined to think it should not happen. I will deal with the suspect tty "-tostop" issue myself, trying to replicate that outside of synth and I will open a PR for itself, if confirmed.
 
for full disclosure, I saw the "you've got mail" issue on DF. I've never seen it on FreeBSD (which is to be expected, I don't use Synth on FreeBSD that often).
 
So far no luck fixing this. sbcl failed on me with this at the end:
Code:
 (821C19F98) : 23 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 277
  NIL

  CCL::*CURRENT-LISP-THREAD*: #<LISP-THREAD listener [tcr @ #x80067C530] #x302000454DCD>
  CCL::INITIAL-FUNCTION: (#<Compiled-function # (Non-Global)  #x3000004ABE6F> #<TTY-LISTENER listener(1) [Active] #x3020004551BD> (#))
  CCL::TCR: 4295817382
  CCL::THREAD: #<LISP-THREAD listener [tcr @ #x80067C530] #x302000454DCD>

Version 1.11  (FreebsdX8664)
        1.52 real         1.45 user         0.05 sys
*** Error code 255

Stop.
make: stopped in /xports/lang/sbcl

So my suspicion that CCL is being a bad citizen seems to be on target. As long as CCL is being used, we should try to figure out how to disable this TTY listener thing during building.
 
Hmm, I've having more luck if I block both SIGTTIN and SIGTTOU. It may be SIGTTIN block is needed for CCL and SIGTTOU block needed for "you've got mail".
 
I will deal with the suspect tty "-tostop" issue myself, trying to replicate that outside of synth and I will open a PR for itself, if confirmed.
Made some quick test, and everything work as expected, e.g. the background job is suspended only if the tty flag is set to "tostop".
If the flag is set to "-tostop" (default), the ouput will overlap the curses window but no job will be suspended.

Interestingly enough, eventually it is the background job that is suspended (as it should), not the foreground one.
(I can post the test code if needed)

Hmm, I've having more luck if I block both SIGTTIN and SIGTTOU. It may be SIGTTIN block is needed for CCL and SIGTTOU block needed for "you've got mail".
Quite puzzled about that ... compared to my test results ... and because the failed sbcl build suspend message stated explicitly SIGTTOU.
 
well, let people test this out for a while:
Code:
--- ports-mgmt/synth/Makefile.orig      2017-01-23 13:33:40 UTC
+++ ports-mgmt/synth/Makefile
@@ -3,7 +3,7 @@

 PORTNAME=      synth
 PORTVERSION=   1.66
-PORTREVISION=  1
+PORTREVISION=  2
 DISTVERSIONPREFIX=     v
 CATEGORIES=    ports-mgmt

@@ -20,7 +20,7 @@ BUILD_DEPENDS=        ${LOCALBASE}/lib/libncurs
 USES=          ada:6
 USE_GITHUB=    yes
 GH_ACCOUNT=    jrmarino
-GH_TAGNAME=    4d9f5ea
+GH_TAGNAME=    541cd60

 GPR=           ${LOCALBASE}/lib/gnat
 MAKE_ENV=      NCURSES_LINK=static
--- ports-mgmt/synth/distinfo.orig      2017-01-20 03:40:53 UTC
+++ ports-mgmt/synth/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1484861755
-SHA256 (jrmarino-synth-v1.66-4d9f5ea_GH0.tar.gz) = 7b3eba1c84b9f10db9d82b61fd29d217d17edb5da51f747b07a4daf17214b56e
-SIZE (jrmarino-synth-v1.66-4d9f5ea_GH0.tar.gz) = 137605
+TIMESTAMP = 1485178455
+SHA256 (jrmarino-synth-v1.66-541cd60_GH0.tar.gz) = 2fb368a68384541eab4684e4cd8dbafe4fab911fdeb01d365333ec03c04bba61
+SIZE (jrmarino-synth-v1.66-541cd60_GH0.tar.gz) = 137936

basically patch the synth port and rebuild it. For a quick test on lang/sbcl on FreeBSD, it allowed the build.
 
I'll probably try to build a full set of packages on DF using this version before pushing it to ports, just to be sure there are no surprises with this update.
 
follow up: This version seems to work fine after extensive testing.
I pushed version 1.67 to ports, which also includes a minor change to the build order algorithm (all ports with nothing dependent on them are now built in alphabetical order, versus alphabetically by category but category was in in random order)
 
Back
Top