BSD

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • tailing of /kern/msgbuf

    5 answers - 460 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I am using NetBSD/i386 V2.0.2 and frequently on my servers if I try:
    cd /kern
    tail msgbuf
    I receive a: "Segmentation fault"
    Not 100% of the time, but more than not.
    Has this been observed before ? I can't find mention of it.
    Thanks
    Scott
    Scott R. Burns
    NETCN Technologies Inc.
    Suite 135 - 4474 Blakie Road
    London, , Canada
    N6L 1G7
    Voice: +1.519.652.0401
    Fax: +1.519.652.9275
  • No.1 | | 386 bytes | |

    Sun(21)/Aug/05 - , Scott R. Burns wrote:
    I am using NetBSD/i386 V2.0.2 and frequently on my servers if I try:

    cd /kern
    tail msgbuf

    I receive a: "Segmentation fault"

    Not 100% of the time, but more than not.

    Has this been observed before ? I can't find mention of it.

    I can confirm this behaviour. I'll take a look at it.

    Cheers,
  • No.2 | | 537 bytes | |

    2005.08.21 18:02:44 +0000, Scott R. Burns wrote:
    | I am using NetBSD/i386 V2.0.2 and frequently on my servers if I try:
    |
    | cd /kern
    | tail msgbuf
    |
    | I receive a: "Segmentation fault"
    |
    | Not 100% of the time, but more than not.
    |
    | Has this been observed before ? I can't find mention of it.

    FWIW, I can't reproduce this on 2.0_STABLE or 3.99.8.
    -- Rui Paulo

    PGP SIGNATURE
    Version: GnuPG v1.4.1 (NetBSD)

    fl08yP3X3TplDiJeHBldq/Q=
    =HPJm
    PGP SIGNATURE
  • No.3 | | 559 bytes | |

    Sun(21)/Aug/05 - , Rui Paulo wrote:
    2005.08.21 18:02:44 +0000, Scott R. Burns wrote:
    | I am using NetBSD/i386 V2.0.2 and frequently on my servers if I try:
    |
    | cd /kern
    | tail msgbuf
    |
    | I receive a: "Segmentation fault"
    |
    | Not 100% of the time, but more than not.
    |
    | Has this been observed before ? I can't find mention of it.

    FWIW, I can't reproduce this on 2.0_STABLE or 3.99.8.

    Well the machine I tested this on was from the 2.0.2 .iso. Am going to
    cvsup tomorrow and see if anything changes.
  • No.4 | | 1511 bytes | |

    3.99.7:

    root@loan8cd /kern
    root@loan8tail msgbuf
    tail: msgbuf: File too large

    at least no crash less and cat display it fine.

    2005/8/22, Hubert Feyrer <hubertf (AT) gmx (DOT) de>:
    In article <@Netcontech.Comyou wrote:
    I am using NetBSD/i386 V2.0.2 and frequently on my servers if I try:

    cd /kern
    tail msgbuf

    I receive a: "Segmentation fault"

    Not 100% of the time, but more than not.

    Has this been observed before ? I can't find mention of it.

    Poking it seems that the mmap() in forward.c:305 returns a 0 pointer (see
    below0, which seems pretty strange to me. I can understand why mmap()
    would not work on this kind of file, but I'd argue that tail(1) should
    fall back to just open(2) and maybe lseek(2) and read(2) then.

    Looking at other implementations (source) may be interesting

    - Hubert

    (gdb) run /kern/msgbuf
    The program being debugged has been started already.
    Start it from the beginning? (y or n) y

    Starting program: / /kern/msgbuf

    Breakpoint 1, rlines (fp=0x4810a340, off=10, sbp=0xbfbff3a0)
    at /
    304 while (off) {
    (gdb) p off
    $9 = 10
    (gdb) p mmap_size
    $10 = 16368
    (gdb) p mmap_offset
    $11 = 0
    (gdb) step
    305 start = mmap(NULL, (size_t)mmap_size, PRT_READ,
    (gdb)
    307 if (start == MAP_FAILED) {
    (gdb) p start
    $12 = 0x0
    (gdb) print *start
    Error accessing memory address 0x0: Invalid argument.
    (gdb)
  • No.5 | | 328 bytes | |

    Sun, Aug 21, 2005 at 11:54:38PM +0100, Rui Paulo wrote:
    FWIW, I can't reproduce this on 2.0_STABLE or 3.99.8.

    RCS file: /,v

    revision 1.24
    date: 2005/05/20 13:16:54; author: chs; state: Exp; lines: +1 -2
    kernfs does not support mmap(), remove code that pretends that it does.

    Martin

Re: tailing of /kern/msgbuf


max 4000 letters.
Your nickname that display:
In order to stop the spam: 3 + 2 =
QUESTION ON "BSD"

EMSDN.COM