Subject: Linux-Development Digest #125
From: Digestifier <[email-masked]>
To: [email-masked]
Date: Mon, 5 Sep 94 16:13:09 EDT

Linux-Development Digest #125, Volume #2          Mon, 5 Sep 94 16:13:09 EDT

Contents:
  Re: Aliasing `rm' (Thomas Schulz)
  Re: HORRIBLE SWAP THRASHING BUG(feature?) (please try this) (Jim Gifford)
  Patch for dcf77.441 was: Re: Any interest for DCF77 clock code? (Uwe Bonnes)
  SCSI-Scanner-Support? (Uwe Carl)
  How do you pass fd's to sockets? (Douglas Frank)
  Re: Any interest for DCF77 clock code? (Harald Milz)
  Re: Any interest for DCF77 clock code? (Harald Milz)
  lynx dying when calling malloc (Rafal Maszkowski)
  Re: Gnat 1.81 l1 binary on Sunsite (Michael Babcock)
  Re: LMSI CDrom (Joerg Schneider)
  Re: Future of linux -- the sequel (Philippe Steindl)
  Re: lynx dying when calling malloc (H.J. Lu)

----------------------------------------------------------------------------

From: [email-masked] (Thomas Schulz)
Subject: Re: Aliasing `rm'
Date: Sun, 4 Sep 1994 19:08:52 GMT

[email-masked] (Christian Henry) writes:

>In article <[email-masked]>,
>Yves Arrouye <[email-masked]> wrote:

>>      1. Alias rm. What's bad is that when I used it under tcsh I spent my
>>      time typing someting like '\rm ...' just to not use the alias (I hate
>>      being asked if I really want to do what I said I want to do). I'm sure
>>      I'm not the only one which did that...

>Why didn't you just pass the `-f' switch to rm (rm -f whatever)?  ;-)

You also can setup an alias for rm -r like Rm    :-))

-- 
                              |~~~Y~~~|
                              | O | O |
==========================uuuu====V====uuuu====================================
    Thomas Schulz                              email: [email-masked]

------------------------------

From: [email-masked] (Jim Gifford)
Crossposted-To: comp.os.linux.admin
Subject: Re: HORRIBLE SWAP THRASHING BUG(feature?) (please try this)
Date: 5 Sep 1994 18:30:11 GMT

Russell Leighton ([email-masked]) wrote:

:       HORRIBLE SWAP THRASHING BUG (please try this)

: A simple program that runs consistantly in ~1.25min on my 
: SGI 33Mhz r3k Indigo completely ruins my Linux box.
: Please run the short program "thrash" (see end) and let me know
: how it performs on your system...for me this is a 
: serious problem.

: Will adding more memory make the situation better? How much more?
: Will another Linux release behave better?

: Thanks.

: Russ

: Configuration:
:       Linux 1.1.48
:       P90 PCI
:       16M ram
:       >80Mbytes swap (1 18M partition, 4 16M files)

My setup:
        Linux 1.1.49
        486/66 EISA
        16M ram
        33M swap
        aha1542 and st11200 (1.06 GB)

: Symptoms:
:       1. run "thrash" once (~4min)...everything is okay
:       2. run "thrash" again (~1 hour!) ... system is very sluggish
:       3. run "thrash" again (> ~1 hour!) ... nothing runs, locked

: Directions:
:       0. Compile "thrash"
:               gcc -O2 -m486 thrash.c -o thrash

Did this.

:       1. Make a big file (~100Mbytes) :
:               dd if=/dev/zero of=bigfile bs=1024 count=100000
:       2. run "thrash"
:               time thrash bigfile
:       3. run "thrash"
:               time thrash bigfile
:       4. run "thrash"
:               time thrash bigfile

I wrote a simple shell script to do 1 2 3 & 4(included later)

:       5. if you get this far send me email and tell me why!
I don't know why, but I will post instead in case someone might know why.

================ /root/thrashlog.sh  Exec with sh /root/thrashlog.sh======
#!/bin/sh
touch /var/adm/thrash.log
echo This file created by thrashlog.sh >>/var/adm/thrash.log
echo /var/adm/thrash.log >>/var/adm/thrash.log
echo >>/var/adm/thrash.log
echo Creating ~100MB file useing dd if=/dev/zero of=bigfile bs=1024 count=100000 >>/var/adm/thrash.log
echo >>/var/adm/thrash.log
echo Starting First run of time thrash bigfile >>/var/adm/thrash.log
time thrash bigfile >>/var/adm/thrash.log 2>&1
echo >>/var/adm/thrash.log
echo Starting Second run of time thrash bigfile >>/var/adm/thrash.log
time thrash bigfile >>/var/adm/thrash.log 2>&1
echo >>/var/adm/thrash.log
echo Starting Third run of time thrash bigfile >>/var/adm/thrash.log
time thrash bigfile >>/var/adm/thrash.log 2>&1
echo >>/var/adm/thrash.log
echo thrashlog.sh finished >>/var/adm/thrash.log
==========================================
=======================/var/adm/thrash.log Created with above script========
This file created by thrashlog.sh
/var/adm/thrash.log

Creating ~100MB file useing dd if=/dev/zero of=bigfile bs=1024 count=100000

Starting First run of time thrash bigfile

Size=102400000
21.19user 21.14system 3:55.79elapsed 17%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps

Starting Second run of time thrash bigfile

Size=102400000
20.50user 20.66system 3:27.03elapsed 19%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps

Starting Third run of time thrash bigfile

Size=102400000
21.51user 19.78system 3:27.84elapsed 19%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+0minor)pagefaults 0swaps

thrashlog.sh finished
===============================
My guess is that maybe you have too MUCH swap.  Also, swap files are not as
good as a partition.  I was also running normal processes on this box
includeing a primary nameserver, top with update set to 1 second, and
minicom...

Hope this helps in some way.  Please note that i put a \n in the fprintf in
thrash.c.

Jim
[email-masked]

------------------------------

From: [email-masked] (Uwe Bonnes)
Subject: Patch for dcf77.441 was: Re: Any interest for DCF77 clock code?
Date: Mon, 5 Sep 1994 17:16:12 GMT

David Kastrup ([email-masked]) wrote:
> Trying to get a head count...
> How many people would be interested in a small program which gets the current
> time from the radio clock DCF77 (receivable about 900km around Frankfurt,
> Deutschland, official time base for Germany) and sets the system time?
> Comes with man page, and has
> options making it secure to use, say, daily in your crontab, while updating
> the CMOS clock as well.

> It sets UTC directly, so is timezone independent. You need a small radio
> clock device tied up to a serial port.

> This program will be freely available to whoever wants it.

> However, making it a package requires that there are specifications
> included concerning the hardware.

> Would you please answer me, and tell me if
> a) A logic description of the hardware would be ok for you.
> b) A circuit diagram would be ok for you (circuits about 20DM)
> c) You would rather buy a finished product for 50DM.

I pointed David to "dcf77.441.tar.gz", which has a schematic and (did) run
on the raw clock on my system for some time. Not checking it again, David
told me that it didn't work any longer, as the format of the signal changed,
perhaps the first of September.

So here is a patch to synchronize the clock on the missing second before the
full minute, to make it work again. It offers also more command-line option,
to set the Polarity of the supply voltage, the threshold to distinguish
between a short and a long signal, to invert the logic meaning of the pulses
and to display the settings (-h)

But beware, it is written in german!

I tried to contact the original author Frank Sommer ([email-masked]
) some time ago, but got no reply, so perhaps he reads now.

-- 
Uwe Bonnes  [email-masked]
---
Uwe Bonnes  [email-masked]

------------------------------

From: [email-masked] (Uwe Carl)
Subject: SCSI-Scanner-Support?
Date: 5 Sep 1994 18:02:14 GMT

Hi,

I need a full-pager SCSI-Scanner.
Since I am using only Linux on my PC it would be nice
to run it without MS-XXX.

Are there any Driver available?. I looked around and discovered
nothing. Is there Documentation available ( TWAIN ???)

Who has experience concerning this stuff?

Uwe

Uwe carl
EMAIL: [email-masked]

------------------------------

From: [email-masked] (Douglas Frank)
Subject: How do you pass fd's to sockets?
Date: Mon, 5 Sep 1994 18:06:55 GMT

How do you pass fd's to sockets?

Stevens, in "Advanced Programming in a Unix Environment,"
gives examples which use the __recvmsg call.

The recv() man page warns that recvmsg isn't implemented,
and goes on to say fd's "are now passed as ancillary data"
in struct msghdr- but that can't be, because msghdr
isn't anywhere to be found under /usr/include.

So, what's the deal?  Are messages free-form?

Thanks

------------------------------

From: [email-masked] (Harald Milz)
Subject: Re: Any interest for DCF77 clock code?
Reply-To: [email-masked]
Date: Mon, 5 Sep 1994 17:35:04 GMT

In comp.os.linux.development, Rob Janssen ([email-masked]) wrote:

> Then there is XNTP, but it is much too complicated for me (network
> oriented, I just want to sync a single machine).  And the DCF77 module
> in there also doesn't act on raw data, I think.

dcfd does, Rob. It's in the ~/parse/util/ subdir.

> Do you know about a program that runs as a daemon, uses adjtime, and
> processes raw data?  (e.g. on a COM port set to 50 bps)

dcfd. Anyway: xntpd is much better in terms of adjusting the clock
if the radio recptions fails due to the usage of the PLL. I use xntpd
on a standalone system (which runs IP, though). 

-- 
When you have an efficient government, you have a dictatorship.
                -- Harry Truman
-- 
Harald Milz ([email-masked])      WWW: http://www.ix.de/editors/hm.html
iX Multiuser Multitasking Magazine      phone +49 (511) 53 52-377
Helstorfer Str. 7, D-30625 Hannover     fax   +49 (511) 53 52-378
Opinions stated herein are my own, not necessarily my employer's.

------------------------------

From: [email-masked] (Harald Milz)
Subject: Re: Any interest for DCF77 clock code?
Reply-To: [email-masked]
Date: Mon, 5 Sep 1994 17:38:50 GMT

In comp.os.linux.development, Rob Janssen ([email-masked]) wrote:

> When I want to sync only a single machine from my clock (which already
> is interfaced to the RS232), can I configure xntp to leave out all the
> network stuff?  I don't need another large daemon in my 16M system...

No, you need IP up and running. xntp handles the receivers as pseudo-
hosts with addresses in the range 127.*.*.*. The daemon is not _that_
large. The good news is that you can configure a single xntpd to handle
both local receivers and remote NTP servers which is good to have 
backups in vital environments.

> How difficult is it to configure this?  (I have been on the newsgroup
> for a while and I see a lot of problem discussion that extends way beyond
> what I want to do...)

Quite easy if you can read ;^)

-- 
Binary, adj.:
        Possessing the ability to have friends of both sexes.
-- 
Harald Milz ([email-masked])      WWW: http://www.ix.de/editors/hm.html
iX Multiuser Multitasking Magazine      phone +49 (511) 53 52-377
Helstorfer Str. 7, D-30625 Hannover     fax   +49 (511) 53 52-378
Opinions stated herein are my own, not necessarily my employer's.

------------------------------

From: [email-masked] (Rafal Maszkowski)
Subject: lynx dying when calling malloc
Date: Mon, 5 Sep 1994 19:22:49 GMT

I have problems with lynx. It dies when trying to access link like
file://localhost/~/ which is special lynx hack to access and manage
home directory. It seems that malloc library function is causing
segmetation violation. Lynx killed our Convex here some time ago (new
kernel installed without patches and no sources available |-:= ) because
of intensive usage of memory allocation. Stack trace below. Does any
library hacker want to look into details I can provide? My Linux is
1.1.49, libc 4.5.26, gcc 2.5.8, gdb 4.12, lynx 2.3.1 (lynx 2.3 dies too,
also with libc 4.5.21).

Attaching to program `/oden/linux/src/lynx2-3-1/./lynx', process 92
0x677d0 in read ()
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x570c8 in malloc (size=20) at malloc.c:189
malloc.c:189: No such file or directory.
(gdb) bt
#0  0x570c8 in malloc (size=20) at malloc.c:189
#1  0x3acec in __gnu_malloc (__n=20) at /usr/include/stdlib.h:189
#2  0x3b10b in HTSACopy (dest=0xbffff0fc, src=0x83480 "file://localhost/~/")
    at ../../Library/Implementation/HTString.c:70
#3  0x39d33 in HTAnchor_address (me=0x85580)
    at ../../Library/Implementation/HTAnchor.c:572
#4  0x49d7 in display_page (text=0x85980, line_number=0, target=0xbffffa0c "")
    at GridText.c:535
#5  0x63f4 in HText_pageDisplay (line_num=1, target=0xbffffa0c "")
    at GridText.c:1291
#6  0xcb81 in mainloop () at LYMainLoop.c:252
#7  0xb753 in main (argc=3, argv=0xbffffd60) at LYMain.c:519
(gdb)

R.
PS. If I'm talking nonsense please say why it is nonsense.
-- 
Rafal Maszkowski [email-masked]      http://www.mat.uni.torun.pl/~rzm
Opinia publiczna powinna byc zaalarmowana swoim nieistnieniem - St. J. Lec

------------------------------

From: [email-masked] (Michael Babcock)
Subject: Re: Gnat 1.81 l1 binary on Sunsite
Date: 5 Sep 1994 13:28:25 -0600

In article <[email-masked]>,
Stephen Parkinson <[email-masked]> wrote:
>Has anyone had a problem with this file giving
>'Unexpected Eof' message when unzipped/untarred ??
>
>taar zxf gnat-1.81-l1-bin.tar.gz
>
>Yes, I did use bin and then pulled it again to make sure
>
>Stephen Parkinson

Yes it is incomplete. Get the one from ftp.funet.fi instead (two files).

Also you can't use gnat-1.81 with the latest linux kernels. I had
to downgrade to linux 1.0.9 and now it works fine.

Gnat 1.82 is out but a linux binary hasn't appeared yet that I have seen.
I think you need gcc 2.6.0 for gnat 1.82 anyway.

Michael Babcock
[email-masked]

------------------------------

From: [email-masked] (Joerg Schneider)
Subject: Re: LMSI CDrom
Date: 5 Sep 1994 19:35:55 GMT

Andrew Wilson ([email-masked]) wrote:
:    I've taken Kai Petzke's lmscd 0.3 driver and I'm adding audio support to
: it. It still only works with the CM205/CM250 combination, but given enough
: information about the CM206 and the CM205MS I may be able to adapt it.

Great! I have hacked lmscd0.3 to work with 1.1.45 for my CM205, but it
is really only a quick hack.

Anyway I would love audio support...

waiting (patiently), Joerg
--
Joerg Schneider -- e-mail: [email-masked] -- phone: +49 721 607140
                   s-mail: Gerwigstr. 13, 76131 Karlsruhe, FRG

------------------------------

From: [email-masked] (Philippe Steindl)
Subject: Re: Future of linux -- the sequel
Date: 5 Sep 1994 07:10:07 GMT
Reply-To: [email-masked]

Hullo guys,

please realize, that specint's don't say everything, get a bunch of  
benchmarks if you want to compare systems overall. Try to compare AIM  
numbers as well. It's true,that maybe specints cover all of your interests  
and so the machine with better specint is better for you. You in here  
compare total systems overall, trying to tell others which one is better  
. you'd need any benchmarks to cover that :) (3D graphics, where any indy  
will beat the shit out of a linux box for example .. sure .. not everybody  
needs it :)). I use linux and I like it, but if I could afford 64 MB RAM  
and other stuff, then I'd buy an indy :-)

Philippe

PS: repair costs of an indy are normally as high as the system costed .. 
    prost :-)

--
====================+===================================================
Philippe Steindl    |                  Any opinions expressed are my own
E-mail: [email-masked]  |                  and not necessarily those of the 
                    |                  Swiss Bank Corporation.
====================+===================================================

------------------------------

From: [email-masked] (H.J. Lu)
Subject: Re: lynx dying when calling malloc
Date: 5 Sep 1994 19:58:37 GMT

In article <[email-masked]>, [email-masked] (Rafal Maszkowski) writes:
|> I have problems with lynx. It dies when trying to access link like
|> file://localhost/~/ which is special lynx hack to access and manage
|> home directory. It seems that malloc library function is causing
|> segmetation violation. Lynx killed our Convex here some time ago (new
|> kernel installed without patches and no sources available |-:= ) because
|> of intensive usage of memory allocation. Stack trace below. Does any
|> library hacker want to look into details I can provide? My Linux is
|> 1.1.49, libc 4.5.26, gcc 2.5.8, gdb 4.12, lynx 2.3.1 (lynx 2.3 dies too,
|> also with libc 4.5.21).
|> 
|> 
|> Attaching to program `/oden/linux/src/lynx2-3-1/./lynx', process 92
|> 0x677d0 in read ()
|> (gdb) cont
|> Continuing.
|> 
|> Program received signal SIGSEGV, Segmentation fault.
|> 0x570c8 in malloc (size=20) at malloc.c:189
|> malloc.c:189: No such file or directory.
|> (gdb) bt
|> #0  0x570c8 in malloc (size=20) at malloc.c:189
|> #1  0x3acec in __gnu_malloc (__n=20) at /usr/include/stdlib.h:189
|> #2  0x3b10b in HTSACopy (dest=0xbffff0fc, src=0x83480 "file://localhost/~/")
|>     at ../../Library/Implementation/HTString.c:70
|> #3  0x39d33 in HTAnchor_address (me=0x85580)
|>     at ../../Library/Implementation/HTAnchor.c:572
|> #4  0x49d7 in display_page (text=0x85980, line_number=0, target=0xbffffa0c "")
|>     at GridText.c:535
|> #5  0x63f4 in HText_pageDisplay (line_num=1, target=0xbffffa0c "")
|>     at GridText.c:1291
|> #6  0xcb81 in mainloop () at LYMainLoop.c:252
|> #7  0xb753 in main (argc=3, argv=0xbffffd60) at LYMain.c:519
|> (gdb)
|> 

The first thing I would check is if Lynx somehow frees a malloced pointer
more than once. That can happen in many ways, like call fclose () twice on
an fp.

H.J.

|> 
|> R.
|> PS. If I'm talking nonsense please say why it is nonsense.
|> -- 
|> Rafal Maszkowski [email-masked]      http://www.mat.uni.torun.pl/~rzm
|> Opinia publiczna powinna byc zaalarmowana swoim nieistnieniem - St. J. Lec

------------------------------

** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [email-masked]

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: [email-masked]

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************