All of lore.kernel.org
 help / color / mirror / Atom feed
* Occasionally mkfs.reiser4 creates a file system without a UUID
@ 2021-03-12 19:36 Mike Fleetwood
  2021-03-12 19:48 ` Edward Shishkin
  2021-03-13 11:37 ` Edward Shishkin
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Fleetwood @ 2021-03-12 19:36 UTC (permalink / raw)
  To: reiserfs-devel

Hi,

Occasionally mkfs.reiser4 creates a file system without a UUID,
debugfs.reiser4 reports UUID as '<none>'.  This is being detected in
GParted's file system interface CI tests [1] which exercises the resier4
commands.

In a Ubuntu 20.04 LTS VM with both resier4progs-1.2.1-1 package and
current code from GIT, the fault can easily be replicated like this:

truncate -s 256M test.img
i=1
while :
do
  mkfs.reiser4 --force --yes --label '' test.img
  line=`debugfs.reiser4 test.img 2> /dev/null | egrep '^uuid:'`
  echo "[$i] $line"
  ((i++))
  echo "$line" | grep -q '<none>' && break
done

Output fragment:
[1] uuid:        17073919-e41d-4892-9b22-4294d1544c4a
[2] uuid:        af2821de-ea85-4f20-9621-4fbd128b3fb8
[3] uuid:        c0fb805b-e224-4695-a504-d87460d158ae
...
[35] uuid:        d604794d-097f-4810-bbb3-01a1518f3ef1
[36] uuid:        9634100c-1f98-42b3-a684-c9df77ab54e2
[37] uuid:        <none>

Performing the same test with resierfs and ext4 runs for many hours
doing 100,000s of iterations without issue.

Thanks,
Mike

[1] Sporadic failure of test case
My/SupportedFileSystemsTest.CreateAndReadUUID/reiser4
    https://gitlab.gnome.org/GNOME/gparted/-/issues/145

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Occasionally mkfs.reiser4 creates a file system without a UUID
  2021-03-12 19:36 Occasionally mkfs.reiser4 creates a file system without a UUID Mike Fleetwood
@ 2021-03-12 19:48 ` Edward Shishkin
  2021-03-13 11:37 ` Edward Shishkin
  1 sibling, 0 replies; 6+ messages in thread
From: Edward Shishkin @ 2021-03-12 19:48 UTC (permalink / raw)
  To: Mike Fleetwood, reiserfs-devel

On 03/12/2021 08:36 PM, Mike Fleetwood wrote:
> Hi,
> 
> Occasionally mkfs.reiser4 creates a file system without a UUID,
> debugfs.reiser4 reports UUID as '<none>'.  This is being detected in
> GParted's file system interface CI tests [1] which exercises the resier4
> commands.


Yeah, I know about this problem.
Unfortunately, haven't had a chance to find the root cause yet...
It shouldn't be a critical problem for 4.X.Y
For 5.X.Y - yes - it becomes sticky..

Thanks,
Edward.


> 
> In a Ubuntu 20.04 LTS VM with both resier4progs-1.2.1-1 package and
> current code from GIT, the fault can easily be replicated like this:
> 
> truncate -s 256M test.img
> i=1
> while :
> do
>    mkfs.reiser4 --force --yes --label '' test.img
>    line=`debugfs.reiser4 test.img 2> /dev/null | egrep '^uuid:'`
>    echo "[$i] $line"
>    ((i++))
>    echo "$line" | grep -q '<none>' && break
> done
> 
> Output fragment:
> [1] uuid:        17073919-e41d-4892-9b22-4294d1544c4a
> [2] uuid:        af2821de-ea85-4f20-9621-4fbd128b3fb8
> [3] uuid:        c0fb805b-e224-4695-a504-d87460d158ae
> ...
> [35] uuid:        d604794d-097f-4810-bbb3-01a1518f3ef1
> [36] uuid:        9634100c-1f98-42b3-a684-c9df77ab54e2
> [37] uuid:        <none>
> 
> Performing the same test with resierfs and ext4 runs for many hours
> doing 100,000s of iterations without issue.
> 
> Thanks,
> Mike
> 
> [1] Sporadic failure of test case
> My/SupportedFileSystemsTest.CreateAndReadUUID/reiser4
>      https://gitlab.gnome.org/GNOME/gparted/-/issues/145
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Occasionally mkfs.reiser4 creates a file system without a UUID
  2021-03-12 19:36 Occasionally mkfs.reiser4 creates a file system without a UUID Mike Fleetwood
  2021-03-12 19:48 ` Edward Shishkin
@ 2021-03-13 11:37 ` Edward Shishkin
  2021-03-13 14:28   ` Edward Shishkin
  1 sibling, 1 reply; 6+ messages in thread
From: Edward Shishkin @ 2021-03-13 11:37 UTC (permalink / raw)
  To: Mike Fleetwood, reiserfs-devel

On 03/12/2021 08:36 PM, Mike Fleetwood wrote:
> Hi,
> 
> Occasionally mkfs.reiser4 creates a file system without a UUID,
> debugfs.reiser4 reports UUID as '<none>'.  This is being detected in
> GParted's file system interface CI tests [1] which exercises the resier4
> commands.
> 
> In a Ubuntu 20.04 LTS VM with both resier4progs-1.2.1-1 package and
> current code from GIT, the fault can easily be replicated like this:
> 
> truncate -s 256M test.img
> i=1
> while :
> do
>    mkfs.reiser4 --force --yes --label '' test.img
>    line=`debugfs.reiser4 test.img 2> /dev/null | egrep '^uuid:'`
>    echo "[$i] $line"
>    ((i++))
>    echo "$line" | grep -q '<none>' && break
> done
> 
> Output fragment:
> [1] uuid:        17073919-e41d-4892-9b22-4294d1544c4a
> [2] uuid:        af2821de-ea85-4f20-9621-4fbd128b3fb8
> [3] uuid:        c0fb805b-e224-4695-a504-d87460d158ae
> ...
> [35] uuid:        d604794d-097f-4810-bbb3-01a1518f3ef1
> [36] uuid:        9634100c-1f98-42b3-a684-c9df77ab54e2
> [37] uuid:        <none>
> 
> Performing the same test with resierfs and ext4 runs for many hours
> doing 100,000s of iterations without issue.
> 


It seems that debugfs.reiser4 prints uuid incorrectly: it assumes that
binary uuid can't contain '\0' symbols, which apparently is wrong.
Thus, if the first uuid's symbol is '\0', debugfs thinks that uuid is
not set and prints "none" ;)

I'll try to prepare a fixup a bit later.
Special thanks for the nice testing script!

Edward.


> Thanks,
> Mike
> 
> [1] Sporadic failure of test case
> My/SupportedFileSystemsTest.CreateAndReadUUID/reiser4
>      https://gitlab.gnome.org/GNOME/gparted/-/issues/145
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Occasionally mkfs.reiser4 creates a file system without a UUID
  2021-03-13 11:37 ` Edward Shishkin
@ 2021-03-13 14:28   ` Edward Shishkin
  2021-03-15 22:20     ` Mike Fleetwood
  0 siblings, 1 reply; 6+ messages in thread
From: Edward Shishkin @ 2021-03-13 14:28 UTC (permalink / raw)
  To: Mike Fleetwood, reiserfs-devel



On 03/13/2021 12:37 PM, Edward Shishkin wrote:
> On 03/12/2021 08:36 PM, Mike Fleetwood wrote:
>> Hi,
>>
>> Occasionally mkfs.reiser4 creates a file system without a UUID,
>> debugfs.reiser4 reports UUID as '<none>'.  This is being detected in
>> GParted's file system interface CI tests [1] which exercises the resier4
>> commands.
>>
>> In a Ubuntu 20.04 LTS VM with both resier4progs-1.2.1-1 package and
>> current code from GIT, the fault can easily be replicated like this:
>>
>> truncate -s 256M test.img
>> i=1
>> while :
>> do
>>    mkfs.reiser4 --force --yes --label '' test.img
>>    line=`debugfs.reiser4 test.img 2> /dev/null | egrep '^uuid:'`
>>    echo "[$i] $line"
>>    ((i++))
>>    echo "$line" | grep -q '<none>' && break
>> done
>>
>> Output fragment:
>> [1] uuid:        17073919-e41d-4892-9b22-4294d1544c4a
>> [2] uuid:        af2821de-ea85-4f20-9621-4fbd128b3fb8
>> [3] uuid:        c0fb805b-e224-4695-a504-d87460d158ae
>> ...
>> [35] uuid:        d604794d-097f-4810-bbb3-01a1518f3ef1
>> [36] uuid:        9634100c-1f98-42b3-a684-c9df77ab54e2
>> [37] uuid:        <none>
>>
>> Performing the same test with resierfs and ext4 runs for many hours
>> doing 100,000s of iterations without issue.
>>
> 
> 
> It seems that debugfs.reiser4 prints uuid incorrectly: it assumes that
> binary uuid can't contain '\0' symbols, which apparently is wrong.
> Thus, if the first uuid's symbol is '\0', debugfs thinks that uuid is
> not set and prints "none" ;)
> 
> I'll try to prepare a fixup a bit later.
> Special thanks for the nice testing script!
> 


Here is the fixup:
https://github.com/edward6/reiser4progs/commit/4802cdb18ae03031d0e51a58b6655f3b99021ec2

Thanks,
Edward.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Occasionally mkfs.reiser4 creates a file system without a UUID
  2021-03-13 14:28   ` Edward Shishkin
@ 2021-03-15 22:20     ` Mike Fleetwood
  2021-03-15 23:23       ` Edward Shishkin
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Fleetwood @ 2021-03-15 22:20 UTC (permalink / raw)
  To: Edward Shishkin; +Cc: reiserfs-devel

On Sat, 13 Mar 2021 at 14:28, Edward Shishkin <edward.shishkin@gmail.com> wrote:
>
> On 03/13/2021 12:37 PM, Edward Shishkin wrote:
> > On 03/12/2021 08:36 PM, Mike Fleetwood wrote:
> >> Hi,
> >>
> >> Occasionally mkfs.reiser4 creates a file system without a UUID,
> >> debugfs.reiser4 reports UUID as '<none>'.  This is being detected in
> >> GParted's file system interface CI tests [1] which exercises the resier4
> >> commands.
> >>
> >> In a Ubuntu 20.04 LTS VM with both resier4progs-1.2.1-1 package and
> >> current code from GIT, the fault can easily be replicated like this:
> >>
> >> truncate -s 256M test.img
> >> i=1
> >> while :
> >> do
> >>    mkfs.reiser4 --force --yes --label '' test.img
> >>    line=`debugfs.reiser4 test.img 2> /dev/null | egrep '^uuid:'`
> >>    echo "[$i] $line"
> >>    ((i++))
> >>    echo "$line" | grep -q '<none>' && break
> >> done
> >>
> >> Output fragment:
> >> [1] uuid:        17073919-e41d-4892-9b22-4294d1544c4a
> >> [2] uuid:        af2821de-ea85-4f20-9621-4fbd128b3fb8
> >> [3] uuid:        c0fb805b-e224-4695-a504-d87460d158ae
> >> ...
> >> [35] uuid:        d604794d-097f-4810-bbb3-01a1518f3ef1
> >> [36] uuid:        9634100c-1f98-42b3-a684-c9df77ab54e2
> >> [37] uuid:        <none>
> >>
> >> Performing the same test with resierfs and ext4 runs for many hours
> >> doing 100,000s of iterations without issue.
> >>
> >
> >
> > It seems that debugfs.reiser4 prints uuid incorrectly: it assumes that
> > binary uuid can't contain '\0' symbols, which apparently is wrong.
> > Thus, if the first uuid's symbol is '\0', debugfs thinks that uuid is
> > not set and prints "none" ;)
> >
> > I'll try to prepare a fixup a bit later.
> > Special thanks for the nice testing script!
> >
>
>
> Here is the fixup:
> https://github.com/edward6/reiser4progs/commit/4802cdb18ae03031d0e51a58b6655f3b99021ec2

Your fix to debugfs.reiser4 allows for printing of UUIDs correctly.
Here's my pull request to fix mkfs.reiser4 for not writing UUIDs
correctly in the first place.
https://github.com/edward6/reiser4progs/pull/1

Thanks,
Mike

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Occasionally mkfs.reiser4 creates a file system without a UUID
  2021-03-15 22:20     ` Mike Fleetwood
@ 2021-03-15 23:23       ` Edward Shishkin
  0 siblings, 0 replies; 6+ messages in thread
From: Edward Shishkin @ 2021-03-15 23:23 UTC (permalink / raw)
  To: Mike Fleetwood; +Cc: reiserfs-devel



On 03/15/2021 11:20 PM, Mike Fleetwood wrote:
> On Sat, 13 Mar 2021 at 14:28, Edward Shishkin <edward.shishkin@gmail.com> wrote:
>>
>> On 03/13/2021 12:37 PM, Edward Shishkin wrote:
>>> On 03/12/2021 08:36 PM, Mike Fleetwood wrote:
>>>> Hi,
>>>>
>>>> Occasionally mkfs.reiser4 creates a file system without a UUID,
>>>> debugfs.reiser4 reports UUID as '<none>'.  This is being detected in
>>>> GParted's file system interface CI tests [1] which exercises the resier4
>>>> commands.
>>>>
>>>> In a Ubuntu 20.04 LTS VM with both resier4progs-1.2.1-1 package and
>>>> current code from GIT, the fault can easily be replicated like this:
>>>>
>>>> truncate -s 256M test.img
>>>> i=1
>>>> while :
>>>> do
>>>>     mkfs.reiser4 --force --yes --label '' test.img
>>>>     line=`debugfs.reiser4 test.img 2> /dev/null | egrep '^uuid:'`
>>>>     echo "[$i] $line"
>>>>     ((i++))
>>>>     echo "$line" | grep -q '<none>' && break
>>>> done
>>>>
>>>> Output fragment:
>>>> [1] uuid:        17073919-e41d-4892-9b22-4294d1544c4a
>>>> [2] uuid:        af2821de-ea85-4f20-9621-4fbd128b3fb8
>>>> [3] uuid:        c0fb805b-e224-4695-a504-d87460d158ae
>>>> ...
>>>> [35] uuid:        d604794d-097f-4810-bbb3-01a1518f3ef1
>>>> [36] uuid:        9634100c-1f98-42b3-a684-c9df77ab54e2
>>>> [37] uuid:        <none>
>>>>
>>>> Performing the same test with resierfs and ext4 runs for many hours
>>>> doing 100,000s of iterations without issue.
>>>>
>>>
>>>
>>> It seems that debugfs.reiser4 prints uuid incorrectly: it assumes that
>>> binary uuid can't contain '\0' symbols, which apparently is wrong.
>>> Thus, if the first uuid's symbol is '\0', debugfs thinks that uuid is
>>> not set and prints "none" ;)
>>>
>>> I'll try to prepare a fixup a bit later.
>>> Special thanks for the nice testing script!
>>>
>>
>>
>> Here is the fixup:
>> https://github.com/edward6/reiser4progs/commit/4802cdb18ae03031d0e51a58b6655f3b99021ec2
> 
> Your fix to debugfs.reiser4 allows for printing of UUIDs correctly.
> Here's my pull request to fix mkfs.reiser4 for not writing UUIDs
> correctly in the first place.
> https://github.com/edward6/reiser4progs/pull/1


Mike, thanks a lot!

For me personally, this is the worst kind of bugs (hardly fishable by
code reviews plus not always reproducible).

I cherry pick-ed your commit also for the parallel branch "format41":
https://github.com/edward6/reiser4progs/commit/01a5e0e41ec8d5147091d44e902d60f61c336f30

Edward.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-15 23:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 19:36 Occasionally mkfs.reiser4 creates a file system without a UUID Mike Fleetwood
2021-03-12 19:48 ` Edward Shishkin
2021-03-13 11:37 ` Edward Shishkin
2021-03-13 14:28   ` Edward Shishkin
2021-03-15 22:20     ` Mike Fleetwood
2021-03-15 23:23       ` Edward Shishkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.