Boot error with OpenZFS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Boot error with OpenZFS

Guido Falsi-7
Hi,

I'm trying to update to recent head, but I can't boot my system with the
compiled kernel.

The system has ZFS on root and was working with previous kernel (before
OpenZFS migration).

I'm trying to boot r365437.

I load zfs from loader with zfs_load="YES" as usual and get this error
message at the start of kernel output:

link_elf_obj: symbol lockstat_enabled undefined
KLD file zfs.ko - could not finalize loading

The zfs.ko file is aligned with the kernel and I did not observe errors
while compiling.

I am able to make the machine using the kernel from the most recent head
snapshot on ftp.freebsd.org [1]. I'm also going to try with a kernel
with debug symbols and one with GENERIC config.

Maybe I'm just missing some required kernel configuration option? Or
maybe with the migration to OpenZFS some required symbol is not being
exported anymore?

Thanks in advance!



[1] FreeBSD-13.0-CURRENT-amd64-20200903-c122cf32f2a-memstick.img.xz

--
Guido Falsi <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Boot error with OpenZFS

Guido Falsi-7
On 08/09/20 10:01, Guido Falsi wrote:

> Hi,
>
> I'm trying to update to recent head, but I can't boot my system with the
> compiled kernel.
>
> The system has ZFS on root and was working with previous kernel (before
> OpenZFS migration).
>
> I'm trying to boot r365437.
>
> I load zfs from loader with zfs_load="YES" as usual and get this error
> message at the start of kernel output:
>
> link_elf_obj: symbol lockstat_enabled undefined
> KLD file zfs.ko - could not finalize loading
>
> The zfs.ko file is aligned with the kernel and I did not observe errors
> while compiling.
>
> I am able to make the machine using the kernel from the most recent head
> snapshot on ftp.freebsd.org [1]. I'm also going to try with a kernel
> with debug symbols and one with GENERIC config.

A locally built GENERIC works fine, so this is my fault. I clearly have
something wrong in my kernel config.

I'll report anyway as soon as I discover what it is.


--
Guido Falsi <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Boot error with OpenZFS

Guido Falsi-7


On 08/09/20 19:30, Mark Johnston wrote:

> On Tue, Sep 08, 2020 at 07:24:38PM +0200, Guido Falsi wrote:
>> On 08/09/20 10:01, Guido Falsi wrote:
>>> Hi,
>>>
>>> I'm trying to update to recent head, but I can't boot my system with the
>>> compiled kernel.
>>>
>>> The system has ZFS on root and was working with previous kernel (before
>>> OpenZFS migration).
>>>
>>> I'm trying to boot r365437.
>>>
>>> I load zfs from loader with zfs_load="YES" as usual and get this error
>>> message at the start of kernel output:
>>>
>>> link_elf_obj: symbol lockstat_enabled undefined
>>> KLD file zfs.ko - could not finalize loading
>>>
>>> The zfs.ko file is aligned with the kernel and I did not observe errors
>>> while compiling.
>>>
>>> I am able to make the machine using the kernel from the most recent head
>>> snapshot on ftp.freebsd.org [1]. I'm also going to try with a kernel
>>> with debug symbols and one with GENERIC config.
>>
>> A locally built GENERIC works fine, so this is my fault. I clearly have
>> something wrong in my kernel config.
>>
>> I'll report anyway as soon as I discover what it is.
>
> Can you verify that adding "options KDTRACE_HOOKS" fixes the problem?  I
> note that the zfs.ko Makefile has -DKTRACE_HOOKS in CFLAGS, among a few
> other surprising things.

I am in the process of testing that. The machine is compiling. I also
noticed in sys/conf/files:

kern/kern_lockstat.c optional kdtrace_hooks

I'll report back shortly once I've tested it.

--
Guido Falsi <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Boot error with OpenZFS

Guido Falsi-7
In reply to this post by Guido Falsi-7


On 08/09/20 19:30, Mark Johnston wrote:

> On Tue, Sep 08, 2020 at 07:24:38PM +0200, Guido Falsi wrote:
>> On 08/09/20 10:01, Guido Falsi wrote:
>>> Hi,
>>>
>>> I'm trying to update to recent head, but I can't boot my system with the
>>> compiled kernel.
>>>
>>> The system has ZFS on root and was working with previous kernel (before
>>> OpenZFS migration).
>>>
>>> I'm trying to boot r365437.
>>>
>>> I load zfs from loader with zfs_load="YES" as usual and get this error
>>> message at the start of kernel output:
>>>
>>> link_elf_obj: symbol lockstat_enabled undefined
>>> KLD file zfs.ko - could not finalize loading
>>>
>>> The zfs.ko file is aligned with the kernel and I did not observe errors
>>> while compiling.
>>>
>>> I am able to make the machine using the kernel from the most recent head
>>> snapshot on ftp.freebsd.org [1]. I'm also going to try with a kernel
>>> with debug symbols and one with GENERIC config.
>>
>> A locally built GENERIC works fine, so this is my fault. I clearly have
>> something wrong in my kernel config.
>>
>> I'll report anyway as soon as I discover what it is.
>
> Can you verify that adding "options KDTRACE_HOOKS" fixes the problem?  I
> note that the zfs.ko Makefile has -DKTRACE_HOOKS in CFLAGS, among a few
> other surprising things.

Yes, that one was the missing option.

I also noticed mmacy committer r365466 which should fix the issue.

Thanks to all!

--
Guido Falsi <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"