Actions
Bug #783
closedgcc-built system panics loading pcbe.GenuineIntel.6
Start date:
2011-03-08
Due date:
% Done:
100%
Estimated time:
Difficulty:
Tags:
Gerrit CR:
External Bug:
Description
I'm not sure I can adequately describe this.
A system built with gcc (__GNUC="" in the environment, and #780 patched around), dies loading pcbe.GenuineIntel.6 (the i686 performance counter backend), when running in virtualbox.
All debugger interaction is retyped, and may contain typoes
[0]> ::status debugging live kernel (32-bit) on (not set) operating system: 5.11 illumos-gcc:2011-03-08 (i86pc) image uuid: (not set) CPU-specific support: Intel P6 family (Pentium Pro, Pentium II, Pentium III) DTrace state: inactive stopped on: debugger entry trap [0]> $<msgbuf ... panic[cpu0]/thread=fec22920: BAD TRAP: type=e (#pf Page fault) rp=fec3fd70 addr=20656553 occurred in module "unix" due to an illegal access to a user address #pf Page fault Bad kernel fault at addr=0x20656553 pid=0, pc=0xfe84d031, sp=0xf9397177, eflags=0x10206 cr0: 8005003b<pg,wp,ne,et,ts,mp,pe> cr4: 698<xmme,fxsr,pge,pse,de> cr2: 20656553 cr3: 2b2c000 gs: fea301b0 fs: d3620000 es: 65620160 ds: 646f0160 edi: fec3fe5c esi: 0 ebp: fec3fde8 esp: fec3fda8 ebx: f9399028 edx: 5a7 ecx: 80808000 eax: 20656553 trp: e err: 0 eip: fe84d031 cs: 158 efl: 10206 usp: f9397177 ss: 20656553 Warning - stack not written to the dumpbuf fec3fcbc unix:die+9b (e, fec3fd70, 206565) fec3fd5c unix:trap+592 (fec3fd70, 20656553,) fec3fde8 unix:_cmntrap+74 (fea301b0, d3620000,) fec3fde8 unix:strlen+31 (d680c100, f9397cd1,) fec3fdf8 pcbe.GenuineIntel.6:_init+b (d6a1dde8, 0, fec3fe) fec3fe08 genunix:modinstall+110 (d6a1dde8, 1, fea952) ... [0]> d680c100/K 0 @@
Updated by Rich Lowe about 12 years ago
This seems to be because of the lack of {NULL,NULL} terminating entry in _P6_generic_names. We walk right off the end.
Apparently when studio builds it, there's conveniently located zeroed memory.
See source:usr/src/uts/intel/pcbe/p123_pcbe.c#L587
Updated by Rich Lowe about 12 years ago
diff --git a/usr/src/uts/intel/pcbe/p123_pcbe.c b/usr/src/uts/intel/pcbe/p123_pc
index 0ccaab6..bd5cfb7 100644
--- a/usr/src/uts/intel/pcbe/p123_pcbe.c
+++ b/usr/src/uts/intel/pcbe/p123_pcbe.c
@@ -444,7 +444,8 @@ static const ptm_generic_event_t _P6_generic_names[] = {
{ "PAPI_fp_ins", "flops", 0x0 },
{ "PAPI_fp_ops", "flops", 0x0 },
{ "PAPI_fml_ins", "mul", 0x0 },
- { "PAPI_fdv_ins", "div", 0x0 }
+ { "PAPI_fdv_ins", "div", 0x0 },
+ CPC_GEN_END
};
static const ptm_generic_event_t *P6_generic_names[2] = {
Updated by Rich Lowe about 12 years ago
- Status changed from New to In Progress
- Assignee set to Rich Lowe
Updated by Rich Lowe about 12 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Resolved in r13301 commit:5f0d9ec296d9
Actions