Michael L. Hitch | 1 May 04:32 2007

Re: Strange segmentation fault trying to run postgresql on current

On Mon, 30 Apr 2007, Michael L. Hitch wrote:

>  The pg_krb_caseins_users symbol comes from libpq/auth.o, and a readelf -s 
> on that file shows:
>
>   Num:    Value  Size Type    Bind   Vis      Ndx Name
>    14: 00000000     4 OBJECT  GLOBAL DEFAULT    4 pg_krb_server_hostname
>    35: 00000004     4 OBJECT  GLOBAL DEFAULT  COM pg_krb_server_keyfile
>    36: 00000004     4 OBJECT  GLOBAL DEFAULT  COM pg_krb_srvnam
>    37: 00000001     1 OBJECT  GLOBAL DEFAULT  COM pg_krb_caseins_users
>
>  If the Value field specifies the alignment requirement, then it looks like 
> gas is generating the proper alighment information, in which case the problem 
> would be with ld not aligning things properly.

   OK, I did a simple little test (two files with the first one having an 
odd common allocation), and it worked as expected.  A link map generate 
with -M even showd a 3 byte filler to align a 4 byte item following a 1 
byte item.

   I then relinked postgres with -M, and noticed the following in the 
common allocations:

  *(.scommon)
  .scommon       0x0000000000888e80        0x4 /usr/lib/crt0.o
                 0x0000000000888e80                environ
  .scommon       0x0000000000888e84        0x5 access/SUBSYS.o
                 0x0000000000888e84                XactIsoLevel
                 0x0000000000888e88                XactReadOnly
  .scommon       0x0000000000888e89       0x1c bootstrap/SUBSYS.o
(Continue reading)

Markus W Kilbinger | 1 May 07:39 2007
Picon

Re: Strange segmentation fault trying to run postgresql on current

After reading

  http://gcc.gnu.org/install/specific.html#mips-x-x

I tried to link the problematic (crashing) postgres binary directly
from the *.o files to circumvent the SUBSYS.o dance and I've got a
working postgres binary and finally working postgres82-server package!
:-)

(Anybody interested in this packag? Maybe I can upload it
somewhere...)

So, the problem seems to be a GNU linker/binutils mips problem with
NetBSD's in tree version.

Is there an easy way to use more actual GNU binutils versions under
NetBSD to verify that these version solve the problem?

Does it make sense to send-pr about this?

Markus.

Michael L. Hitch | 1 May 19:36 2007

Re: Strange segmentation fault trying to run postgresql on current

On Tue, 1 May 2007, Markus W Kilbinger wrote:

> After reading
>
>  http://gcc.gnu.org/install/specific.html#mips-x-x

   I looked at that, but didn't see anything relating to the problem.

> I tried to link the problematic (crashing) postgres binary directly
> from the *.o files to circumvent the SUBSYS.o dance and I've got a
> working postgres binary and finally working postgres82-server package!
> :-)

   I was looking through ld options relating to common, and found -d which 
says it assigns space to common symbols even if a relocatable object file 
was specified.  The description didn't quite sound like it would affect 
the alignment problem, but I tested it on my simple test case, and found 
that it changed the alignment of the .sbss section from 1 to 4 in the 
resulting object file.  I modified by build of postgresql82-server to 
include -d when creating the relocatable object files, and I think it may 
have cured the problem:

$ nm work/post*/src/backend/postgres|grep progname
008740c0 D __progname
00797714 T get_progname
00888efc S progname
^^^^^^^^
        Yay!

> Is there an easy way to use more actual GNU binutils versions under
(Continue reading)

Varadarajan Narayanan | 1 May 20:01 2007
Picon

Re: Strange segmentation fault trying to run postgresql on current

> So, the problem seems to be a GNU linker/binutils mips problem with
> NetBSD's in tree version.
>
> Is there an easy way to use more actual GNU binutils versions under
> NetBSD to verify that these version solve the problem?

Check this out http://mail-index.netbsd.org/netbsd-ports/1996/01/20/0000.html

Hope that helps

-Varada

UnterGeek | 7 May 17:31 2007

More Newbie Questions...


Hello everyone -

    All is running great on my Pencentra 130, but I have a few questions I
can't find the answers for:

1. Is there a way to boot right into X with no keyboard input (I'm used to
SYS V init scripts but don't know where to look in NetBSD to set runlevels)

2. Is there a way to automatically boot to a single, non-root user for
general use?

3. I'm using xvkbd in X, but the keys are too dark. "-geometry" options work
in setting xvkdb's size, but any color options I enter are ignored. Any
suggestions?

Thanks,

Peter

--

-- 
View this message in context: http://www.nabble.com/More-Newbie-Questions...-tf3704431.html#a10359521
Sent from the port-mips mailing list archive at Nabble.com.

UnterGeek | 9 May 17:46 2007

Re: More Newbie Questions...


... not to mention, I can't find xf86cfg, xf86config, xorg.cong, or anything
similar on my system. Where's my X getting it's info from?

soory for the noobiness...

P.
--

-- 
View this message in context: http://www.nabble.com/More-Newbie-Questions...-tf3704431.html#a10396975
Sent from the port-mips mailing list archive at Nabble.com.

Toru Nishimura | 13 May 18:59 2007

LinkSys NSS4000 NAS w/ RM7000+PMON2000

Guys,

I've been away from MIPS camp for long time since I have
no good modern MIPS HW at hand.  I found that one of LinkSys
NAS product named NSS4000 is a very good candidate to
port NetBSD.  PLS check out http://www.tmk.com/blog/?p=8
It has 600MHz RM7035C and a variety of modern PCI
peripherals.  The most interesting aspect is that it has
PMON2000 bootloader and HW provides serial console connector
to control.  I guess it's a kind of rare NAS box which equips L2
cache inside.  I hope the product would gain successful share
and would be replaced with bettter processor like MSP8150
(re-badged RM9150) in some future.

Toru Nishimura/ALKYL Technology

Andy Ruhl | 14 May 04:26 2007
Picon

Re: LinkSys NSS4000 NAS w/ RM7000+PMON2000

On 5/13/07, Toru Nishimura <locore64 <at> alkyltechnology.com> wrote:
> Guys,
>
> I've been away from MIPS camp for long time since I have
> no good modern MIPS HW at hand.  I found that one of LinkSys
> NAS product named NSS4000 is a very good candidate to
> port NetBSD.  PLS check out http://www.tmk.com/blog/?p=8
> It has 600MHz RM7035C and a variety of modern PCI
> peripherals.  The most interesting aspect is that it has
> PMON2000 bootloader and HW provides serial console connector
> to control.  I guess it's a kind of rare NAS box which equips L2
> cache inside.  I hope the product would gain successful share
> and would be replaced with bettter processor like MSP8150
> (re-badged RM9150) in some future.

Hmm, nice machine. Dual gigabit ethernet controllers and 4 disks...

Do you know if you can netboot it similar to the NSLU2? I was going to
try to find an NSLU2 to play with, but I'm really not smart enough to
do hardware hacking.

This thing could make a really nice box. It's still a little pricey though.

Andy

Toru Nishimura | 14 May 04:50 2007

Re: LinkSys NSS4000 NAS w/ RM7000+PMON2000

Andy Ruhl sez;

> Hmm, nice machine. Dual gigabit ethernet controllers and 4 disks...
> 
> Do you know if you can netboot it similar to the NSLU2?

PMON2000 is a feature rich bootloader made by the man who
ported the world first real BSD Unix to R4000.  The port was called
"pica".

http://www.opsycon.se/pmonmain

Started from the original PMON, PMON2000 has been acumulating
many features by importing code from NetBSD and OpenBSD.  I would
not be surprised seeing NASS4000 even boots ELF kernel on FFS
filesys.

> This thing could make a really nice box. It's still a little pricey though.

The 64bit OS capable machine could be made in lower price and I feel
puzzling indeed about the wrong combination of HW.

- PM8172 is SysAD32 system controller.  By replacing it with other
  "industory grade" one like Marvell Discovery LT you can buy
  133MHz/166MHz SysAD64 frontside bus w/ DDR333 memory and
  buildin GbE.
- Having RM9120/9220(dual E9K core) could be instant win (but
  PMC-Sierra abandond the entire RM9000 line)
- then moderate replacement choice would be RM9150.

(Continue reading)

Matthew Luckie | 15 May 02:18 2007
Picon

CP0 count register

I would like to be able to measure the number of clock cycles a routine
takes in user-space when running on a MIPS in order to measure the
performance of a routine as accurately as possible.

It seems that the count register on CP0 is what I want to use, but that
it cannot be accessed from user-space unless the appropriate bit in
the CP0 status register is set to one.  That is:

mips_cp0_status_write(mips_cp0_status_read() | MIPS_SR_COP_0_BIT);

Is it possible, at all, to access CP0 in userspace if the kernel is
modified to allow access to CP0 by user-space?  documentation such as
http://6004.csail.mit.edu/6.371/handouts/mips6371.pdf suggests it is,
but that is all I have to work with, and I am not intimately familiar
with NetBSD on the MIPS CPU.

If it is, I was thinking of modifying sys/arch/mips/mips/vm_machdep.c 
cpu_lwp_fork() and cpu_setfunc() as follows:

--- vm_machdep.c.orig   2007-05-15 12:07:43.000000000 +1200
+++ vm_machdep.c        2007-05-15 12:14:01.000000000 +1200
 <at>  <at>  -171,7 +171,12  <at>  <at>  cpu_lwp_fork(struct lwp *l1, struct lwp 
        pcb->pcb_context[1] = (intptr_t)arg;            /* S1 */
        pcb->pcb_context[8] = (intptr_t)f;              /* SP */
        pcb->pcb_context[10] = (intptr_t)proc_trampoline;       /* RA */
-       pcb->pcb_context[11] |= PSL_LOWIPL;             /* SR */
+
+       if(kauth_cred_getuid(l2->l_cred) == 0)
+               pcb->pcb_context[11] |= (PSL_LOWIPL | MIPS_SR_COP_0_BIT);
+       else
(Continue reading)


Gmane