OS-4119: lxbrand panic when running native perl inside lx zone

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2015-03-27T22:09:44.000Z
Updated at:2021-01-03T14:14:13.208Z

People

Created by:Former user
Reported by:Former user
Assigned to:Former user

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2015-04-08T05:54:10.000Z)

Fix Versions

2015-04-16 Mars Climate Orbiter (Release Date: 2015-04-16)

Labels

lxbrand

Description

Panic in us-east3b while running:
/native/usr/sbin/chroot /native /usr/bin/arcstat

debugging crash dump vmcore.4 (64-bit) from 5DCS842
operating system: 5.11 joyent_20150326T192000Z (i86pc)
image uuid: (not set)
panic message: assertion failed: lwpd->br_ntv_stack != 0, file: ../../common/brand/lx/os/lx_brand.c, line: 444
dump content: kernel pages only
>
> ::stack
vpanic()
0xfffffffffba6f318()
lx_lwp_set_native_stack_current+0x41(fffff044188b1380, 80477a8)
lx_restorecontext+0xc0(fffff001f7cd4910)
restorecontext+0x53(fffff001f7cd4910)
getsetcontext32+0x27b(1, 8047300)
_sys_sysenter_post_swapgs+0x153()
>

I was able to replicate it later by simply running /native/usr/perl5/bin/perl.
It appears that the brand structures are not being stripped off the process when it's executed in EBA_NATIVE mode.

Collected from a running native perl in that manner:

> 0t3062::pid2proc | ::print proc_t __p_brand_data
__p_brand_data = {
    __p_brand_data.__brand_data = 0xffffff014a6fa510
    __p_brand_data.__exit_data = 0x4a6fa510
}
> 0t3062::pid2proc | ::print proc_t p_tlist->t_lwp->lwp_brand
p_tlist->t_lwp->lwp_brand = 0xffffff0150881e00

Comments

Comment by Former user
Created at 2015-04-03T17:23:39.000Z
Updated at 2015-04-03T17:27:33.000Z

@accountid:62561aa04f1d57006a24d403 describes this as a priority, as like many types of native fixes, the risk is higher and we're quickly marching towards a "GA" of lx-brand.


Comment by Former user
Created at 2015-04-08T05:50:54.000Z

illumos-joyent commit 94e5dec (branch master, by Patrick Mooney)

OS-4119 lxbrand panic when running native perl inside lx zone
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>


Comment by Jira Bot
Created at 2021-01-03T14:14:13.208Z

illumos-joyent commit ad472cc25e94c756bee73f18d46a715cc641f880 (branch master, by Dan McDonald)

OS-8258 OS-4119 forgot about java and shbin exec types (#349)

Actually authored by: Andy Fiddaman <omnios@citrus-it.co.uk>
Actually reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: Mike Zeller <mike.zeller@joyent.com>
Reviewed by: Brian Bennett <brian.bennett@joyent.com>
Approved by: Brian Bennett <brian.bennett@joyent.com>