Opened 5 years ago

Closed 15 months ago

#11246 closed bug (fixed)

Assertion failure in new x86_64 user memory functions

Reported by: xyzzy Owned by: pdziepak
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: #11281 Blocking:
Has a Patch: yes Platform: x86-64

Description

With the new user memory functions added in hrev47860, I just got an assertion failure when shutting down. Stacktrace attached. Looks to be due to a nested call to user_access (user_strlcpy -> fault -> user_memcpy -> assert).

Attachments (2)

stacktrace.txt (8.3 KB) - added by xyzzy 5 years ago.
Stacktrace
0001-kernel-pagecache-provided-buffers-are-not-always-in-.patch (2.4 KB) - added by pdziepak 5 years ago.

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by xyzzy

Attachment: stacktrace.txt added

Stacktrace

comment:1 Changed 5 years ago by pdziepak

I don't think that this second user_memcpy() is really needed. I will look into it more closely later today.

comment:2 Changed 5 years ago by pdziepak

I didn't have much luck trying to reproduce this bug. Could you try the attached patch and see if it solves the problem?

comment:3 Changed 5 years ago by pdziepak

Has a Patch: set

comment:4 Changed 5 years ago by xyzzy

I only managed to hit the bug once. It happened when I shut down after trying to build Haiku under a VM with too little memory (the build process ran out of memory). I've just tried doing the same thing with the patch applied and it didn't crash this time. The patch looks correct to me at least, so I think it probably fixes this.

comment:5 Changed 5 years ago by pdziepak

Blocked By: 11281 added

comment:6 Changed 5 years ago by pdziepak

Resolution: fixed
Status: newclosed

Patch applied in hrev47905.

comment:7 Changed 15 months ago by diver

Resolution: fixed
Status: closedreopened

I get the same assertion failure in hrev51931 x86_64 by running profile -f -i100 Time.

comment:8 in reply to:  7 Changed 15 months ago by korli

Resolution: fixed
Status: reopenedclosed

Replying to diver:

I get the same assertion failure in hrev51931 x86_64 by running profile -f -i100 Time.

Please open a new bug report.

Note: See TracTickets for help on using tickets.