On Sun, Jul 27, 2014 at 03:22:08PM +0200, Michelle Sullivan wrote:
> ...
> > g1-252(9.3-S)[4] sudo file pkg-static.core
> > Password:
> > pkg-static.core: ELF 32-bit LSB core file Intel 80386, version 1 (FreeBSD), 
> > FreeBSD-style, from '-static'
> > g1-252(9.3-S)[5] 
> >   
> Doesn't appear stripped..
> >   
> >> I'd be interested in seeing the backtrace...
> ...
> >   
> Unless the fault smashed the stack often you can find what the
> problem/cause was.  If the stack is smashed you're screwed.
> gdb <path to binary> <path to core>

Well, you see, that's part of the problem:  I'm not at all sure
where the executable in question actually is.  (There is nothing
named "pkg-static" in my execution search path.)  If I assume(!)
that it's in the port's staging area:

sudo gdb ./pkg-static ../../../../../pkg-static.core
Core was generated by `pkg-static'.
Program terminated with signal 11, Segmentation fault.
#0  0x080b6cdc in ?? ()
(gdb) bt
#0  0x080b6cdc in ?? ()
#1  0x28404360 in ?? ()
#2  0x28442220 in ?? ()
#3  0x00000000 in ?? ()

> ...
> If you want to catch a smashed stack problem run the binary in gdb:
> gdb <path to command>
> Then:
> set args <what ever is approrpiate>

Yes; well... that presumes a familiarity with the "internal workings" of
pkg which I don't have (and, in all honesty, don't want to have).

> When it faults most of the time you'll get the stack just prior to the
> smashing - though I have had some really bad ones when even gdb cored out..

Indeed: one gets into "interesting" issues of figuring out what is
actually reliable information (and what is merely debris).

> ...

Back on the original topic, I was able to get pkg-1.3.1 installed and
apparently functioning on one system (a headless build machine -- which
has the least number of ports inistalled).

What I ended up doing that seems to have "worked"(?) was:
* mv /var/db/pkg{,.save}
* mkdir /var/db/pkg
* cp -pr /var/db/pkg.save/local.sqlite /var/db/pkg
* portmaster -d ports-mgmt/pkg
  This builds OK, then dies in installation a little peculiarly:

====> Compressing man pages (compress-man)
===>  Installing for pkg-1.3.1
===>  Checking if ports-mgmt/pkg already installed
===>   An older version of ports-mgmt/pkg is already installed (apr-
...[list of every installed port on the machine]...)
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of ports-mgmt/pkg
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1

* cd /usr/ports/ports-mgmt/pkg && make reinstall
  Which seems to have made constructive use of the port just built (vs.
  building it all over yet again)a nd installed it.

I don't yet know how disruptive this has been to ... well anything
(e.g., the current status of installed ports; ability to update ports in
the future; ...).

David H. Wolfskill                              da...@catwhisker.org
Taliban: Evil cowards with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

Attachment: pgpFXy2iMjGzo.pgp
Description: PGP signature

Reply via email to