Linked by Thom Holwerda on Sat 10th May 2008 20:27 UTC, submitted by rosebug
Bugs & Viruses 1983. The year of the IBM PC XT, the Apple Lisa, Pioneer 10 leaving the solar system, and Hooters opening up shop in Florida. It's also the birthyear of a 25 year old BSD bug, squashed only a few days ago.
Thread beginning with comment 313740
To read all comments associated with this story, please click here.
Not 'UNIX' bug
by Ladelburro on Sat 10th May 2008 22:34 UTC
Ladelburro
Member since:
2008-05-10

As stated in the article, this isn't a 25 year old 'UNIX' bug (what does it means, anyway?) but a BSD bug.

Reply Score: 4

RE: Not 'UNIX' bug
by cstoner on Sun 11th May 2008 01:01 in reply to "Not 'UNIX' bug"
cstoner Member since:
2008-05-11

It is a fringe case bug that caused some headaches with Samba. The problem was actually known for three years.

It comes down to directory access. A directory is stored as a block that points to all of its 'contents' somewhere else on the disk. To navigate these directories, originally, you had to manually pull out the contents from the pointer. This library addressed a lot of those issues for the BSDs.

UNIX is a concurrent system. Several people can do several things at once on the same system. This is where the bug comes from. If one persons program were to seek -- the term for iterating through the contents until you find what you're looking for -- through a directory to find a file, you get an index into that directory's 'contents array' as a return value.

The index has several purposes, but that's besides the point.

EDIT: This is not techinally correct. Correction follows.
If you seeked to a point in the directory, and then someone else deleted something.

EDIT:
There was a special case when you were deleting the first file in a directory, and that case was not correctly accounted for when you seeked through a directory.



Your index would be off because of the way the deletion was handled. The result? You get the contents of another file -- one that you didn't ask for.

Edited 2008-05-11 01:06 UTC

Reply Parent Score: 3

RE: Not 'UNIX' bug
by Oliver on Sun 11th May 2008 07:08 in reply to "Not 'UNIX' bug"
Oliver Member since:
2006-07-15

You do know the history of BSD?

http://www.oreilly.com/catalog/opensources/book/kirkmck.html

It's called Berkeley Unix

Reply Parent Score: 3

RE[2]: Not 'UNIX' bug
by Vanders on Sun 11th May 2008 09:50 in reply to "RE: Not 'UNIX' bug"
Vanders Member since:
2005-07-06

It's called Berkeley Unix


Sure, but it's not called Berkeley UNIX, the 4.4Lite sources specifically are not derived from any of the AT&T UNIX sources and you wont find the same bug in anything that derives purely from SysV.

It's a bug in a Unix implementation, but it isn't a UNIX bug.

Reply Parent Score: 1

RE[2]: Not 'UNIX' bug
by Doc Pain on Sun 11th May 2008 14:26 in reply to "RE: Not 'UNIX' bug"
Doc Pain Member since:
2006-10-08

[BSD is] called Berkeley Unix


I think you're wrong. At least judging from the websites of the "three big" BSDs, FreeBSD, NetBSD and OpenBSD, you can read:

FreeBSD(R) is an advanced operating system for x86 compatible (including Pentium(R) and Athlon(TM)), amd64 compatible (including Opteron(TM), Athlon(TM)64, and EM64T), UltraSPARC(R), IA-64, PC-98 and ARM architectures. It is derived from BSD, the version of UNIX(R) developed at the University of California, Berkeley.

The NetBSD Project is an international collaborative effort of a large group of people, to produce a freely available and redistributable UNIX-like operating system, NetBSD. In addition to our own work, NetBSD contains a variety of other free software, including 4.4BSD Lite from the University of California, Berkeley.

The OpenBSD project produces a FREE, multi-platform 4.4BSD-based UNIX-like operating system. Our efforts emphasize portability, standardization, correctness, proactive security and integrated cryptography. OpenBSD supports binary emulation of most programs from SVR4 (Solaris), FreeBSD, Linux, BSD/OS, SunOS and HP-UX.


The term "Berkeley Unix" or "Berkeley UNIX" isn't mentioned anywhere. Refering to the article you linked to, the term "Twenty Years of Berkeley Unix" seems to be intended as a kind of title, not as a name; it could be "Twenty Years of UNIX development at Berkeley", too.

You may want to have a look at the BSD family tree to learn about the BSDs' origins:

http://www.freebsd.org/cgi/cvsweb.cgi/src/share/misc/bsd-family-tre...

EDIT: I changed the (TM), (R) and (C) special characters into a more convenient form because the OSNews comments system doesn't seem to handle them correctly. They are displayed correctly in the input form, but aren't displayed correctly in the thread later on...

Edited 2008-05-11 14:40 UTC

Reply Parent Score: 2