Opened 5 years ago
Closed 5 days ago
#15251 closed bug (fixed)
KERN: PANIC: attempting to clone area "runtime_loader_seg1rw"
Reported by: | bbjimmy | Owned by: | nobody |
---|---|---|---|
Priority: | high | Milestone: | R1/beta6 |
Component: | Applications/Debugger | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
hrev 53368
Browsing the web
KERN: PANIC: attempting to clone area "runtime_loader_seg1rw"
the panic is continuable, but the system locks up after.
Attachments (1)
Change History (8)
by , 5 years ago
Attachment: | syslog.old added |
---|
comment:1 by , 5 years ago
Cc: | added |
---|---|
Component: | - General → System |
I already made a change to make the runtime_loader debug area cloneable; and this seems to have been more than enough in most cases here (most uses of Debugger seem to be just fine following the changes.) So the fact that the SymbolLookup is trying to clone the "runtime_loader_seg1rw" is strange to me. Shouldn't all the information it wants be in the debug area? What is it looking for in there, and why only in this case?
comment:2 by , 5 years ago
As best I can tell from what little information is available here, the instruction pointer it was asked to resolve a symbol for was in that area, hence the attempt to clone it. More than that I can't tell you without looking at a dump of that segment, which I'm not in a position to do right now.
comment:3 by , 3 years ago
This is still a problem, though now it becomes a "dprintf" instead of a KDL.
I guess Debugger needs a mechanism to clone areas that should not otherwise be cloneable.
comment:4 by , 7 weeks ago
Component: | System → Applications/Debugger |
---|---|
Owner: | changed from | to
The panic will be gone by now, but I don't think the debugger was ever adjusted to search for symbols differently in these particular cases.
comment:5 by , 7 weeks ago
Cc: | removed |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:6 by , 4 weeks ago
One possibility here is to change the behavior of the clone_area syscall when a debugger is installed, like so:
Team* targetTeam = thread_get_current_thread()->team; Team* sourceTeam = Team::GetAndLock(sourceAddressSpace->ID()); bool debuggerTeam = false; if (sourceTeam != NULL) { debuggerTeam = (sourceTeam->debug_info.debugger_team == targetTeam->id); sourceTeam->UnlockAndReleaseReference(); } if (!debuggerTeam) { #if KDEBUG dprintf("team \"%s\" (%" B_PRId32 ") attempted to clone area \"%s\" (%" B_PRId32 ")!\n", targetTeam->Name(), targetTeam->id, sourceArea->name, sourceID); #endif return B_NOT_ALLOWED; }
However, I don't think this is a good idea for multiple reasons. For one, the source will become B_SHARED_AREA, which probably is not what we want (though this could be mitigated). For another, having syscalls "magically" change behavior based on whether a debugger is installed doesn't sound like a good option to me. Instead the user debugger API should probably include a "clone area" message.
comment:7 by , 5 days ago
Milestone: | Unscheduled → R1/beta6 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in hrev58524.
syslog shows two such panics