Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Oct 1999 06:21:55 +0800 (WST)
From:      Michael Kennett <mike@laurasia.com.au>
To:        guido@gvr.org (Guido van Rooij)
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: make buildworld broken?
Message-ID:  <199910042221.GAA66415@laurasia.com.au>
In-Reply-To: <19991004232758.B39982@gvr.gvr.org> from Guido van Rooij at "Oct 4, 1999 11:27:58 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Guido,

> I have a 3.3.-stable system and somehow I cannot make buildworld
> a current tree.
> The porblem is:
> cc -c  -I/alt/usr/src/gnu/lib/libgcc/../../../contrib/egcs/gcc/config -I/alt/usr/src/gnu/lib/libgcc/../../../contrib/egcs/gcc -I. -fexceptions -DIN_GCC -I/usr/obj/alt/usr/src/tmp/usr/include -DL_mulsi3 -o _mulsi3.o /alt/usr/src/gnu/lib/libgcc/../../../contrib/egcs/gcc/libgcc1.c
> *** Signal 12

There have been some major changes in the '-current' tree allowing more than
32 signals. These changes were documented (very well) in a 'HEADS-UP' by
Marcel when he committed his changes.

I've included that HEADS-UP for your reference below. There is a long
thread of discussions on -current about these changes. Check the archives
for details. In particular, you'll find that it is necessary to build
the kernel and *BOOT* the new kernel before a make world. There is continuing
work being done on these changes. 

> This system has been running and compilig a lot of other FreeBSD versions
> in the last 3 years, and has never had any memory problems at all.

It is not a memory problem. It is a change in the signalling mechanism of
the kernel.

> Is this a known problem?

Yes, and it is well documented in the -current mailing lists.

Mike Kennett
(mike@laurasia.com.au)


-----Included:

To: current@FreeBSD.ORG
Date: Wed, 29 Sep 1999 17:29:40 +0200
From: Marcel Moolenaar <marcel@scc.nl>
Message-ID: <37F23064.98EEBC67@scc.nl>
Subject: HEADS UP: sigset_t changes committed
Sender: owner-freebsd-current@FreeBSD.ORG

I just finished committing the sigset_t changes I worked on for the last
5 weeks.

Before attempting to build world, you must make and install a new
kernel. The new kernel will contain new syscalls that are needed during
build world. doscmd is currently not being build because it needs fixing
first.

Alpha users are invited to test the changes since I've not been able to
do that myself. I've done all I possibly could do to make this a
success.

I've attached the commit logs for everyone to see. Please report
problems as soon as possible.

Thanks,

sigset_t change (part 1 of 5)
-----------------------------

Rename sigaction, sigprocmask, sigpending and sigsuspend to
osigaction, osigprocmask, osigpending and osigsuspend (resp)
and add new syscalls for them to support the new sisgset_t
without breaking existing binaries.

Change the prototype of sigaltstack to use the typedef stack_t
instead of struct sigaltstack to reflect that it is SUSv2
compliant.

Also, rename sigreturn to osigreturn and add a new syscall
to support the modified stackframe. The change is caused by
sigreturn operating on ucontext_t now and the fact that
siginfo_t has been updated to conform to SUSv2.

sigset_t change (part 2 of 5)
-----------------------------

The core of the signalling code has been rewritten to operate
on the new sigset_t. No methodological changes have been made.
Most references to a sigset_t object are through macros (see
signalvar.h) to create a level of abstraction and to provide
a basis for further improvements.

The NSIG constant has not been changed to reflect the maximum
number of signals possible. The reason is that it breaks
programs (especially shells) which assume that all signals
have a non-null name in sys_signame. See src/bin/sh/trap.c
for an example. Instead _SIG_MAXSIG has been introduced to
hold the maximum signal possible with the new sigset_t.

struct sigprop has been moved from signalvar.h to kern_sig.c
because a) it is only used there, and b) access must be done
though function sigprop(). The latter because the table doesn't
holds properties for all signals, but only for the first NSIG
signals.

signal.h has been reorganized to make reading easier and to
add the new and/or modified structures. The "old" structures
are moved to signalvar.h to prevent namespace polution.

Especially the coda filesystem suffers from the change, because
it contained lines like (p->p_sigmask == SIGIO), which is easy
to do for integral types, but not for compound types.

NOTE: kdump (and port linux_kdump) must be recompiled.

Thanks to Garrett Wollman and Daniel Eischen for pressing the
importance of changing sigreturn as well.

sigset_t change (part 3 of 5)
-----------------------------

By introducing a new sigframe so that the signal handler operates
on the new siginfo_t and on ucontext_t instead of sigcontext, we
now need two version of sendsig and sigreturn.

A flag in struct proc determines whether the process expects an
old sigframe or a new sigframe. The signal trampoline handles
which sigreturn to call. It does this by testing for a magic
cookie in the frame.

The alpha uses osigreturn to implement longjmp. This means that
osigreturn is not only used for compatibility with existing
binaries. To handle the new sigset_t, setjmp saves it in
sc_reserved (see NOTE).

the struct sigframe has been moved from frame.h to sigframe.h
to handle the complex header dependencies that was caused by
the new sigframe.

NOTE: For the i386, the size of jmp_buf has been increased to hold
      the new sigset_t. On the alpha this has been prevented by
      using sc_reserved in sigcontext.

sigset_t change (part 4 of 5)
-----------------------------

The compatibility code and/or emulators have been updated:

iBCS2 now mostly uses the older syscalls. SVR4 now properly
handles all signals. This has been achieved by using the
new sigset_t throughout the emulator. The Linuxulator has
been severely updated. Internally the new Linux sigset_t is
made the default. These are then mapped to and from the
new FreeBSD sigset_t.

Also, rt_sigsuspend has been implemented in the Linuxulator.
Implementing this syscall basicly caused all this sigset_t
changing in the first place and the syscall has been used
throughout the change as a means for testing. It basicly is
too much work to undo the implementation so that it can
later be added again.

A special note on the use of sv_sigtbl and sv_sigsize in
struct sysentvec:
Every signal larger than sv_sigsize is not translated and is
passed on to the signal handler unmodified. Signals in the
range 1 upto and including sv_sigsize are translated.
The rationale is that only the system defined signals need to
be translated.

The emulators also have been updated so that the translation
tables are only indexed for valid (system defined) signals.
This change also fixes the translation bug already in the
SVR4 emulator.

sigset_t change (part 5 of 5)
-----------------------------

Most of the userland changes are in libc. For both the alpha
and the i386 setjmp has been changed to accomodate for the
new sigset_t. Internally, libc is mostly rewritten to use the
new syscalls. The exception is in compat-43/sigcompat.c

The POSIX thread library has also been rewritten to use the
new sigset_t. Except, that it currently only handles NSIG
signals instead of the maximum _SIG_MAXSIG. This should not
be a problem because current applications don't use any
signals higher than NSIG.

There are version bumps for the following libraries:
  libdialog
  libreadline
  libc
  libc_r
  libedit
  libftpio
  libss

These libraries either a) have one of the modified structures
visible in the interface, or b) use sigset_t internally and
may cause breakage if new binaries are used against libraries
that don't have the sigset_t change. This not an immediate
issue, but will be as soon as applications start using the
new range to its fullest.

NOTE: libncurses already had an version bump and has not been
      given one now.

NOTE: doscmd is a real casualty and has been disconnected for
      the moment. Reconnection will eventually happen after
      doscmd has been fixed. I'm aware that being the last one
      to touch it, I'm automaticly promoted to being maintainer.
      According to good taste this means that I will receive a
      badge which either will be glued or mechanically stapled,
      drilled or otherwise violently forced onto me :-)

NOTE: pcvt/vttest cannot be compiled with -traditional. The
      change cause sys/types to be included along the way which
      contains the const and volatile modifiers. I don't consider
      this a solution, but more a workaround.

-- 
Marcel Moolenaar                        mailto:marcel@scc.nl
SCC Internetworking & Databases           http://www.scc.nl/
The FreeBSD project                mailto:marcel@FreeBSD.org



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910042221.GAA66415>