[haiku-development] Re: kernel_debug_config.h

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 11 Jan 2020 21:30:38 +0100

Hi Augustin,

Am 11/01/2020 um 03:11 schrieb waddlesplash:

Actually, I fixed the sizing problem recently! : https://github.com/haiku/haiku/commit/cf344027f830f8ecf9e834c49117e8c745db6bd6

Yeah, I noticed after writing that message :-)
Thanks!

Do we have any mechanism to know how the kernel has been compiled?
I don't think so, no.

Okay, I've added that now in hrev53707.
It would also be nice if the kernel_debug_config.h files would end up on the image, so that you can compile compatible drivers on that machine, at least. I've copied *my* header into the DriveEncryption repository, and that isn't really a good solution at all.

I think DriveEncryption may be the only thing in HaikuPorts that even uses this file, likely. Very few packages even install kernel add-ons at all (vmware addons and opensound are the only two that come to mind.)

Yes, but this may happen more often in the future, too.
An ABI change itself is not an issue, as a package can depend on a specific kernel version. But with DEBUG and non-DEBUG builds we may ship two different ABIs that use the same version identifier.
We should probably put that info somewhere, so that packages can depend on it.

I stumbled upon a (reproducible) crash in the kernel driver of
DriveEncryption [1]. It is caused because two threads are in the same
critical region at the same time (guarded by a mutex).
It seems you have forgotten to include the [1] link... :)

I did indeed. I just wanted to link at its github page, anyway: https://github.com/axeld/driveencryption

I might have misread the stack crawls; I managed to capture the same thread twice instead of the other thread within the driver :-/
Anyway, I'm trying to investigate the issue now, and push the changes once I'm done.
Maybe I'll even try to find out how to update the package in HaikuPorts :-)

How are the Haiku packages of our current repository configured,
debug-wise?
master branch builds have KDEBUG_LEVEL=2 (in kernel_debug_config.h), which means "KDEBUG" is on and thus mutexes are sized that way. On R1/beta1, KDEBUG_LEVEL=1, and so (confusingly) "KDEBUG" is *off*, meaning mutexes are inlined.

That is indeed confusing :-) Maybe we should rename if KDEBUG_LOCKS, and, if needed add other similar constants for other use cases instead?

Do have a link on where that information is configured exactly in the builds?

Bye,
   Axel.

Other related posts: