On Sun, Dec 17, 2023 at 08:23:53PM +0100, Alexander Klimov wrote:

> 
> 
> On 17.12.23 19:19, Otto Moerbeek wrote:
> > On Sun, Dec 17, 2023 at 07:07:40PM +0100, Otto Moerbeek wrote:
> > 
> > > On Sun, Dec 17, 2023 at 06:55:27PM +0100, Alexander Klimov wrote:
> > > 
> > > > Much better!
> > > > 
> > > > Program terminated with signal 11, Segmentation fault.
> > > > #0  0x000008e920ed287f in searchdir (ino=7946491, blkno=Unhandled dwarf 
> > > > expression opcode 0xa3
> > > > )
> > > >      at /usr/src/sbin/dump/traverse.c:474
> > > > 474                             if (TSTINO(dp->d_ino, dumpinomap)) {
> > > > (gdb) info locals
> > > > dblk = 0x3633633264006136 <Address 0x3633633264006136 out of bounds>
> > > > ret = 0
> > > > loc = 29445
> > > > mode = Variable "mode" is not available.
> > > > (gdb) p *dblk
> > > > Cannot access memory at address 0x3633633264006136
> > > > (gdb) p dp
> > > > No symbol "dp" in current context.
> > > > (gdb) p ip
> > > > Variable "ip" is not available.
> > > > (gdb) p ino
> > > > $7 = 7946491
> > > > (gdb) p blkno
> > > > Unhandled dwarf expression opcode 0xa3
> > > > (gdb) p size
> > > > $8 = 186
> > > > (gdb) p filesize
> > > > Unhandled dwarf expression opcode 0xa3
> > > > (gdb) p tapesize
> > > > Variable "tapesize" is not available.
> > > > (gdb) p nodump
> > > > $9 = 0
> > > > (gdb) p dp
> > > > No symbol "dp" in current context.
> > > > (gdb) p ip
> > > > Variable "ip" is not available.
> > > > (gdb) p loc
> > > > $10 = 29445
> > > > (gdb) p dblk
> > > > $11 = 0x3633633264006136 <Address 0x3633633264006136 out of bounds>
> > > > (gdb) p mode
> > > > Variable "mode" is not available.
> > > > (gdb) p ret
> > > > $12 = 0
> > > > (gdb)
> > > > 
> > > > But, admittedly, I'm not very familiar with the code.
> > > > So I can only guess. Too large offset? Too less memory? ...
> > > > 
> > > > On 17.12.23 17:27, Otto Moerbeek wrote:
> > > > > Rebuild with
> > > > > cd /usr/src/sbin/dump
> > > > > make obj
> > > > > make clean
> > > > > DEBUG=-g make
> > > > > 
> > > > > And then run gdb again.
> > > 
> > > Install gdb from packages and then run egdb. It understands moden
> > > DWARF expresssions better.
> 
> (gdb) bt
> #0  0x000008e920ed287f in ?? ()
> #1  0x00000000007940fb in ?? ()
> #2  0x000008e920f3d2c8 in ?? ()
> #3  0x000074cace43cd60 in ?? ()
> #4  0x000008e900000000 in ?? ()
> #5  0x0000000000000000 in ?? ()
> (gdb)
> 
> > > The value of size is also interesting.
> > 
> > I meant the global mapsize. And while there, dumpinomap is interesting
> > as well.
> 
> (gdb) p dumpinomap
> $1 = 0x0

So it looks like allocation of dumpinomap failed.

> (gdb) p mapsize
> $2 = 2283
> (gdb)
> 
> > 
> > Can you also show
> > 
> > $ doas dumpfs /dev/rsd0a |head -20
> 
> tower# mount
> /dev/sd6a on / type ffs (local, wxallowed)
> /dev/sd7a on /raid1 type ffs (local, wxallowed)
> tower# dumpfs /dev/rsd6a |head -20
> magic 19540119 (FFS2) time    Sun Dec 17 19:56:26 2023
> superblock location   65536   id      [ 64c9ff8f f5159e71 ]
> ncg   586     size    122096568       blocks  120174461
> bsize 32768   shift   15      mask    0xffff8000
> fsize 4096    shift   12      mask    0xfffff000
> frag  8       shift   3       fsbtodb 3
> minfree       5%      optim   time    symlinklen 120
> maxbsize 0    maxbpg  4096    maxcontig 1     contigsumsize 0
> nbfree        14127705        ndir    152086  nifree  28188483        nffree  
> 75665
> bpg   26062   fpg     208496  ipg     52224
> nindir        4096    inopb   128     maxfilesize     2252349704110079
> sbsize        4096    cgsize  32768   csaddr  3304    cssize  12288
> sblkno        24      cblkno  32      iblkno  40      dblkno  3304
> cgrotor       0       fmod    0       ronly   0       clean   0
> avgfpdir 64   avgfilesize 16384
> flags none
> fsmnt /
> volname               swuid   0
> 
> cs[].cs_(nbfree,ndir,nifree,nffree):
> tower#
> 
> > 
> > (replacing rsd0a with your device plus the exact dump command line you are 
> > using?
> 
> dump -3 -auf - /
> 
> > 
> >     -Otto
> > 
> > > 
> > > Also: is your filesystem clean? To be sure, unmount and run fsck on it.
> > > 
> > >   -Otto
> > > 
> 
> If I say no, will you still consider my report a bug in dump(8)?
> :see_no_evil_monkey:
> 
> tower# fsck_ffs -fn /dev/rsd6a

Trying reboot into sing user mode and run fsck then. in single-suser
mode initially the root fs is mounted r/o so this way you avoid having
to check a mounted filesystem. Use fsck -f to force checking.

But to get back to your original issue. You seem to have to little
memory available to allocate all tables needed by dump (the code lacks
a few checks in that area, I will prepare a diff for that). Please
show ulimit -a. I suspect you -d (datasize) is too low.

        -Otto

> ** /dev/rsd6a (NO WRITE)
> ** Last Mounted on /
> ** Root file system
> ** Phase 1 - Check Blocks and Sizes
> INCORRECT BLOCK COUNT I=2351999 (32 should be 0)
> CORRECT? no
> 
> INCORRECT BLOCK COUNT I=6058144 (960 should be 0)
> CORRECT? no
> 
> ** Phase 2 - Check Pathnames
> UNALLOCATED  I=6111132  OWNER=_tor MODE=100600
> SIZE=16419 MTIME=Dec 17 20:03 2023
> FILE=/var/tor/state
> 
> REMOVE? no
> 
> UNALLOCATED  I=7519395  OWNER=_icinga MODE=100644
> SIZE=0 MTIME=Dec 17 20:04 2023
> FILE=/var/spool/icinga2/tmp/service-perfdata
> 
> REMOVE? no
> 
> UNALLOCATED  I=7519396  OWNER=_icinga MODE=100644
> SIZE=0 MTIME=Dec 17 20:04 2023
> FILE=/var/spool/icinga2/tmp/host-perfdata
> 
> REMOVE? no
> 
> UNALLOCATED  I=7519385  OWNER=_icinga MODE=100644
> SIZE=1496 MTIME=Dec 17 20:02 2023
> FILE=/var/spool/icinga2/perfdata/service-perfdata.1702839725
> 
> REMOVE? no
> 
> UNALLOCATED  I=7519386  OWNER=_icinga MODE=100644
> SIZE=0 MTIME=Dec 17 20:01 2023
> FILE=/var/spool/icinga2/perfdata/host-perfdata.1702839725
> 
> REMOVE? no
> 
> UNALLOCATED  I=7519387  OWNER=_icinga MODE=100644
> SIZE=1518 MTIME=Dec 17 20:02 2023
> FILE=/var/spool/icinga2/perfdata/service-perfdata.1702839755
> 
> REMOVE? no
> 
> UNALLOCATED  I=7519388  OWNER=_icinga MODE=100644
> SIZE=0 MTIME=Dec 17 20:02 2023
> FILE=/var/spool/icinga2/perfdata/host-perfdata.1702839755
> 
> REMOVE? no
> 
> UNALLOCATED  I=7519389  OWNER=_icinga MODE=100644
> SIZE=1521 MTIME=Dec 17 20:03 2023
> FILE=/var/spool/icinga2/perfdata/service-perfdata.1702839785
> 
> REMOVE? no
> 
> UNALLOCATED  I=7990628  OWNER=_icinga MODE=100600
> SIZE=219803 MTIME=Dec 17 20:04 2023
> FILE=/var/lib/icinga2/icinga2.state
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946615  OWNER=_opensearch MODE=100644
> SIZE=417 MTIME=Dec 17 20:04 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/translog/translog-1310.tlog
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946588  OWNER=_opensearch MODE=100644
> SIZE=0 MTIME=Dec 17 20:04 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/index/_26h_Lucene90FieldsIndex-doc_ids_4cy.tmp
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946699  OWNER=_opensearch MODE=100644
> SIZE=7511 MTIME=Dec 17 20:01 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/index/_26g.cfs
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946700  OWNER=_opensearch MODE=100644
> SIZE=479 MTIME=Dec 17 20:01 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/index/_26g.cfe
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946701  OWNER=_opensearch MODE=100644
> SIZE=326 MTIME=Dec 17 20:01 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/index/_26g.si
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946894  OWNER=_opensearch MODE=100644
> SIZE=326 MTIME=Dec 17 20:01 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/index/_26f.si
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946871  OWNER=_opensearch MODE=100644
> SIZE=13890 MTIME=Dec 17 20:01 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/index/_26f.cfs
> 
> REMOVE? no
> 
> UNALLOCATED  I=7946893  OWNER=_opensearch MODE=100644
> SIZE=479 MTIME=Dec 17 20:01 2023
> FILE=/var/opensearch/nodes/0/indices/lR78M980QdaxejdE1G3jVg/0/index/_26f.cfe
> 
> REMOVE? no
> 
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> UNREF FILE I=2350086  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov 29 21:56 2023
> CLEAR? no
> 
> UNREF FILE I=2350335  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov 29 21:56 2023
> CLEAR? no
> 
> UNREF FILE I=2351645  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov 29 21:56 2023
> CLEAR? no
> 
> UNREF FILE I=2351646  OWNER=_mysql MODE=100600
> SIZE=0 MTIME=Nov 29 21:56 2023
> CLEAR? no
> 
> UNREF FILE I=2351647  OWNER=root MODE=100666
> SIZE=0 MTIME=Dec 10 18:58 2023
> CLEAR? no
> 
> UNREF FILE I=2351649  OWNER=_opensearch MODE=100600
> SIZE=32768 MTIME=Dec 17 19:59 2023
> CLEAR? no
> 
> UNREF FILE I=2351650  OWNER=root MODE=100666
> SIZE=0 MTIME=Dec 10 18:58 2023
> CLEAR? no
> 
> UNREF FILE I=2351664  OWNER=_opensearch MODE=100644
> SIZE=107648 MTIME=Nov 29 21:57 2023
> CLEAR? no
> 
> UNREF FILE I=2351669  OWNER=_opensearch MODE=100600
> SIZE=4096 MTIME=Nov 29 22:02 2023
> CLEAR? no
> 
> UNREF FILE I=2351964  OWNER=_logstash MODE=100600
> SIZE=32768 MTIME=Dec 17 19:59 2023
> CLEAR? no
> 
> UNREF FILE I=2351999  OWNER=root MODE=100600
> SIZE=456 MTIME=Dec 17 20:14 2023
> CLEAR? no
> 
> UNREF FILE I=6058019  OWNER=root MODE=100444
> SIZE=31035 MTIME=Nov 29 21:56 2023
> CLEAR? no
> 
> UNREF FILE I=6058020  OWNER=root MODE=100444
> SIZE=31035 MTIME=Nov 28 22:33 2023
> CLEAR? no
> 
> UNREF FILE I=6058144  OWNER=root MODE=0
> SIZE=0 MTIME=Dec 17 20:00 2023
> CLEAR? no
> 
> LINK COUNT FILE I=6110878  OWNER=_opensearch MODE=0
> SIZE=0 MTIME=Dec 17 20:19 2023  COUNT 0 SHOULD BE -1
> ADJUST? no
> 
> UNREF FILE  I=7946502  OWNER=_smtpq MODE=100600
> SIZE=433 MTIME=Dec 17 20:08 2023
> RECONNECT? no
> 
> 
> CLEAR? no
> 
> LINK COUNT FILE I=7946602  OWNER=_opensearch MODE=0
> SIZE=0 MTIME=Dec 17 20:15 2023  COUNT 0 SHOULD BE -1
> ADJUST? no
> 
> UNREF FILE I=7990621  OWNER=root MODE=100644
> SIZE=131459 MTIME=Dec 17 12:44 2023
> CLEAR? no
> 
> LINK COUNT FILE I=7990632  OWNER=_icinga MODE=0
> SIZE=0 MTIME=Dec 17 20:19 2023  COUNT 0 SHOULD BE -1
> ADJUST? no
> 
> UNREF FILE I=16666875  OWNER=root MODE=100755
> SIZE=3353944 MTIME=Nov 12 00:30 2023
> CLEAR? no
> 
> UNREF FILE I=23709960  OWNER=root MODE=100444
> SIZE=3680832 MTIME=Nov 28 22:31 2023
> CLEAR? no
> 
> UNREF FILE I=23816364  OWNER=root MODE=100444
> SIZE=317600 MTIME=Nov 28 22:31 2023
> CLEAR? no
> 
> ** Phase 5 - Check Cyl groups
> FREE BLK COUNT(S) WRONG IN SUPERBLK
> SALVAGE? no
> 
> SUMMARY INFORMATION BAD
> SALVAGE? no
> 
> BLK(S) MISSING IN BIT MAPS
> SALVAGE? no
> 
> 2414805 files, 7077073 used, 113097265 free (75665 frags, 14127700 blocks, 
> 0.1% fragmentation)
> tower#

Reply via email to