Opened 10 years ago

Closed 7 years 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:
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 10 years ago.
Stacktrace
0001-kernel-pagecache-provided-buffers-are-not-always-in-.patch (2.4 KB ) - added by pdziepak 10 years ago.

Download all attachments as: .zip

Change History (10)

by xyzzy, 10 years ago

Attachment: stacktrace.txt added

Stacktrace

comment:1 by pdziepak, 10 years ago

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

comment:2 by pdziepak, 10 years ago

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 by pdziepak, 10 years ago

patch: 01

comment:4 by xyzzy, 10 years ago

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 by pdziepak, 10 years ago

Blocked By: 11281 added

comment:6 by pdziepak, 10 years ago

Resolution: fixed
Status: newclosed

Patch applied in hrev47905.

comment:7 by diver, 7 years ago

Resolution: fixed
Status: closedreopened

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

in reply to:  7 comment:8 by korli, 7 years ago

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.