Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove multiline param for panic patterns and add more info in panic msg #3548

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lisa/features/serial_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

class SerialConsole(Feature):
panic_patterns: List[Pattern[str]] = [
re.compile(r"^(.*Kernel panic - not syncing:.*)$", re.MULTILINE),
re.compile(r"^(.*RIP:.*)$", re.MULTILINE),
re.compile(r"^(.*grub>.*)$", re.MULTILINE),
re.compile(r"^The operating system has halted.$", re.MULTILINE),
re.compile(r"^(.*Kernel panic - not syncing:.*)$"),
re.compile(r"^(.*RIP:.*)$"),
re.compile(r"^(.*grub>.*)$"),
re.compile(r"^The operating system has halted.$"),
# Synchronous Exception at 0x000000003FD04000
re.compile(r"^(.*Synchronous Exception at.*)$", re.MULTILINE),
re.compile(r"^(.*Synchronous Exception at.*)$"),
]

# ignore some return lines, which shouldn't be a panic line.
Expand Down
17 changes: 11 additions & 6 deletions lisa/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@


PANIC_PATTERNS: List[Pattern[str]] = [
re.compile(r"^(.*Kernel panic - not syncing:.*)$", re.MULTILINE),
re.compile(r"^(.*RIP:.*)$", re.MULTILINE),
re.compile(r"^(.*grub>.*)$", re.MULTILINE),
re.compile(r"^The operating system has halted.$", re.MULTILINE),
re.compile(r"^(.*Kernel panic - not syncing:.*)$"),
re.compile(r"^(.*RIP:.*)$"),
re.compile(r"^(.*grub>.*)$"),
re.compile(r"^The operating system has halted.$"),
# Synchronous Exception at 0x000000003FD04000
re.compile(r"^(.*Synchronous Exception at.*)$", re.MULTILINE),
re.compile(r"^(.*Synchronous Exception at.*)$"),
]

# ignore some return lines, which shouldn't be a panic line.
Expand Down Expand Up @@ -328,7 +328,12 @@ def __init__(
self.source = source

def __str__(self) -> str:
return f"{self.stage} found panic in {self.source}: {self.panics}"
return (
f"{self.stage} found panic in {self.source}. You can check the panic "
"details from the serial console log. Please download the test logs and "
"retrieve the serial_log from 'environments' directory, or you can ask "
f"support. Detected Panic phrases: {self.panics}"
)


class RequireUserPasswordException(LisaException):
Expand Down
Loading