> From: Ron Minnich
> Why was it called glob? I always wondered.
Something about global expressions.
I recall reading about this somewhere; I tried looking in the man page:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/man/man7/glob.7
but it didn't go into any detail. I don't know where I could have seen it,
alas...
Noel
Probably no one here wants it, but I have a DR11-W UNIBUS board:
http://bitsavers.trailing-edge.com/pdf/dec/unibus/DR11W_UsersMan.pdf
It's basically a 16-bit DMA interface that can actually do 500Kw per
second (woo hoo! 1MB/sec!) to another DR11-W
Anyone need it? Want it?
Figured I'd try here first, in case we had some historic UNIX people
that were still running a UNIBUS PDP-11 (or VAX).
No takers in a few weeks, I'll try the museums next.
thanks
art k.
> From: Toby Thain
> Are we to infer that neither Noel and Clem are "good homes"?
Well, I said something like 'I don't have an immediate need for it, but I'd
be happy to take it', so I guess the question is 'does someone have an
actual, immediate use for it' (which I don't)?
Noel
Does anyone here remember the Adventure Shell?
Doug wrote it back in 83, and I just stumbled across a copy in an RCS directory.
Invoked as ‘ash’ it was pretty clever. I’ve lost the instructions and help files, however I’ve got the main script.
Back when people did weird things because it was fun.
David
> Browsing the source for "cc" in v6 and v7, if invoked with -2 would
> replace crt0.o with crt2.o. If the -2 were followed by another character
> (probably intended to be -20), it would use crt20.o and use -l2 instead
> of -lc.
>
> These options seem to be undocumented, and I can't find any source code
> of these libraries or indication as to what the purpose was.
The "scc" man page for System V may be enlightening, as it mentions
similarly-named files:
NAME
scc - C compiler for stand-alone programs
SYNOPSIS
scc [ +[ lib ] ] [ option ] ... [ file ] ...
DESCRIPTION
Scc prepares the named files for stand-alone execution.
[...]
FILES
/lib/crt2.o execution start-off
/usr/lib/lib2.a stand-alone library
/usr/lib/lib2A.a +A configuration library
/usr/lib/lib2B.a +B configuration library
-- Richard
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Hi,
two remarks on the issues around FPSIM and tcsh:
I of course wondered by a line like
mov $4..,r0
is accepted by 'as', I naively expected that this should cause an error.
I didn't locate the 211bsd 'as' manual, so checked 7th Edition manuals,
which can be found under
https://wolfram.schneider.org/bsd/7thEdManVol2/
The assembler manual, see
https://wolfram.schneider.org/bsd/7thEdManVol2/assembler/assembler.pdf
states
6.1 Expression operators
The operators are:
(blank) when there is no operand between operands,
the effect is exactly the same as if a
‘+’ had appeared.
So the lexer sees two tokens
$4. --> number
. --> symbol for location counter
and, because the default operator is '+', interprets this as
mov $4. + . , r0
which ends up being a number in the 160000 to 177777 range.
So 'as' is not to blame, works as designed.
Noel Chippa wrote:
> I'm fairly amazed that apparently nobody has run across one of these 4 before!
> (Or, at least, not bothered to report it.)
> I wonder how long that bug has been in the code?
The answer is: this bug was in 211bsd all the time.
Steven Schultz told me that that they simply didn't have a way to
test FPSIM because all machines had FPP, and the only way of testing
would have been to physically remove the FP11 from a 11/70.
With best regards, Walter
Browsing the source for "cc" in v6 and v7, if invoked with -2 would
replace crt0.o with crt2.o. If the -2 were followed by another character
(probably intended to be -20), it would use crt20.o and use -l2 instead
of -lc.
These options seem to be undocumented, and I can't find any source code
of these libraries or indication as to what the purpose was.
I was hoping someone on the list who remembers 'mhit.c' from
the Blit library code could shed some light on some members
of the 'NMitem' structure. I believe that 'mhit' (sometimes
'hmenunit') was written by Andrew Hume.
The structure in question is this:
typedef struct NMitem
{
char *text;
char *help;
struct NMenu *next;
void (*dfn)(), (*bfn)(), (*hfn)();
long data; /* user only */
} NMitem;
The three functions are called at different times when a menu
is being traversed, but 'dfn' and 'bfn' are only called before
a submenu is entered, and after a submenu is exited, respectively.
'hfn' is called whenever an item has been selected.
I have never seen 'dfn' and 'bfn' used in any Bell Labs code so
I was wondering what the rationale for their existence was.
Noel Hunt
Dear THUS list,
I am a recent lurker on this list, also a history and communication
scholar looking at pieces of Unix history for my research. I hope it is
okay if I share with you the news of a historical conference on Unix
that we are organizing in France next Fall with fellow humanities
scholars and computer scientists and engineers involved in the history
and heritage of computing and computers.
You are of course welcomed, even encouraged, to submit a proposal. It
will be a pleasure to meet you at this conference in any case.
Best,
Camille Paloque-Berges
***
Please find enclosed the CFP for the *international conference**"Unix in
Europe: between innovation, diffusion and heritage"* that will take
place in Cnam (Paris, France), October, 19th, 2017.
A one-page abstract (maximum 500 words) with a short biography is
expected for June 30th 2017.
The Cfp is also available at :
<http://technique-societe.cnam.fr/international-symposium-unix-in-europe-bet…>.
Best regards,
The organization comitee : Isabelle Astic, Raphaël Fournier-S'niehotta,
Pierre-Eric Mounier-Kuhn, Camille Paloque-Berges, Loïc Petitgirard
------------------------------------------------------------
*Call for contributions*
*International symposium *
*Unix in Europe: between innovation, diffusion and heritage*
*/Conservatoire National des Arts et Métiers, Paris, France –
October 19 2017/*
**
Communications and discussions will be held in French or English.
*
*
*Rationale*
*
*
**The Unix system was born in the 1970s at the crossroads between
two interacting worlds: industry (the Bell Labs at AT&T) and
academia (the University of Berkeley computer science network). Its
fast adoption throughout computer research and engineering networks
across the world signaled the future success of the new system,
fostering software experiments within its open, multi-user and
multi-tasking system running on mini-computers – and later
compatible with a larger part of computer hardware. In the European
context, how was this American innovation propagated, adopted and
adapted? Why was Unix of so much interest in this context, then and
now? A solid culture of Unix users might also explain this success,
as well as subsequent processes of appropriation and inheritance,
due to the long and complex history of Unix versioning. The memory
of Unix users is vivid indeed, fed by early accounts within the
computer world (Salus, 1994) as well as preservation initiatives
(Toomey, 2010). Moreover, the Unix system is a crucial reference in
the history of computing, in particular in the field of free and
open source software (Kelty, 2008), computer networks
(Paloque-Berges, 2017), as well as in programming language
philosophy (Mélès, 2013).
In order to explore the variety of these interrogations, this
symposium encourages contributions from historians as well as
philosophers, social science researchers, and heritage professionals
interested in the history of computer open systems and software with
a focus on Unix or who have a wider perspective. It will also
welcome protagonists and witnesses of Unix culture and carriers of
its memory. We wish to discuss and shed light on several aspects of
the development of Unix in Europe (including in comparison or
relation with the rest of the world) along three main lines:
historical and sociological, philosophical and epistemological, and
heritage- and preservation-oriented.
*1/ Historical and sociological perspectives*
*
*
Historically, the Unix system is linked to the promotion and
development in research on open systems and computer networks. How
does this fit in the context of industrial, scientific and
technological policies defined at the national and European level?
The history of Unix thus reaches at least three levels of
interrogations: 1/ the forms, places and practices of innovation
around Unix in R&D labs and computing centers in companies, schools
and universities; 2/ planning, promoting and negotiating open
systems (norms and standards) from the perspective of science and/or
politics; 3/ international geopolitical relations, whether
economical or geopolitical and even geostrategic (for example
between Unix users, with users of other computer equipment or other
hardware and software companies, the role of embargos in the
shipping of mini-computers, of code, and military uses of Unix).
In parallel, how has the world of computer research welcomed,
encouraged, negotiated and propagated uses and innovations related
to Unix systems? This begs the question of how Unix-related research
and development was legitimized - or played a part in the
legitimization of computer science experimentalism in the scientific
field and beyond. We would also like to highlight practices of
resistance, the failure to acknowledge, ignorance of or even the
limits of the Unix system, its software tools and hardware
environment (beginning with the famous PDP and Vax machines from
Digital Equipment where the first Unix versions were implemented).
With a focus on occupational computer uses, we call for analysis
which aims to explore and clarify:
- the role of developers, users, and user associations – from the
point of view of pioneers as well as helpers, maintainers and other
witnesses of the implementation of Unix;
- the context, process, and people who determined its propagation,
appropriation, and development over time;
- the meaning of concepts of Unix philosophy and ethics such as
“openness” and “autonomy”, from a social, political or economic
point of view.
*2. Philosophical and epistemological perspectives*
We will foster research and reflection at the crossroad of the
theoretical foundations of computer systems and engineering
pragmatism, between the philosophy of computer systems and Unixian
practices.
Protagonists in the conception and diffusion of Unix often claim to
have a ‘Unix philosophy’ . But beyond statement of principle, what
was the real influence of this idea on the technical choices
underlying the system’s developments? What are the ethical, moral,
and philosophical motivations – alongside the social, political or
economic dimensions discussed earlier – underpinning the adoption of
Unix or pretending to extend it (for instance in relation to the
notions of sharing, modularity or freedom)? How is the idea of
‘openness’ attached to Unix practices and heritage (free software,
open source) conceived? What are the theoretical developments to be
drawn from it (for instance with the idea of open software)?
The logical and mathematical foundations of Unix should be
readdressed. Do the fundamental concepts of Unix have an ontological
or metaphysical significance beyond the sole research aim of
technical efficiency? What role do aesthetics play in the
formulation of general principles and technical choices? How can we
analyze programming languages such as C and its successors, scripts,
software, and generally speaking, the proliferating source codes of
Unix? How do we consider the system, the software environment, as
well as the hardware in which Unix is implemented and executed?
Such philosophical questions also cover the modalities of the
transmission of Unix, extending to the investigation of the
respective roles of theory and practice in the teaching of the
system, the teaching of knowledge and tools underlying the system or
supporting the system.
*3. Unix heritage and ‘heritagization’*
**
France is now the home to multiple initiatives taking place to build
and preserve a material and immaterial heritage of computer science
and technology – such as ‘Software Heritage’ at INRIA, a global
software archive in progress. The Museum of Arts et Métiers gave
impetus to the MINF initiative (‘Pour un Musée de l’informatique et
du numérique’) and coordinates the ‘Patstec Mission’ dealing with
contemporary scientific and technological heritage preservation,
including computer science. At an international scale and with a
grassroots perspective carried by the community of Unix users, the
TUHS (The Unix Heritage Society) demonstrates the current interest
in the specific heritage linked to Unix. We encourage reflections on
this heritage and its specific features:
- What is the place of Unix in the construction of computer science
heritage? Is it possible to map Unix systems and their heritage,
from the standpoint of machines, languages and software? What has
already been collected? What corpus, data bases, and/or platforms
with a patrimonial mission are concerned with Unix and to what purpose?
- How are the questions of training, constitution and diffusion of a
Unix culture incorporated in the effort to collect heritage? How do
we evaluate and put forward the importance of immaterial heritage
attached to Unix, considering the effects of community and memory in
its history and for the writing of its history?
- What are the practices and modalities advocated by the unixian
heritage itself? What has been its influence on the field of
computer engineering and research as well as diverse fields such as:
popularization of science and technology, ‘hacker’ movements and
many ‘maker’ practices today (Lallement, 2016)?
*Schedules*
Please send a one-page abstract (maximum 500 words) with a short
biography by June 30, 2017 to: camille.paloque-berges(a)cnam.fr
<mailto:camille.paloque-berges@lecnam.net>and
loic.petitgirard(a)cnam.fr <mailto:loic.petitgirard@cnam.fr>. Accepted
contributions and speakers will be notified by July 15, 2017.
*Organizing committee*
Isabelle Astic (Musée des arts et métiers)
Raphaël Fournier-S’niehotta (Cédric, Cnam)
Pierre-Eric Mounier-Kuhn (CRM, Paris 1)
Camille Paloque-Berges (HT2S, Cnam)
Loïc Petitgirard (HT2S, Cnam)
*Scientific committee *
François Anceau (UMPC-LIP6)**
Pierre Cubaud (Cédric, Cnam)
Liesbeth de Mol (STL, Lille 3)
Claudine Fontanon (CAK, EHESS)
Gérald Kembellec (DICEN, Cnam)
Baptiste Mélès (Archives Henri Poincaré, CNRS)
Pierre Paradinas (Cédric, Cnam, SIF)
Giuseppe Primiero (Middlesex University)
Lionel Tabourier (LIP6, Paris 6)**
*Institutional partners and support: *
- Project « Hist.Pat.info.Cnam », HT2S, Cnam – Research program
supported by the Excellence laboratory History and Anthropology of
Knoweldge, Technics and Beliefs (HASTEC), and in partnership with
the laboratories CEDRIC (Cnam), DICEN (Cnam), and the Center
Alexandre Koyré (EHESS).
- « Histoire de l’informatique » (« History of computing » seminar)
seminar - (Musée des arts et métiers, CRM, Paris 1, UMPC-LIP6)
- « Source code » seminar - (CNRS, Cnam, Université Paris 6).
With support from the DHST/DLMPST for the History and Philosophy of
Computing (HAPOC)
*Bibliography *
Kelty, Christopher M. 2008. /Two Bits: The Cultural Significance of
Free Software/. Durham: Duke University Press Books.
Lallement, Michel. 2016. /L’âge du faire, /Seuil.
Mélès, Baptiste. 2003. « Unix selon l’ordre des raisons : la
philosophie de la pratique informatique ». /Philosophia Scientiæ/17
(3): 181‑98.
Salus, Peter H. 1994. /A quarter century of UNIX/. Addison-Wesley.
Reading.
Toomey, Warren. 2010. « First Edition Unix: Its Creation and
Restoration ». /IEEE Annals of the History of Computing/ 32 (3): 74‑82.
*
*
**
> From: "Walter F.J. Mueller"
> the kernel panic after tcsh here documents is understood.
Very nice detective work!
> The kernel panic is due to a coding error in mch_fpsim.s. ... After
> fixing the "$SIGILL." ... and three similar cases
I'm fairly amazed that apparently nobody has run across one of these 4 before!
(Or, at least, not bothered to report it.)
I wonder how long that bug has been in the code?
Noel
On 2017-06-11 04:00, "Walter F.J. Mueller" <w.f.j.mueller(a)retro11.de> wrote:
> Hi,
>
> the kernel panic after tcsh here documents is understood.
> And fixed, at least on my system.
Nice work. Looking forward to patch #250. And to respond to Noels remark
about this being around for a long time without reports - since this is
in FPSIM, and I believe the notes for 2.11BSD even says that this is an
untested piece of code, which are not even know if it works or not, it's
not something that have been used for ages. I'm in a way surprised it
even worked at all. I think I've seen somewhere that it was last tested
around 2.9BSD, and have not been officially tested since.
> The essential hint was Johnny's observation that on his system he gets
> an "Illegal instruction - core dumped" and no kernel panic.
Well, had I had FPP simulated, I would maybe not have gotten a kernel
panic anyway. It would all depend on where the address ended up. With my
current build, the kernel would have been able to read the address,
since it pointed into the boot diagnostics rom. So it's a dicey error at
best.
But the tcsh error was very good that you also figured out. And I guess
it means we now have a known working FPSIM. :-)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
> Who started this? Why was the change made?
Arrays in Fortran and Algol were indexed from 1 by default, but
Algol (IIRC) generalized that to allow first:last declarations.
NPL used first,last for the SUBSTR operation. But first,last
begets off-by-one errors. The successor slice begins at last+1.
The formula for the position of 1-indexed a[i,j] is a mess.
First,length is much cleaner: the successor begins at
first+length. I convinced the committee of that, so when
NPL became PL/I, first,length was the convention. Zero-
indexing is also a clean first,length notation. BCPL,
where a[i] was synonymous with rv(a+i), had it. Dennis, who
knew a good thing when he saw it, took it over. Dijkstra,
too, often inveighed against 1-indexing, and opined that
zero was the true computer-science way.
1-indexing certainly came into programming languages from
the math tradition for matrix notation. Of course in
math series are often indexed from zero, so one may
pick and choose. Off hand I can only think of one CS
context where 1 comes in handy: heapsort.
Doug
Hi,
the kernel panic after tcsh here documents is understood.
And fixed, at least on my system.
The essential hint was Johnny's observation that on his system he gets
an "Illegal instruction - core dumped" and no kernel panic.
I'm using a self-build PDP 11/70 on an FPGA, see
https://github.com/wfjm/w11/https://wfjm.github.io/home/w11/
which doesn't have a floating point unit. Therefore the kernel is build
with floating point emulation, thus with
FPSIM YES # floating point simulator
In a kernel with FPSIM activated the trap handler trap(), see
http://www.retro11.de/ouxr/211bsd/usr/src/sys/pdp/trap.c.html
calls for each user mode illegal instruction trap fpsim(). In case
it was a floating point instruction fpsim() emulates it, returns 0,
and trap() simply returns. If not, fpsim() returns the abort signal
type, and trap() calls psignal() with this signal type, which in
general will terminate the offending process.
The kernel panic is due to a coding error in mch_fpsim.s. Look in
http://www.retro11.de/ouxr/211bsd/usr/src/sys/pdp/mch_fpsim.s.html
the code after label badins:
badins: / Illegal Instruction
mov $SIGILL.,r0
br 2b
The constant SIGILL is defined in assym.h as
#define SIGILL 4.
Thus after substitution the mov instruction is
mov $4..,r0
with *two dots* !!! The 'as' assembler generates from this
mov #160750,r0
So r0 will contain a invalid signal number, which is returned by fpsim() to
trap(). This signal number is passed to psignal(), which starts with
mask = sigmask(sig);
prop = sigprop[sig];
The access to sigprop[sig] results into an address in IO space, causes an
UNIBUS timeout, and in consequence the kernel panic.
After fixing the "$SIGILL." to "$SIGILL" (removing the extraneous '.') and
three similar cases the kernel doesn't panic anymore, tcsh crashed with an
illegal instruction trap.
Remains the question why tcsh runs onto an illegal instruction. Getting now
a tcsh core dump adb gives the answer
adb tcsh tcsh.core
$c
0172774: _rscan(0176024,0174434) from ~heredoc+0246
0176040: _heredoc(067676) from ~execute+0234
0176126: _execute(067040,01512,0,0) from ~execute+03410
0176222: _execute(066754,01512,0,0) from ~process+01224
0176274: _process(01) from ~main+06030
0177414: _main() from start+0104
heredoc(), which is located in OV1, calls rscan(), which is in OV6 with
rscan(Dv, Dtestq);
where Dtestq is a function pointer to Dtestq(), which is as heredoc() in OV1.
rscan(), which has the signature
rscan(t, f)
register Char **t;
void (*f) ();
uses 'f' in the statement
(*f) (*p++);
The problem is that
- heredoc() and Dtestq() are in OV1
- that's why in the end ~Dtestq is used a function pointer, like
for all overlay internal function invocations
- rscan() is in OV6, when it's called, overlay is switched OV1 -> OV6
- this invalidates the function pointer, which points to some random
code location, which happens to hold '000045', causing a trap.
It is clear that in this context _Dtestq, the forwarder in the base, must
be used and not ~Dtestq, the entry point in the overlay. The generated
code for 'rscan(Dv, Dtestq)' is
~heredoc+0230: mov $0174434,(sp) # arg Dtestq: uses ~Dtestq
~heredoc+0234: mov r5,-(sp)
~heredoc+0236: add $0177764,(sp) # arg Dv
~heredoc+0242: jsr pc,*$_rscan
Since rscan() is very small and only used by heredoc() I simply moved the
code of rscan() from sh.glob.c (OV6) to sh.dol.c where also heredoc() and
Dtestq() is defined.
After that tcsh works fine with here documents
./tcsh
cat >x.x <<EOF
1
$TERM
$PWD
EOF
cat x.x
1
vt100-long
/usr/src/bin/tcsh
Bottom line
- fpsim was broken all the time
- tcsh was broken all the time
I'm convert this into proper patches and send them to Steven, but this will
take some time because I've to tidy up my system to be again in the
position to provide proper and clean patch sets.
With best regards, Walter
P.S.: debugging the kernel issue was quite easy because the w11a CPU has
three essential 'build into the cpu' debug tools:
- a 'cpu monitor', which records 144 bits of processor state for the last 256
instructions or vector fetches, see
https://github.com/wfjm/w11/blob/master/rtl/w11a/pdp11_dmcmon.vhd
- a 'breakpoint unit' which allows to set instruction of data breakpoints
- an 'ibus monitor' which records the last 512 ibus transactions
After setting a breakpoint on the trap 004/010 handler an inspection of the
instruction trace gave the essential information. Below a very condensed
and annotated excerpt
nc ....pc cprptnzvc ..dsrc ..ddst ..dres vmaddr vmdata
#
# the "(*f) (*p++)" in tcsh, running onto an illegal instruction
#
15 145210 uu00-.... 000105 173052 000105 w d 173052 000105 mov r0,(sp)
25 145212 uu00-.... 173050 174434 174434 w d 173050 145216 jsr pc,@n(r5)
19 174434 uu00-.... 000010 173064 000010 r i 174434 000045 ?000045?
1 174434 uu00-.... 000012 173064 000012 r d 000010 000045 !VFETCH 010 RIT
#
# the "mov $SIGILL.,r0" in fpsim(), load 160750 instead of 000004
#
17 160744 ku00-n..c 160750 000045 160750 r i 160746 160750 mov #n,r0
14 160750 ku00-n..c 160752 160750 160732 r i 160750 000770 br .-14
#
# the "sigprop[sig]" access in psignal(), which accesses 174036
# which leads to a external bus (or UNIBUS) time out and IIT trap
#
23 161314 ku00-.z.. 000000 147500 000000 w d 147500 000000 mov r1,n(r5)
9 161320 ku00-.z.. 174036 000000 000000 Ebto 174036 013066 movb n(r3),r0
3 161320 ku00-.z.. 000006 000000 000006 r d 000004 013066 !VFETCH 004 IIT
Arnold gets it right on the Pascal indexing.
In UCSD Pascal you could specify any array bounds you would like and
the compiler would 0 base them for you by always doing a subtraction,
or addition if your min was negative, of your min array index. So a little
run time cost for non-zero based arrays.
I’m not sure how other Pascal compilers did this.
I find it interesting that there are now a slew of testing programs
(Valgrind, Address Sanitizer, Purify, etc) that will add the ‘missing’
array bounds checking for C.
David
> On Jun 7, 2017, at 10:01 AM, tuhs-request(a)minnie.tuhs.org wrote:
>
> Date: Wed, 07 Jun 2017 07:20:43 -0600
> From: arnold(a)skeeve.com
> To: tuhs(a)tuhs.org, ag4ve.us(a)gmail.com
> Subject: Re: [TUHS] Array index history
> Message-ID: <201706071320.v57DKhmJ026303(a)freefriends.org>
> Content-Type: text/plain; charset=us-ascii
>
> Pascal (IIRC) allowed you to specify upper and lower bounds, something
> like
>
> foo : array[5..10] of integer;
>
> with runtime bounds checking on array accesses. (I could be wrong ---
> it's been a LLLLOOONNNGGG time.)
>
> HTH,
>
> Arnold
On 2017-06-07 19:01, "Ron Natalie"<ron(a)ronnatalie.com> wrote:
> The original FORTRAN and BASIC arrays started indexing at one because everybody other than computer scientists start counting at 1.
FORTRAN, yes. BASIC (which dialect might we be talking about?) normally
actually start with 0. However, BASIC is weird, in that the DIM
statement is actually specifying the highest usable index, and not the
size of the array.
Thus:
DIM X(10)
means you get an array with 11 elements. So, people who wanted to use
array starting at 1 would still be happy, and if you wanted to start at
0, that also worked. You might unintentionally have a bit of wasted
memory, though.
> These languages were for scientists and the beginner, so you wanted to make things compatible with their normal concepts.
True.
> PASCAL on the other hand required you to give the minimum and maximum index for the array.
In a way, PASCAL makes the most sense. You still what range you want,
and you get that. Anything works, and it's up to you.
That said, PASCAL could get a bit ugly when passing arrays as arguments
to functions because of this.
> Of course, C’s half-assaed implementation of arrays kind of depends on zero-indexing to work.
:-)
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
On 2017-06-07 22:14, "Walter F.J. Mueller"<w.f.j.mueller(a)retro11.de> wrote:
> Hi,
>
> a few remarks on the feedback on the kernel panic after a 'here document' in tcsh.
>
> To Michael Kjörling question:
> > I'm curious whether the same thing happens if you try that in some
> > other shell? (Not sure how widely here documents were supported back
> > then, but I'm asking anyway.)
> And Johnny Billquist remark
> > Not sure if any of the other shells have this.
>
> 'here documents' are available and work fine in sh and csh.
> And are in fact used, examples
Ah. Thanks. Too lazy to check.
> To Michael Kjörling remark
> > The PC value in the panic report ("pc 161324") strikes me as high
> and Johnny Billquist remark
> > This is in kernel mode, and that is in the I/O page.
>
> 211bsd uses split I/D space and uses all 64 kB I space for code.
D'oh! Color me stupid. I should have thought of that.
> The top 8 kB are in fact the overlay area, and the crash happened
> in overlay 4 (as indicated by ov 4). With a simple
>
> nm /unix | sort | grep " 4"
>
> one gets
>
> 161254 t ~psignal 4
> 162302 t ~issignal 4
>
> so the crash is just 050 bytes after the entry point of psignal. So the
> PC address is fine and not the problem. For psignal look at
>
> http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#s:_psignal
>
> the crash must be one of the first lines. psignal is an internal kernel
> function, called from
>
> http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#xref:s:_p…
>
> and has nothing to do with the libc function psignal
>
> http://www.retro11.de/ouxr/211bsd/usr/man/cat3/psignal.0.html
> http://www.retro11.de/ouxr/211bsd/usr/src/lib/libc/gen/psignal.c.html
The libc function would be in user mode, so that one was pretty clear.
Ok. Digging through this a little for real then.
psignal gets called with a signal from the trap handler. The actual
signal is weird. It would appear to be 0160750, which would be -7704 if
I'm counting right. That does not make sense as a signal.
The psignal code pulls a value based on the signal number, which is the
line:
prop = sigprop[sig];
which uses the signal number as an index. With a random, weird signal
number, this access wherever that might end up. Which is when you get
the crash.
On my system, sigprop is at address 0012172, which, with a signal of
-7704 ends up at address 0173142, which by (un)luck happens to be in the
middle of the diagnostics bootstrap rom space. So I don't get a Unibus
timeout error, while you do. Probably because sigprop is at a slightly
different address in your kernel.
So, the real question is how trap can be calling psignal with such a
broken signal number.
I might dig further down that question another day. But unless you
already got this far, I might have saved you a few minutes of digging. I
did start looking into the trap code, which is in pdp/trap.c, but this
is not entirely straight forward. It goes through a bunch of things
trying to decide what signal to send, before actually calling psignal.
> To Johnny Billquist remark
> > Could you (Walter) try the latest version of 2.11BSD and see if you
> > still get that crash?
>
> very interesting that you see a core dump of tcsh rather a kernel panic.
Indeed.
> Whatever tcsh does, it should not lead to a kernel panic, and if it does,
> it is primarily a bug of the kernel. It looks like there are two issues,
> one in tcsh, and one in the kernel. I've a hunch were this might come from,
> but that will take a weekend or two to check on.
Agree that the kernel should not crash on this.
Also, tcsh should not really crash either, but it's a separate issue,
even though one might have triggered the other here.
But yes, there are two bugs in here.
If you can recreate the kernel crash on the latest version, that would
be good.
But it smells like trap.c have some path where it does not even set what
signal to deliver, and then calls psignal with whatever the variable i
got at the function start. Which would be some random stuff on the stack.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
On 2017-06-08 22:17, Dave Horsfall<dave(a)horsfall.org> wrote:
>
> Just to diverge from this thread a little, it probably isn't all that
> remarkable that programming languages tend to reflect the hardware for
> which they were designed.
>
> Thus, for example, we have the C construct:
>
> do { ... } while (--i);
>
> which translated right into the PDP-11's "SOB" instruction (and
> reminiscent of FORTRAN's insistence that DO loops are run at least once
> (there was a CACM article about that once; anyone have a pointer to it?)).
>
> And of course the afore-mentioned FORTRAN, which really reflects the
> underlying IBM 70x architecture (shudder).
FORTRAN stopped running the loops at least once already with FORTRAN 77.
The last who insisted on running loops at least once was FORTRAN IV.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
I learned the other day that array indexes in some languages start at 1
instead of 0. This seems to be an old trend that changed around the 70s?
Who started this? Why was the change made?
It seems to have come about around the same time as C, but interestingly
enough Lua is kinda in between (you can start an array at 0 or 1).
Smalltalk can probably have a 0 base index just by it's nature, but I
wonder whether that would work in a 40 year old interpreter.
> Basically, until C came along, the standard practice was for indices
> to start at 1. Certainly Fortran and Pascal did it that way.
Mercury Autocode used 0.
http://www.homepages.ed.ac.uk/jwp/history/mercury/manual/autocode/4.jpg
-- Richard
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Hi,
a few remarks on the feedback on the kernel panic after a 'here document' in tcsh.
To Michael Kjörling question:
> I'm curious whether the same thing happens if you try that in some
> other shell? (Not sure how widely here documents were supported back
> then, but I'm asking anyway.)
And Johnny Billquist remark
> Not sure if any of the other shells have this.
'here documents' are available and work fine in sh and csh.
And are in fact used, examples
/usr/adm/daily (a /bin/sh script)
su uucp << EOF
/etc/uucp/clean.daily
EOF
/usr/crash/why (a /bin/csh script)
adb -k {unix,core}.$1 << 'EOF'
version/sn"Backtrace:"n
$c
'EOF'
To Michael Kjörling remark
> The PC value in the panic report ("pc 161324") strikes me as high
and Johnny Billquist remark
> This is in kernel mode, and that is in the I/O page.
211bsd uses split I/D space and uses all 64 kB I space for code.
The top 8 kB are in fact the overlay area, and the crash happened
in overlay 4 (as indicated by ov 4). With a simple
nm /unix | sort | grep " 4"
one gets
161254 t ~psignal 4
162302 t ~issignal 4
so the crash is just 050 bytes after the entry point of psignal. So the
PC address is fine and not the problem. For psignal look at
http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#s:_psignal
the crash must be one of the first lines. psignal is an internal kernel
function, called from
http://www.retro11.de/ouxr/211bsd/usr/src/sys/sys/kern_sig.c.html#xref:s:_p…
and has nothing to do with the libc function psignal
http://www.retro11.de/ouxr/211bsd/usr/man/cat3/psignal.0.htmlhttp://www.retro11.de/ouxr/211bsd/usr/src/lib/libc/gen/psignal.c.html
To Johnny Billquist remark
> Could you (Walter) try the latest version of 2.11BSD and see if you
> still get that crash?
very interesting that you see a core dump of tcsh rather a kernel panic.
Whatever tcsh does, it should not lead to a kernel panic, and if it does,
it is primarily a bug of the kernel. It looks like there are two issues,
one in tcsh, and one in the kernel. I've a hunch were this might come from,
but that will take a weekend or two to check on.
With best regards, Walter
On 2017-06-06 04:00, Michael Kjörling <michael(a)kjorling.se> wrote:
>
> On 5 Jun 2017 16:12 +0200, from w.f.j.mueller(a)retro11.de (Walter F.J. Mueller):
>> I'm using 211bsd (Version 447) and found that a 'here document' in tcsh
>> leads to a kernel panic. It's absolutely reproducible on my system, both
>> when run it on my FPGA PDP-11 or in simh. Just doing
>>
>> tcsh
>> cat << EOF
> I'm curious whether the same thing happens if you try that in some
> other shell? (Not sure how widely here documents were supported back
> then, but I'm asking anyway.)
Not sure if any of the other shells have this. We're basically talking
csh, sh and ksh unless I remember wrong.
But it's a good question. If noone else have tried it by tomorrow, I
could check.
>> is enough, and I get
>>
>> ka6 31333 aps 147472
>> pc 161324 ps 30004
>> ov 4
>> cpuerr 20
>> trap type 0
>> panic: trap
>> syncing disks... done
>>
>> looking at the crash dump gives
>>
>> cd /etc/crash
>> ./why 4
>> Backtrace:
>> 0147372: _boot(05000,0100) from ~panic+072
>> 0147414: _etext(011350) from ~trap+0350
>> 0147450: ~trap() from call+040
>> 0147516: _psignal(0101520,0160750) from ~trap+0364
>> 0147554: ~trap() from call+040
>>
>> so the crash is in psignal, which is afaik the kernel internal
>> mechanism to dispatch signals.
> The PC value in the panic report ("pc 161324") strikes me as high, but
> 161324 octal is 58068 decimal, so it's not excessively so, and perhaps
> in line with what one might expect to see with a kernel pinned near
> top of memory. Are the offsets in the backtrace constant, i.e. does it
> always crash on the same code?
161324 is way high. This is in kernel mode, and that is in the I/O page.
Basically no code lives in the I/O page (some boot roms and hardware
diagnostics excepted). This smells like corrupted memory (pointer or
stack), or something else very funny.
> Not knowing what cpuerr 20 is specifically doesn't help, and at least
> http://www.retro11.de/ouxr/29bsd/usr/src/sys/sys/trap.c.html#n:112
> (which doesn't seem to be too far from what you are running) isn't
> terribly enlightening; CPUERR is simply a pointer into a memory-mapped
> register of some kind, as seen at
> http://www.retro11.de/ouxr/29bsd/usr/include/sys/iopage.h.html#m:CPUERR,
> and at least pdp11_cpumod.c from the simh source code at
> http://simh.trailing-edge.com/interim/pdp11_cpumod.c wasn't terribly
> enlightening, though of course I could be looking in entirely the
> wrong place.
Like others said - the cpu error register is documented in the processor
handbook.
020 means Unibus Timeout, which is consistent with trying to access
something in the I/O page, where there is no device configured to
respond to that address.
I just tried the same thing on a simh system here, and I do not get a
crash. This on 2.11BSD at patch level 449, running on an emulated 11/94.
I do however get tcsh to crash.
simh:/home/bqt> su -
Password:
erase, kill ^U, intr ^C
# tcsh
simh:/# cat << EOF
Illegal instruction - core dumped
#
Suspended (tty input)
simh:/home/bqt>
simh:/home/bqt> cat /VERSION
Current Patch Level: 448
Date: January 5, 2010
Yes, it says patch level 448, but it really is 449. This was the system
where I worked together with Steven when doing the 449 patch set, but I
never got around to actually updating the VERSION file itself.
Also, this was while running on the console.
Could you (Walter) try the latest version of 2.11BSD and see if you
still get that crash?
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
Hi,
I'm using 211bsd (Version 447) and found that a 'here document' in tcsh
leads to a kernel panic. It's absolutely reproducible on my system, both
when run it on my FPGA PDP-11 or in simh. Just doing
tcsh
cat << EOF
is enough, and I get
ka6 31333 aps 147472
pc 161324 ps 30004
ov 4
cpuerr 20
trap type 0
panic: trap
syncing disks... done
looking at the crash dump gives
cd /etc/crash
./why 4
Backtrace:
0147372: _boot(05000,0100) from ~panic+072
0147414: _etext(011350) from ~trap+0350
0147450: ~trap() from call+040
0147516: _psignal(0101520,0160750) from ~trap+0364
0147554: ~trap() from call+040
so the crash is in psignal, which is afaik the kernel internal
mechanism to dispatch signals.
Questions:
1. has anybody seen this before ?
2. any idea what the reason could be ?
With best regards, Walter
> From: Jacob Ritorto
> Where might one find the list of trap_types
Look in:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/sys/pdp/scb.s
which maps from trap vector locations (built into the hardware; consult a
PDP-11 CPU manual for details) to trap type numbers, which are defined here:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/sys/pdp/trap.h
and handled here:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=2.11BSD/sys/pdp/trap.c
> and cpuerrs?
That just prints the contents of the CPU Error Register; see an appropriate
PDP-11 CPU manual - 11/70, /44, /73, /83 or /84 for what all the bits mean.
Also the "KDJ11-A CPU Module User's Guide", which also documents it.
In theory, there's also a KDJ11-B UG, but it's not online. If anyone has one,
can we please get it scanned? Thanks!
Noel
> The people working on TCP/IP did know of the Spider work (like they knew of
> the Cambridge ring work), but it didn't really have any impact; it was a
> totally different direction than the one we were going in.
I'm aware of that, and I think it was the same the other way around. My
interest is tracing how the networking API of Unix developed in the very
early days, and that's were there is a link.
When I asked a few months back why Bell Labs did not jump onto the work
done at UoI, Doug observed that the lab's focus was on Datakit and that
triggered my interest.
>>>> it turns out that the TIU driver was in Warren's repo all along:
>
> V4?! Wow. I'd have never guessed it went that far back.
My current understanding is that Spider development began in 1969 and
that it was first operational in 1972. By '73/'74 it connected a dozen
computers at Murray Hill and Unix had gained basic network programs.
From Sandy Fraser's "Origins of ATM" video lecture I understand that the
Spider learnings included that using a mini to simulate a switch/router
was too slow and too costly, and that doing flow control inside the network
induced avoidable complexity (I guess Fraser/Cerf/Pouzin all learned that
lesson around the same time). The follow-on, custom designed Datakit switch
was to correct these issues.
Work started in 1974 and I guess that prototypes may have been available
around 1978 (when Spider was apparently switched off at Murray Hill).
By 1981 a multi-site Datakit network connected various Bell labs and by
1983 Datakit was introduced as a commercial service.
As to the Spider network API, it currently seems that it was relatively
simple: it exposed the switch as a group of character mode devices, with
the user program responsible for doing all protocol work. Interestingly,
Spider used a high speed DMA based I/O board (DR11-B), whereas the
Datakit switch was apparently connected to a low speed polled I/O board
(DR11-C).
I did not find the Datakit device driver(s) in the V7 source tree (only a
few references in tty.h), so it is hard to be sure of anything. However,
it seems that in V7 the Datakit switch was used as "a fancy modem" so to
speak, supporting the uucp software stack.
There is source for a Datakit driver in the V8 tree, but I currently
have no time to study that (and perhaps it is beyond my scope anyway).
All input and corrections much appreciated.