Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4714 closed bug (fixed)

profile crashes with General Exception Fault 0x0

Reported by: dlmcpaul Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/Command Line Tools Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86


When I try to profile a media add-on with profile I get a General Exception Fault 0x0

The stacktrace is like this: profiling_do_sample arch_debug_get_stack_trace get_next_frame_no_debugger arch_cpu_user_memcpy+01e <-- Fault here

Looking at the parameters passed the src ptr either contains 0 or a value > 0xfffffff0

By placing a check in get_next_frame_no_debugger to return error for the values mentioned above I get profile data.

The arch_cpu_user_memcpy adds a fault handler to trap these sorts of errors but it does not seem to be working for me.

Tested on real hardware: Eee Box B202 Atom N270

To reproduce try profile /system/apps/MediaPlayer <video file>

Change History (5)

comment:1 by bonefish, 11 years ago

Couldn't reproduce with a small video under VMware and hrev33396. Please add a pointer to a file you can reproduce it with -- just to rule out that this is relevant. Also, a real stack trace -- like with all the numbers -- would be helpful (picture is fine, if readable).

comment:2 by dlmcpaul, 11 years ago

I have uploaded my test file to here

It is about 6Mb. The fault occurs a few seconds into the file.

I will try and get a better stacktrace

comment:3 by bonefish, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev33436.

comment:4 by bonefish, 11 years ago

An additional remark: I've checked why the user_memcpy() with the weird source address happens at all: Apparently the ffmpeg() code is frameless and reuses the ebp register for other purposes, which causes the profiling code to read invalid stack frames. This also means that you may or may not get much useful info out of the profile tool -- the top-level function should be found correctly at least.

comment:5 by dlmcpaul, 11 years ago

Ah that explains the funny functions that I see.

This is controlled by the ffmpeg config file (config.h) and the Jamfile.

Jamfile must have -fomit_frame_pointer #define HAVE_EBP_AVAILABLE 1

A few functions are optimised for having more registers but when profiling I can turn it off.

Note: See TracTickets for help on using tickets.