Re: Loading zfs module results in hangup on i386

2021-05-08 Thread Yasuhiro Kimura
From: Yasuhiro Kimura 
Subject: Re: Loading zfs module results in hangup on i386
Date: Sat, 08 May 2021 07:44:15 +0900 (JST)

>> Now I think I know what is the source of problem. After all, on
>> 13.0-RELEASE i386 system simply loading zfs module results in system
>> hang up.
>> 
>> The steps to reproduce it are,
>> 
>> 1. Boot with install media of 13.0-RELEASE i386
>> 2. At the first menu of FreeBSD installer, select 'Shell'.
>> 3. At the shell prompt, type `kldload zfs` and return key.
>> 
>> I confirmed hangup happens with VirtualBox, VMware Player and my bare
>> metal PC environement. So the problem doesn't depend on hardware.
>> 
>> And hangup also happens with 13-STABLE and 14-CURRENT.
> 
> This problem is already reported to Bugzilla.
> 
> Bug 254177 When ZFS is recognized, An i386 machine with a lot of memory hangs.
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254177

Referencing the bug report, I applied attached patch to d474440ab33 of
main (14-CURRENT). built install image and tried install of ZFS root
i386 system with it. Then it completed successfully with 8GB memory.

Additionally GENERIC kernel recognizes 8GB of memory. And ZFS root
system works fine without any tuning.

--
diff --git a/sys/contrib/openzfs/module/zfs/dbuf.c 
b/sys/contrib/openzfs/module/zfs/dbuf.c
index d48dc7943a2..c85500453fb 100644
--- a/sys/contrib/openzfs/module/zfs/dbuf.c
+++ b/sys/contrib/openzfs/module/zfs/dbuf.c
@@ -796,7 +796,7 @@ dbuf_init(void)
 * By default, the table will take up
 * totalmem * sizeof(void*) / 8K (1MB per GB with 8-byte pointers).
 */
-   while (hsize * zfs_arc_average_blocksize < physmem * PAGESIZE)
+   while (hsize * zfs_arc_average_blocksize < (uint64_t)physmem * PAGESIZE)
hsize <<= 1;
 
 retry:
--

---
Yasuhiro Kimura
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Loading zfs module results in hangup on i386

2021-05-07 Thread Yasuhiro Kimura
From: Yasuhiro Kimura 
Subject: Loading zfs module results in hangup on i386 (Re: Install of 
13.0-RELEASE i386 with ZFS root hangs up)
Date: Sat, 08 May 2021 07:31:47 +0900 (JST)

> Now I think I know what is the source of problem. After all, on
> 13.0-RELEASE i386 system simply loading zfs module results in system
> hang up.
> 
> The steps to reproduce it are,
> 
> 1. Boot with install media of 13.0-RELEASE i386
> 2. At the first menu of FreeBSD installer, select 'Shell'.
> 3. At the shell prompt, type `kldload zfs` and return key.
> 
> I confirmed hangup happens with VirtualBox, VMware Player and my bare
> metal PC environement. So the problem doesn't depend on hardware.
> 
> And hangup also happens with 13-STABLE and 14-CURRENT.

This problem is already reported to Bugzilla.

Bug 254177 When ZFS is recognized, An i386 machine with a lot of memory hangs.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254177

---
Yasuhiro Kimura
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Loading zfs module results in hangup on i386 (Re: Install of 13.0-RELEASE i386 with ZFS root hangs up)

2021-05-07 Thread Yasuhiro Kimura
From: Yasuhiro Kimura 
Subject: Install of 13.0-RELEASE i386 with ZFS root hangs up
Date: Fri, 07 May 2021 21:47:59 +0900 (JST)

> Hello,
> 
> Does anyone succeed to install 13.0-RELEASE i386 with ZFS root?
> 
> I tried this with VirtualBox and VMware Player on Windows with
> following VM condition.
> 
> * 4 CPUs
> * 8GB memory
> * 100GB disk
> * Bridge mode NIC
> 
> But in both cases, VM gets high CPU load and hangs up after I moved
> to 'YES' at 'ZFS Configuration' menu and type return key.
> 
> If I select UFS root installation completes successfully. So the
> problem is specific to ZFS root.

Now I think I know what is the source of problem. After all, on
13.0-RELEASE i386 system simply loading zfs module results in system
hang up.

The steps to reproduce it are,

1. Boot with install media of 13.0-RELEASE i386
2. At the first menu of FreeBSD installer, select 'Shell'.
3. At the shell prompt, type `kldload zfs` and return key.

I confirmed hangup happens with VirtualBox, VMware Player and my bare
metal PC environement. So the problem doesn't depend on hardware.

And hangup also happens with 13-STABLE and 14-CURRENT.

---
Yasuhiro Kimura
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"