Skip to contentSkip to conversation

Occasional hung with UM after enable VMAP_STACK

DISCUSSION Walter Lozano 3 participants 7 messages Jan 4, 2022 – Jan 5, 2022 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

Hi all,

I noticed that after "um: enable VMAP_STACK" [1] I experienced some occasional hung in my Gitlab CI jobs that use user-mode-linux to build distro images. The configuration use for the building is the one available from Debian, see [2] and [3]. Unfortunately I don't have much information, when the issue arises the job seems to hang and it is cancelled by Gitlab due to a job timeout.

So far I did some bisect to get the commit which introduces the issue and a quick check with latest Linux stable branch master to confirm the issue is still present. I know this is not a proper bug report but I thought it will be better to at least raise a comment.

Thanks in advance,

Walter

[1] http://lists.infradead.org/pipermail/linux-um/2021-August/001657.html

[2] https://packages.debian.org/bookworm/user-mode-linux

[3] https://salsa.debian.org/uml-team/user-mode-linux

Signature · 2 lines
Walter Lozano
Collabora Ltd.
maintainer
#1 lore raw
Quoted 6 lines · Walter Lozano

Hi all,

I noticed that after "um: enable VMAP_STACK" [1] I experienced some occasional hung in my Gitlab CI jobs that use user-mode-linux to build distro images.

Did you actually *enable* VMAP_STACK in the config as well? The commit just makes it *possible* to enable it, you still have to set it yourself. So you should be able to easily check with/without that setting.

johannes

#2 lore raw

Hi Johannes,

Quoted 11 lines · Johannes Berg
Quoted 6 lines · Walter Lozano

Hi all,

I noticed that after "um: enable VMAP_STACK" [1] I experienced some occasional hung in my Gitlab CI jobs that use user-mode-linux to build distro images.

Did you actually *enable* VMAP_STACK in the config as well? The commit just makes it *possible* to enable it, you still have to set it yourself. So you should be able to easily check with/without that setting.

Thank you for your quick response. The Debian configuration on package user-mode-linux have these settings

CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y

as you can see in [1]. I did run some tests disabling those settings, which passed without any hung.

Unfortunately the "occasional" behavior makes this issue a bit tricky to debug.

Regards,

Walter

[1] https://salsa.debian.org/uml-team/user-mode-linux/-/blob/master/config.amd64#L321

Signature · 2 lines
Walter Lozano
Collabora Ltd.
maintainer
#3 lore raw
Quoted 6 lines · Walter Lozano

Thank you for your quick response. The Debian configuration on package user-mode-linux have these settings

CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y

OK, so it actually _is_ enabled.

Quoted 6 lines

as you can see in [1]. I did run some tests disabling those settings, which passed without any hung.

Unfortunately the "occasional" behavior makes this issue a bit tricky to debug.

Right.

Hm. I've been running our tests with it for about three months and haven't observed any hangs, but I guess that doesn't mean much.

To be honest, I have no particular reason to even want it, other than that it catches accidental DMA from stack more easily ... so I guess if we can't find anything, we might as well revert it.

Feels like it _should_ work though, since it's just a different location for the stack.

johannes

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um

#5 lore raw
In reply to Walter Lozano
Quoted 23 lines · Walter Lozano

Hi Johannes,

Quoted 11 lines · Johannes Berg
Quoted 6 lines · Walter Lozano

Hi all,

I noticed that after "um: enable VMAP_STACK" [1] I experienced some occasional hung in my Gitlab CI jobs that use user-mode-linux to build distro images.

Did you actually *enable* VMAP_STACK in the config as well? The commit just makes it *possible* to enable it, you still have to set it yourself. So you should be able to easily check with/without that setting.

Thank you for your quick response. The Debian configuration on package user-mode-linux have these settings

CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y

as you can see in [1]. I did run some tests disabling those settings, which passed without any hung.

Quoted 9 lines

Unfortunately the "occasional" behavior makes this issue a bit tricky to debug.

Regards,

Walter

[1] https://salsa.debian.org/uml-team/user-mode-linux/-/blob/master/config.amd64#L321

Just to narrow things down - 64 bit or 32 bit?

Signature · 7 lines
Anton R. Ivanov
https://www.kot-begemot.co.uk/

_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
#4 lore raw
In reply to Johannes Berg

Hi Johannes,

Quoted 11 lines · Johannes Berg
Quoted 5 lines · Walter Lozano

Thank you for your quick response. The Debian configuration on package user-mode-linux have these settings

CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y

OK, so it actually _is_ enabled.

Quoted 3 lines

as you can see in [1]. I did run some tests disabling those settings, which passed without any hung.

Quoted 7 lines
Quoted 3 lines

Unfortunately the "occasional" behavior makes this issue a bit tricky to debug.

Right.

Hm. I've been running our tests with it for about three months and haven't observed any hangs, but I guess that doesn't mean much.

The issue is very rare at least in my setup, I had to prepare a test environment to stress the system in order to be able to reproduce it more or less consistently. I will continue investigating and share any useful information.

Quoted 3 lines

To be honest, I have no particular reason to even want it, other than that it catches accidental DMA from stack more easily ... so I guess if we can't find anything, we might as well revert it.

I hope we will be able to find the root cause of the issue.

Quoted 2 lines

Feels like it _should_ work though, since it's just a different location for the stack.

I see. Thank you again for your quick reply, I will keep you updated.

Regards,

Walter

Signature · 8 lines
Walter Lozano
Collabora Ltd.


_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um
#6 lore raw
In reply to Anton Ivanov

Hi Anton,

Quoted 28 lines · Anton Ivanov
Quoted 27 lines · Walter Lozano

Hi Johannes,

Quoted 11 lines · Johannes Berg
Quoted 6 lines · Walter Lozano

Hi all,

I noticed that after "um: enable VMAP_STACK" [1] I experienced some occasional hung in my Gitlab CI jobs that use user-mode-linux to build distro images.

Did you actually *enable* VMAP_STACK in the config as well? The commit just makes it *possible* to enable it, you still have to set it yourself. So you should be able to easily check with/without that setting.

Thank you for your quick response. The Debian configuration on package user-mode-linux have these settings

CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y

as you can see in [1]. I did run some tests disabling those settings, which passed without any hung.

Unfortunately the "occasional" behavior makes this issue a bit tricky to debug.

Regards,

Quoted 8 lines
Quoted 5 lines

Walter

[1] https://salsa.debian.org/uml-team/user-mode-linux/-/blob/master/config.amd64#L321

Just to narrow things down - 64 bit or 32 bit?

Thank you for commenting on this thread. All my tests were done with 64 bits.

Regards,

Signature · 8 lines
Walter Lozano
Collabora Ltd.


_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um