UBIFS-AUTH panic after reboot

Kristof Havasi havasiefr at gmail.com
Mon Sep 21 05:23:11 EDT 2020


On Sat, 19 Sep 2020 at 22:54, Richard Weinberger
<richard.weinberger at gmail.com> wrote:
>
> On Sat, Sep 19, 2020 at 10:02 PM Richard Weinberger
> <richard.weinberger at gmail.com> wrote:
> >
> > On Thu, Sep 17, 2020 at 4:48 PM Kristof Havasi <havasiefr at gmail.com> wrote:
> > > Without "chk_lprops" the panic is only visible after the restart, but if it was
> > > enabled the following assertion was triggering an immediate panic:
> > > (Should I "reformat" long log lines in the future or leave them verbatim?)
> > >
> > > UBIFS error (ubi0:4 pid 649): ubifs_assert_failed: UBIFS assert
> > > failed: (val >> nrbits) == 0 || nrbits == 32, in fs/ubifs/lpt.c:231
> > > UBIFS warning (ubi0:4 pid 649): ubifs_ro_mode.part.1: switched to
> >
> > Hm, the number of bits we ask to pack is smaller than val.
> > Maybe we have some subtle bug where a node length is not correctly
> > calculated.
> >
> > From your other mail:
> > > >         0: free 0 dirty 255408 flags 1 lnum 0
> >
> > Dirty is larger than LEB size (253952). Must not happen.
> >
> > > >         1: free 0 dirty 190192 flags 1 lnum 0
> > > >         2: free 0 dirty 255360 flags 1 lnum 0
> >
> > Same.
> >
> > > >         3: free 0 dirty 248896 flags 1 lnum 0
> >
> > Does the problem also trigger with encryption disabled? So just with
> > authentication?

I couldn't trigger the same error with encryption disabled and authentication
enabled. Even if I enabled all the chk_* knobs under kernel/debug/ubifs/, no
failed assertion or error/warning log could be observed.

ubi0: attached mtd1 (name "ubivols", size 1023 MiB)
ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 253952 bytes
ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 4096
ubi0: VID header offset: 4096 (aligned 4096), data offset: 8192
ubi0: good PEBs: 4063, bad PEBs: 32, corrupted PEBs: 0
ubi0: user volume: 5, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence
number: 460709978
ubi0: available PEBs: 0, total reserved PEBs: 4063, PEBs reserved for
bad PEB handling: 48
ubi0: background thread "ubi_bgt0d" started, PID 638
rtc-rv8803 1-0032: setting system clock to 2020-09-21T09:11:23 UTC (1600679483)
UBIFS (ubi0:4): Mounting in authenticated mode
UBIFS (ubi0:4): background thread "ubifs_bgt0_4" started, PID 642
UBIFS (ubi0:4): UBIFS: mounted UBI device 0, volume 4, name "rootfs"
UBIFS (ubi0:4): LEB size: 253952 bytes (248 KiB), min./max. I/O unit
sizes: 4096 bytes/4096 bytes
UBIFS (ubi0:4): FS size: 1004888064 bytes (958 MiB, 3957 LEBs),
journal size 9404416 bytes (8 MiB, 38 LEBs)
UBIFS (ubi0:4): reserved for root: 0 bytes (0 KiB)
UBIFS (ubi0:4): media format: w4/r0 (latest is w5/r0), UUID
7BFF4409-EE99-4BAB-9091-16FFDEBBD78A, small LPT model
VFS: Mounted root (ubifs filesystem) on device 0:13.

>
> One more question, when you mount ubifs successuflly, you see a line like:
> UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID
> 942AA41D-81B8-4F57-9CE6-0548D0D0DCB0, big LPT model
>
> Does it print big LPT or small LPT model?

small LPT model.

UBIFS (ubi0:4): Mounting in authenticated mode
UBIFS (ubi0:4): Successfully verified super block signature
UBIFS (ubi0:4): background thread "ubifs_bgt0_4" started, PID 634
UBIFS (ubi0:4): UBIFS: mounted UBI device 0, volume 4, name "rootfs"
UBIFS (ubi0:4): LEB size: 253952 bytes (248 KiB), min./max. I/O unit
sizes: 4096 bytes/4096 bytes
UBIFS (ubi0:4): FS size: 1004888064 bytes (958 MiB, 3957 LEBs),
journal size 9404416 bytes (8 MiB, 38 LEBs)
UBIFS (ubi0:4): reserved for root: 0 bytes (0 KiB)
UBIFS (ubi0:4): media format: w5/r0 (latest is w5/r0), UUID
3F835B56-9D63-49F9-A3A8-4EFDF2800462, small LPT model
VFS: Mounted root (ubifs filesystem) on device 0:13.
fscrypt: AES-256-CTS-CBC using implementation "cts(atmel-cbc-aes)"
devtmpfs: mounted
Freeing unused kernel memory: 1024K
fscrypt: AES-256-XTS using implementation "xts(atmel-ecb-aes)"

Thank you,
        Kristof


On Sat, 19 Sep 2020 at 22:54, Richard Weinberger
<richard.weinberger at gmail.com> wrote:
>
> On Sat, Sep 19, 2020 at 10:02 PM Richard Weinberger
> <richard.weinberger at gmail.com> wrote:
> >
> > On Thu, Sep 17, 2020 at 4:48 PM Kristof Havasi <havasiefr at gmail.com> wrote:
> > > Without "chk_lprops" the panic is only visible after the restart, but if it was
> > > enabled the following assertion was triggering an immediate panic:
> > > (Should I "reformat" long log lines in the future or leave them verbatim?)
> > >
> > > UBIFS error (ubi0:4 pid 649): ubifs_assert_failed: UBIFS assert
> > > failed: (val >> nrbits) == 0 || nrbits == 32, in fs/ubifs/lpt.c:231
> > > UBIFS warning (ubi0:4 pid 649): ubifs_ro_mode.part.1: switched to
> >
> > Hm, the number of bits we ask to pack is smaller than val.
> > Maybe we have some subtle bug where a node length is not correctly
> > calculated.
> >
> > From your other mail:
> > > >         0: free 0 dirty 255408 flags 1 lnum 0
> >
> > Dirty is larger than LEB size (253952). Must not happen.
> >
> > > >         1: free 0 dirty 190192 flags 1 lnum 0
> > > >         2: free 0 dirty 255360 flags 1 lnum 0
> >
> > Same.
> >
> > > >         3: free 0 dirty 248896 flags 1 lnum 0
> >
> > Does the problem also trigger with encryption disabled? So just with
> > authentication?
>
> One more question, when you mount ubifs successuflly, you see a line like:
> UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID
> 942AA41D-81B8-4F57-9CE6-0548D0D0DCB0, big LPT model
>
> Does it print big LPT or small LPT model?
>
> --
> Thanks,
> //richard



More information about the linux-mtd mailing list