mmap issue with 22.04.3 and kernel 6.2

Mauricio Faria de Oliveira mfo at canonical.com
Wed Aug 23 13:17:53 UTC 2023


On Tue, Aug 22, 2023 at 9:28 PM Mathieu Fluhr <mathieu.fluhr at gmail.com> wrote:
>
> Hi Mauricio
>
> I have just played for a few hours with the linux-image-6.2.0-32-generic package for jammy, and I think it works well:
> I was able to compile several different AOSP versions that were all problematic with the 6.2.0-26 provided with 22.04.3, si I would say the -32 clearly fixes my issue :)
>
> So, I guess I should just wait for -32 to come into the jammy-updates...
> Thanks for the prompt answer and support!

That's good news! Glad to help.

>
> Kind Regards,
> Mathieu
>
> PS: One thing that might be worth noticing so, is that when I installed the linux-image-6.2.0-32-generic, the headers and modules-extra packages were not automatically installed, and I needed to instal them manually for my nvidia driver module to get re-compiled.

Yes; the linux-image package doesn't depend on the linux-headers or
modules-extra packages.
You can use the meta package with the full Depends: chain,
linux-generic-hwe-22.04 (from linux-meta-hwe-6.2).

>
>
> On Tue, Aug 22, 2023 at 9:35 PM Mauricio Faria de Oliveira <mfo at canonical.com> wrote:
>>
>> On Tue, Aug 22, 2023 at 4:30 PM Mauricio Faria de Oliveira
>> <mfo at canonical.com> wrote:
>> >
>> > Hi Mathieu,
>> >
>> > On Tue, Aug 22, 2023 at 11:20 AM Mathieu Fluhr <mathieu.fluhr at gmail.com> wrote:
>> > >
>> > > Hello,
>> > >
>> > > First of all, I apologize if this is not the right place to report a bug, but for some obscure reason, I cannot login to launchpad with my Ubuntu One account (I always end up on the "Ooops" page...).
>> >
>> > No worries, thanks for reporting an issue in some way.
>> > (For the login issue, see login.ubuntu.com > Support > Other > "When I
>> > try to log in, I get an "OOPS" message. What should I do?")
>> >
>> > If this helps, please know that in the future, you can reach out to
>> > our kernel team specifically, kernel-team at lists.ubuntu.com [2].
>> >
>> > >
>> > > I am compiling (daily) the Android OS (AOSP) which makes a heavy use of hardware resources and several parts of it relies on the mmap() system call. Updating to 22.04.3 last Thursday started to trigger several (non-consistent) build errors, all related to mmap(), claiming that it can't allocate memory.... which is not consistent with the fact that my workstation still had 50GB+ free RAM at that time.
>> > >
>> > > Digging a bit into the issue, I found out that it was a known issue, and that the fix has been merged in the 6.1 LTS kernel [1] but unfortunately not in 6.2, since the patch appeared after the last 6.2.16 release.
>> > >
>> > > I applied it locally and rebuilt a new kernel, and I can confirm this fixes the issue.
>> > > Could it be possible to think about applying it to the official 6.2 ubuntu package so that I don't have to always "downgrade" to the old 5.19 coming from 22.04.2 ?
>> > >
>> > > Kind Regards,
>> > > Mathieu
>> > >
>> > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/lib/maple_tree.c?h=v6.1.45&id=254ee530286aeb6d6de93d05b2247153df590af1
>> >
>> > Looking at the patch [1] ...
>> > """
>> > maple_tree: make maple state reusable after mas_empty_area()
>> > commit 0257d9908d38c0b1669af4bb1bc4dbca1f273fe6 upstream.
>> > """
>> > ... and the lunar/6.2-based kernel package git repo, it should be
>> > available in lunar-proposed.
>>
>> Sorry, you're on jammy (22.04.x) with the 6.2 HWE kernel from lunar,
>> not on lunar.
>> It's also available in jammy-proposed; see below.
>>
>> >
>> > Could you please test it?
>> >
>> > $ git remote get-url origin
>> > git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/lunar
>> >
>> > $ git log --oneline origin/master-next -- lib/maple_tree.c | head -n1
>> > a08052779ad6 maple_tree: make maple state reusable after mas_empty_area()
>> >
>> > $ git show a08052779ad6 | grep 'commit .* upstream'
>> >     commit 0257d9908d38c0b1669af4bb1bc4dbca1f273fe6 upstream.
>> >
>> > $ git describe --contains a08052779ad6
>> > Ubuntu-6.2.0-30.30~288
>> >
>> > $ rmadison -a source linux | grep lunar
>> >  linux | 6.2.0-20.20    | lunar           | source
>> >  linux | 6.2.0-27.28    | lunar-security  | source
>> >  linux | 6.2.0-27.28    | lunar-updates   | source
>> >  linux | 6.2.0-32.32    | lunar-proposed  | source
>> >
>> > $ sudo add-apt-repository -yp proposed
>> >
>> > ubuntu at lunar:~$ apt policy linux-image-6.2.0-32-generic
>> > ...
>> >         100 http://archive.ubuntu.com/ubuntu lunar-proposed/main amd64 Packages
>> >         100 http://security.ubuntu.com/ubuntu lunar-proposed/main amd64 Packages
>> >
>> > $ sudo apt install linux-image-6.2.0-32-generic
>> > $ ... reboot
>> >
>>
>> $ rmadison -a source linux-hwe-6.2
>>  linux-hwe-6.2 | 6.2.0-26.26~22.04.1 | jammy-security | source
>>  linux-hwe-6.2 | 6.2.0-26.26~22.04.1 | jammy-updates  | source
>>  linux-hwe-6.2 | 6.2.0-32.32~22.04.1 | jammy-proposed | source
>>
>> $ rmadison -a amd64 linux-image-6.2.0-32-generic
>>  linux-image-6.2.0-32-generic | 6.2.0-32.32~22.04.1 | jammy-proposed | amd64
>>  linux-image-6.2.0-32-generic | 6.2.0-32.32         | lunar-proposed | amd64
>>
>> So, the steps above should work on jammy too.
>>
>> > cheers,
>> >
>> > [2] https://lists.ubuntu.com/mailman/listinfo/kernel-team
>> >
>> > > --
>> > > Ubuntu-devel-discuss mailing list
>> > > Ubuntu-devel-discuss at lists.ubuntu.com
>> > > Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
>> >
>> >
>> > --
>> > Mauricio Faria de Oliveira
>>
>>
>>
>> --
>> Mauricio Faria de Oliveira



-- 
Mauricio Faria de Oliveira



More information about the Ubuntu-devel-discuss mailing list