Race condition in disk writing or bash problem?

Marc MERLIN (merlin@magic.metawire.com)
3 Feb 1997 23:30:44 -0800


I have an old PC (386 sx 25) doing network accouting on a very busy ethernet
(with a NE2000 clone). The traffic got to a point where the machine spends
almost all its time servicing network interrupts. Logging in can take 10mn
or more. Ssh sometimes just bails out and refuses to connect.

So far, nothing strange, just what can be expected.

Now, let's consider the following crontab entry:

# IP accouting flush
58 * * * * root (echo "|--||--|"; ipfwadm -A -lx; echo; echo) >> /var/log/ip_accounting; ipfwadm -A -z

The really strange thing is that about 10% of the files have the following
abnormality: the separator is there several times in a row (usually two).
There are still 24 separators, but they are not were they are supposed to.

----

|--||--|
|--||--|
|--||--|
|--||--|
|--||--|
|--||--|
IP accounting rules
pkts bytes dir prot source destination ports
10326002 3278687034 i/o all anywhere anywhere n/a
129774 32784534 i/o all 204.80.101.0/24 anywhere n/a
143370 31625551 i/o all anywhere 204.80.101.0/24 n/a
(...)

16979 1263427 i/o udp anywhere macaws95.metawire.com any -> domain

*** nothing here, the separator should be here though ***

IP accounting rules
pkts bytes dir prot source destination ports
3550293 1126278918 i/o all anywhere anywhere n/a

----

Most of the errors are like that:
----

39498 2891788 i/o udp anywhere macaws95.metawire.com any -> domain

|--||--|
|--||--|
IP accounting rules
pkts bytes dir prot source destination ports

----

Is this a kernel issue, or an application issue?

Thanks,
Marc

-- 
Home page: http://www.efrei.fr/~merlin/ (browser friendly)