locate weirdness

classic Classic list List threaded Threaded
82 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

locate weirdness

L. V. Lammert
Have a 4.3 server with a really weird problem: locate ONLY indexes
one [user file] partition! IOW, no binaries are indexed, nor is /usr/, /var, ..

All filesystems are ffs;

I deleted /var/db/locate.db and recreated
with  /usr/libexec/locate.updatedb more than once;

locate.rc is stock:

==================
TMPDIR="/var/tmp"
FCODES="/var/db/locate.database"
SEARCHPATHS="/"
PRUNEPATHS="/tmp /var/tmp /usr/tmp"
FILESYSTEMS="ffs ufs ext2fs"

[comments pruned]
=================

The locate database seems to be normal:

Database: /var/db/locate.database
Compression: Front: 19.48%, Bigram: 65.90%, Total: 14.52%
Filenames: 218512, Characters: 14825215, Database size: 2153551
Bigram characters: 734303, Integers: 5440, 8-Bit characters: 3

=================

Trying to troubleshoot a Perl module problem, and locate is not
returning any hits except user files <g>!

Any pointers on what is 'intefering' with the process?

        Lee

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Theo de Raadt
> Have a 4.3 server [rest deleted]

There is a ton of documentation that makes it clear you are on your
own more than two releases back.

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

L. V. Lammert
At 10:41 AM 1/11/2012, Theo de Raadt wrote:
> > Have a 4.3 server [rest deleted]
>
>There is a ton of documentation that makes it clear you are on your
>own more than two releases back.

So, you're advocating incomplete information? Is that not a bigger problem?

         Lee

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Theo de Raadt
In reply to this post by L. V. Lammert
>> > Have a 4.3 server [rest deleted]
>>
>>There is a ton of documentation that makes it clear you are on your
>>own more than two releases back.
>
>So, you're advocating incomplete information? Is that not a bigger problem?

No, I am advocating that you TAKE CARE OF YOUR OWN PROBLEMS YOURSELF.

We do not support old releases.  AT ALL.

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Bob Beck-4
In reply to this post by L. V. Lammert
> So, you're advocating incomplete information? Is that not a bigger problem?

No, we don't support old releases. 4.3 is very old. You should update
your OS to something supported, and likely your problem will go away.

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Barry Grumbine-2
In reply to this post by L. V. Lammert
On Wed, Jan 11, 2012 at 9:49 AM, L. V. Lammert <[hidden email]> wrote:

> At 10:41 AM 1/11/2012, Theo de Raadt wrote:
>>
>> > Have a 4.3 server [rest deleted]
>>
>> There is a ton of documentation that makes it clear you are on your
>> own more than two releases back.
>
>
> So, you're advocating incomplete information? Is that not a bigger problem?
>
>        Lee


Bite the bullet, upgrade, life is better at 5.0

Prior to last year, I had been upgrading OpenBSD by clean install,
then install and configure all packages, it was a major hassle.

Things hit critical mass about a year ago.  I had five systems on
either 4.2 or 4.3.  I gave in and decided to learn the "new" upgrade
tools.  As a result I upgraded nearly all my 10+ OpenBSD systems to
4.9 over the course of 3-4 weeks.  That was a total of 43 upgrades
counting each release on each system.  I'm more confident in my
OpenBSD systems now and the 4.9->5.0 upgrades went even more smoothly
(once I figured out /etc/rc.d/).

I'm not sure how I missed them before, but follow the upgrade guides
is essential:
http://www.openbsd.org/faq/upgrade50.html

Once you get to 4.3, upgrading your systems becomes a whole lot
easier, thanks in large part to sysmerge(8), introduced in 4.4
The upgrade from 4.2 -> 4.3 was still a bit of a hassle, but after
that upgrades went fairly smooth with little incident.

It is very interesting to see sysmerge(8) get better and better with
each release.

Go get'em man, those upgrades are nowhere near as hard as they once
were, back in the day when you had to grep 10,000 LOC, uphill, both
ways, just to get schooled.


Have a nice day,

Barry

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

L. V. Lammert
At 01:04 PM 1/11/2012, Barry Grumbine wrote:
>Bite the bullet, upgrade, life is better at 5.0

Sorry, but *UPGRADING* isn't the question - the question is why
locate is not working properly. If nobody has ever seen such a
problem, it would be quite more forthright to just admit that than
spout the normal crap this list promulgates. But, then, I should have
expected multiple replies that are off topic, of no help, and not
worth the time to read. Sorry, I had momentarily forgotten the
definition of OBSD Misc - my bad.

If nobody can answer the question, that's is not a problem, just say so!

         Lee

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Barry Grumbine-2
In reply to this post by Barry Grumbine-2
> Bite the bullet, upgrade, life is better at 5.0
>

...knew I forgot something.

There aren't many North American mirrors that go back to 4.2.  I was
fortunate to find "obsd.cec.mtu.edu" which Nick Holland recently
notified us that he needs to take down very soon.

After Looking through all the mirrors, I think the only OpenBSD
archive located in North America is planetunix.net :
ftp://mirror.planetunix.net/pub/OpenBSD/4.3/

Most of the rest only mirror a couple of releases.


-Barry

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Marian Hettwer
In reply to this post by L. V. Lammert
Hi,


Am 11.01.12 20:17, schrieb L. V. Lammert:
> At 01:04 PM 1/11/2012, Barry Grumbine wrote:
>> Bite the bullet, upgrade, life is better at 5.0
>
> Sorry, but *UPGRADING* isn't the question - the question is why locate
> is not working properly.

No. You were advised to upgrade, since 4.3 is not supported anymore.
Heck, probably nobody can even remember whether something was odd with
locate in 4.3.
Upgrade to a supported release and if you still face problems, come back
to the list.

Try to look from a different angle here.
Say, you would have an old Debian Sarge release (years old) and you
would approach a debian mailing list with "something is weird with
locate", pretty sure you would get a lot of advises to upgrade first,
test then, and if problem persists, come back.

All good and jolly!

./Marian

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

piroko
In reply to this post by L. V. Lammert
On Wed, Jan 11, 2012 at 14:17, L. V. Lammert <[hidden email]> wrote:

> At 01:04 PM 1/11/2012, Barry Grumbine wrote:
>>
>> Bite the bullet, upgrade, life is better at 5.0
>
>
> Sorry, but *UPGRADING* isn't the question - the question is why locate is
> not working properly. If nobody has ever seen such a problem, it would be
> quite more forthright to just admit that than spout the normal crap this
> list promulgates. But, then, I should have expected multiple replies that
> are off topic, of no help, and not worth the time to read. Sorry, I had
> momentarily forgotten the definition of OBSD Misc - my bad.
>
> If nobody can answer the question, that's is not a problem, just say so!
>
>        Lee
>

4.3 was released May 1, 2008. That's almost 4 years old software. What
are you expecting here? Someone to check out the code from that
version and deeply inspect what may be causing your problem, that is
more than likely already fixed in a later version? The replies were
perfectly valid and helpful. In the software world, you're using an
antique.

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

David Cantrell-3
On 01/11/2012 02:30 PM, Jeremy O'Brien wrote:

> On Wed, Jan 11, 2012 at 14:17, L. V. Lammert<[hidden email]>  wrote:
>> At 01:04 PM 1/11/2012, Barry Grumbine wrote:
>>>
>>> Bite the bullet, upgrade, life is better at 5.0
>>
>>
>> Sorry, but *UPGRADING* isn't the question - the question is why locate is
>> not working properly. If nobody has ever seen such a problem, it would be
>> quite more forthright to just admit that than spout the normal crap this
>> list promulgates. But, then, I should have expected multiple replies that
>> are off topic, of no help, and not worth the time to read. Sorry, I had
>> momentarily forgotten the definition of OBSD Misc - my bad.
>>
>> If nobody can answer the question, that's is not a problem, just say so!
>>
>>         Lee
>>
>
> 4.3 was released May 1, 2008. That's almost 4 years old software. What
> are you expecting here? Someone to check out the code from that
> version and deeply inspect what may be causing your problem, that is
> more than likely already fixed in a later version? The replies were
> perfectly valid and helpful. In the software world, you're using an
> antique.

They were valid replies, but a straw man argument at best.  I think he
would have preferred to hear something more like:

"Yeah, I saw something similar happen on my systems running an older
release.  I don't really remember the release, but I do remember the
problem eventually went away for me.  I'm not really sure of what's
happening, but my best guess is giving the latest release a try and
seeing if that solves the problem for you."

--
David Cantrell <[hidden email]>
WH6DSN | http://blog.burdell.org/

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

L. V. Lammert
In reply to this post by piroko
At 01:30 PM 1/11/2012, Jeremy O'Brien wrote:

>4.3 was released May 1, 2008. That's almost 4 years old software. What
>are you expecting here? Someone to check out the code from that
>version and deeply inspect what may be causing your problem, that is
>more than likely already fixed in a later version?

Another typical reply - the question was "has anyone ever seen
anything like this", .. or, perhaps, "what could be causing it". No
need for the off-topic diatribes - a simple no would more than suffice.

         Lee

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Theo de Raadt
In reply to this post by David Cantrell-3
> They were valid replies, but a straw man argument at best.  I think he
> would have preferred to hear something more like:
>
> "Yeah, I saw something similar happen on my systems running an older
> release.  I don't really remember the release, but I do remember the
> problem eventually went away for me.  I'm not really sure of what's
> happening, but my best guess is giving the latest release a try and
> seeing if that solves the problem for you."

The OP has been around long enough to know we don't like talking about
ancient code.

It is completely FAQ, and he knows better.

It's not a kernel crash.  It's not pf letting packets through.  It's
locate.  Come on.

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

piroko
In reply to this post by L. V. Lammert
On Wed, Jan 11, 2012 at 14:47, L. V. Lammert <[hidden email]> wrote:

> At 01:30 PM 1/11/2012, Jeremy O'Brien wrote:
>
>> 4.3 was released May 1, 2008. That's almost 4 years old software. What
>> are you expecting here? Someone to check out the code from that
>> version and deeply inspect what may be causing your problem, that is
>> more than likely already fixed in a later version?
>
>
> Another typical reply - the question was "has anyone ever seen anything like
> this", .. or, perhaps, "what could be causing it". No need for the off-topic
> diatribes - a simple no would more than suffice.
>

OK then. I have used OpenBSD since 4.0, and I have not seen this
behavior. I recommend seeing if an upgrade fixes your problem. ;)

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Lars-47
In reply to this post by L. V. Lammert
L. V. Lammert wrote:

> At 01:04 PM 1/11/2012, Barry Grumbine wrote:
>>Bite the bullet, upgrade, life is better at 5.0
>
> Sorry, but *UPGRADING* isn't the question - the question is why
> locate is not working properly. If nobody has ever seen such a
> problem, it would be quite more forthright to just admit that than
> spout the normal crap this list promulgates. But, then, I should have
> expected multiple replies that are off topic, of no help, and not
> worth the time to read. Sorry, I had momentarily forgotten the
> definition of OBSD Misc - my bad.
>
> If nobody can answer the question, that's is not a problem, just say so!
>
>          Lee
>
>

Why don't you download 5.0 on a separate disc or folder and then compare
the differences using a diff tool to see what changed and if it is fixed
in 5.0 you can apply a  patch to your old one. find the problem files,
compare them to the new code. Also make sure the bug isn't in the new
release because if it is, you should report it.

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

L. V. Lammert
In reply to this post by Marian Hettwer
On Wed, 11 Jan 2012, Marian Hettwer wrote:

> Hi,
>
>
> Am 11.01.12 20:17, schrieb L. V. Lammert:
> > At 01:04 PM 1/11/2012, Barry Grumbine wrote:
> >> Bite the bullet, upgrade, life is better at 5.0
> >
> > Sorry, but *UPGRADING* isn't the question - the question is why locate
> > is not working properly.
>
> No. You were advised to upgrade, since 4.3 is not supported anymore.
> Heck, probably nobody can even remember whether something was odd with
> locate in 4.3.
> Upgrade to a supported release and if you still face problems, come back
> to the list.
>
> Try to look from a different angle here.
> Say, you would have an old Debian Sarge release (years old) and you
> would approach a debian mailing list with "something is weird with
> locate", pretty sure you would get a lot of advises to upgrade first,
> test then, and if problem persists, come back.
>
> All good and jolly!
>
> ./Marian
>
Hope you got off on the bs, .. as usual, offtopic, nothing useful, not
worth readying. Quite repetitive of the other BS, actually.

        Lee

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Philip Guenther-2
In reply to this post by L. V. Lammert
Time for today's "how to debug a problem" lesson.

On Wed, Jan 11, 2012 at 7:26 AM, L. V. Lammert <[hidden email]> wrote:
> Have a 4.3 server with a really weird problem: locate ONLY indexes one [user
> file] partition! IOW, no binaries are indexed, nor is /usr/, /var, ..

Lesson #1: examine the anomalous data for clues.

So, you're saying that
    locate /usr | grep ^/usr | head

returns nothing but
    locate /home | grep ^/home | head

returns something?  (/home being a stand-in for whatever your unsaid
"[user file] partition" is)

Perhaps you should investigate how those two directories differ?


> The locate database seems to be normal:
>
> Database: /var/db/locate.database
> Compression: Front: 19.48%, Bigram: 65.90%, Total: 14.52%
> Filenames: 218512, Characters: 14825215, Database size: 2153551
> Bigram characters: 734303, Integers: 5440, 8-Bit characters: 3

Lesson #2: step through the problem computation and verify the
correctness of intermediate stages.

So you've run locate.updatedb manually.  It's just a shell script, so
perhaps you should run the commands in it manually, one by one and
examining the intermediate output of pipes, etc.  Be sure to do so in
a shell that reproduces how locate.updatedb is called from
/etc/weekly!


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

Philip Guenther-2
Also, in order to help others when they encounter a similar issue,
please be sure to post what the problem and/or solution were once you
figure them out.


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

L. V. Lammert
In reply to this post by Philip Guenther-2
On Wed, 11 Jan 2012, Philip Guenther wrote:

> Lesson #1: examine the anomalous data for clues.
>
> So, you're saying that
>     locate /usr | grep ^/usr | head
>
> returns nothing but
>
Yep! As does locate /usr

>     locate /home | grep ^/home | head
>
> returns something?  (/home being a stand-in for whatever your unsaid
> "[user file] partition" is)
>
> Perhaps you should investigate how those two directories differ?
>
That was the original question - both are ffs, both are rw, the only
difference between then that /home is nosuid, however that does not
affect locate on 3.3, 4.9, or 5.0 (just tested).

        TFTR!

        Lee

Reply | Threaded
Open this post in threaded view
|

Re: locate weirdness

L. V. Lammert
In reply to this post by Philip Guenther-2
On Wed, 11 Jan 2012, Philip Guenther wrote:

> Also, in order to help others when they encounter a similar issue,
> please be sure to post what the problem and/or solution were once you
> figure them out.
>
> Philip Guenther
>
Amen! At least there's a chance it would turn up in the search engines.

        Lee

12345