Strange perfetto crash with enough memory available
Hi I generally hit this error when i do not have enough memory available, but I am seeing it even with a small 1.57 GB file. When it loads at peak capacity I still have around 8gb of memory left.
[122.331] trace_sorter_queue.h:44 PERFETTO_CHECK(mem_blocks_.size() == 1) (errno: 0, Undefined error: 0)
-----BEGIN PERFETTO PRE-CRASH LOG----- trace_uuid: 00000000-0000-0000-9992-8b745ad [122.331] trace_sorter_queue.h:44 PERFETTO_CHECK(mem_blocks_.size() == 1) (errno: 0, Undefined error: 0)
-----END PERFETTO PRE-CRASH LOG----- Illegal instruction
Is there any way to avoid this ?
If i understand correctly, this is happening because of the following in my perf.data file.
instruction trace error type 1 time 2511250.194562356 cpu 26 pid 12975 tid 13594 ip 0x7fbfa0be98b6 code 7: Overflow packet
Is there a way to avoid this check in perfetto ?
Actually no it happens even without that
perf script -i file.data --itrace=e Warning: Processed 850658 events and lost 52 chunks!
Check IO/CPU overload!
[615.259] trace_sorter_queue.h:44 PERFETTO_CHECK(mem_blocks_.size() == 1) (errno: 0, Undefined error: 0)
-----END PERFETTO PRE-CRASH LOG----- Illegal instruction
We are investigating this issue. It shouldn't have happened even for not sufficient memory.
On Fri, Jan 27, 2023 at 7:43 AM Rohan Aggarwal @.***> wrote:
Actually no it happens even without that
perf script -i file.data --itrace=e Warning: Processed 850658 events and lost 52 chunks!
Check IO/CPU overload!
[615.259] trace_sorter_queue.h:44 PERFETTO_CHECK(mem_blocks_.size() == 1) (errno: 0, Undefined error: 0)
-----END PERFETTO PRE-CRASH LOG----- Illegal instruction
— Reply to this email directly, view it on GitHub https://github.com/google/perfetto/issues/435#issuecomment-1406130884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ3CHTVBGMOFNPW4BRHRNW3WUN4ADANCNFSM6AAAAAAUIFMOMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
It would help us greatly if you would be able to upload the trace, in whatever way (email, drive).
Unfortunately I cannot upload the trace. While you guys investigate this, is there a way to bypass this error ?
We've managed to find a repro. I'm looking into sending a fix. For a bypass, try setting the environment variable TRACE_PROCESSOR_NO_MMAP=1 before running trace processor
[rohaagga-mac:~/Desktop] rohaagga% echo $SHELL /bin/csh [rohaagga-mac:~/Desktop] rohaagga% echo $TRACE_PROCESSOR_NO_MMAP 1 [rohaagga-mac:~/Desktop] rohaagga% ./trace_processor -D trace.fxt [039.792] trace_sorter_queue.h:44 PERFETTO_CHECK(mem_blocks_.size() == 1) (errno: 0, Undefined error: 0)
-----BEGIN PERFETTO PRE-CRASH LOG----- trace_uuid: 00000000-0000-0000-5672-22a9cd5 [039.792] trace_sorter_queue.h:44 PERFETTO_CHECK(mem_blocks_.size() == 1) (errno: 0, Undefined error: 0)
-----END PERFETTO PRE-CRASH LOG----- Illegal instruction [rohaagga-mac:~/Desktop] rohaagga%
Yeah was worth a shot but otherwise I think it's just a matter of waiting for the fix. I'll treat this as a P0 and get to this asap.
Small update - even on a 128 GB machine where the percentage used memory by trace processor was only 15 percent, the issue reproduces, as already mentioned by lalit in the thread.
@LalitMaganti Hi Lalit any update on this ? I am blocked by this for some important performance analysis expt. I would be really grateful if this could be fixed. Also on a side note, if the fix is small could you tell me what it is, I can do it locally and build myself for the time being.
The fix is not simple which is why it's not already landed.
If you're in a rush, you can patch https://r.android.com/2411705 (and the parent CL) which should fix the issue (I tested on a large multi-GB trace which failed previously and now works).
Hi @LalitMaganti Sorry to bother you again and again. Any ETA on the fix to be merged ? Thanks Rohan.
No ETA I can provide sorry.
Hi @LalitMaganti How have you been ? Has there been any update on this PR. I would be really grateful if we could get this functionality.
I haven't forgotten about this. Updates will be posted when available.
thank you
https://r.android.com/2424192 will fix this. Should land very soon.
awesome thanx....!