Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#797 closed defect (fixed)

Kernel panic ia64 alternate_instruction_tlb_fault

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone: 0.9.2
Component: helenos/kernel/ia64 Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

While working on dynamic linking for ia64 I ran into a kernel panic (not having done any kernel changes)

######> Kernel panic on cpu0 due to a failed assertion: <######
alternate_instruction_tlb_fault() at arch/ia64/src/mm/tlb.c:488:
!is_kernel_fault(va)

CURRENT=0xe000000009ba0000: pe=0 thread=0xe000000009a9c8e0 task=0xe0000000099c0840 cpu=0xe000000004070010 as=0xe00000000406dbe8 magic=0xfacefeed
thread="uinit"
task="/app/dltest"
cpu0: halted

This can be reproduced on branch dlia64 of https://github.com/jxsvoboda/helenos

Steps to reproduce:

  • Clone the dlia64 branch of https://github.com/jxsvoboda/helenos
  • Build for ia64/ski, enabling "Build shared libraries" in the configuration
  • Boot the system using tool/ew.py and run 'dltest' command (and wait for some 10-30 seconds)

Change History (3)

comment:1 Changed 5 months ago by Jakub Jermář

The assert is wrong - any userspace code that jumps to an address above the userspace/kernel boundary will likely hit it. It should be checking if istate_from_uspace(), but then, the check in this function is also wrong. It needs to check whether istate→cr_ipsr.cpl == PL_USER and not rely on the address. I am working on this. You can safely remove the offending assert for now.

After removing the assert. dltest will crash and running kio will reveal the following:

(47) killed due to an exception at program counter 0xffffc58006150800.
ar.bsp=0xe00000000cfdc000        ar.bspstore=0x600000000000e000
ar.rnat=0x0        ar.rsc=0xf
ar.ifs=0x8000000000000000        ar.pfs=0xc000000000000000
cr.isr=0x100000000        cr.ipsr=0x1013080a6010
cr.iip=0xffffc58006150800, #0        (test/synch/semaphore2.o:sem)
cr.iipa=0x7fff00000026aba0        (unknown)
cr.ifa=0xffffc58006150800        (test/synch/semaphore2.o:sem)
Kill message: Page fault: 0xffffc58006150800.                                   

comment:2 Changed 5 months ago by Jakub Jermář

Resolution: fixed
Status: newclosed

Fixed in commit 180e132;

comment:3 Changed 5 months ago by Jakub Jermář

Milestone: 0.9.2
Note: See TracTickets for help on using tickets.