{"action":"created","issue":{"url":"https://api.github.com/repos/apitrace/apitrace/issues/407","labels_url":"https://api.github.com/repos/apitrace/apitrace/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/apitrace/apitrace/issues/407/comments","events_url":"https://api.github.com/repos/apitrace/apitrace/issues/407/events","html_url":"https://github.com/apitrace/apitrace/issues/407","id":123349102,"number":407,"title":"apitrace replay crashes in __memcpy_avx_unaligned","user":{"login":"kparal","id":755451,"avatar_url":"https://avatars.githubusercontent.com/u/755451?v=3","gravatar_id":"","url":"https://api.github.com/users/kparal","html_url":"https://github.com/kparal","followers_url":"https://api.github.com/users/kparal/followers","following_url":"https://api.github.com/users/kparal/following{/other_user}","gists_url":"https://api.github.com/users/kparal/gists{/gist_id}","starred_url":"https://api.github.com/users/kparal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kparal/subscriptions","organizations_url":"https://api.github.com/users/kparal/orgs","repos_url":"https://api.github.com/users/kparal/repos","events_url":"https://api.github.com/users/kparal/events{/privacy}","received_events_url":"https://api.github.com/users/kparal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/apitrace/apitrace/labels/Replaying","name":"Replaying","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-21T20:11:53Z","updated_at":"2015-12-21T23:08:55Z","closed_at":null,"body":"If I record an XCOM game trace and try to replay that, the replay consistently crashes early in the process (at random places, usually in about 30-60 seconds). I have tested this with several different XCOM traces. However, I could not reproduce that with different (simple, non-steam) games like extremetuxracer or 0ad.\r\n\r\nThe crash looks like this:\r\n```\r\n$ apitrace replay game.x86_64.trace\r\napitrace: warning: caught signal 11\r\n46593800: error: caught an unhandled exception\r\n/usr/bin/glretrace+0x26f19c\r\n/lib64/libpthread.so.0+0x109ef\r\n/lib64/libc.so.6+0x148c06\r\n/usr/lib64/dri/radeonsi_dri.so+0x35a8fe\r\n/usr/lib64/dri/radeonsi_dri.so+0x35c70a\r\n/usr/lib64/dri/radeonsi_dri.so+0x1dc8be\r\n/usr/lib64/dri/radeonsi_dri.so+0x1ae827\r\n/usr/lib64/dri/radeonsi_dri.so+0x1aeb33\r\n/usr/bin/glretrace+0xec864\r\n/usr/bin/glretrace+0x4ce36\r\n/usr/bin/glretrace+0x4d727\r\n/usr/bin/glretrace+0x4d991\r\n/lib64/libpthread.so.0+0x7609\r\n/lib64/libc.so.6: clone+0x6c\r\n?\r\napitrace: info: taking default action for signal 11\r\n```\r\n\r\nWhen I use gdb to connect to the `glretrace` process and wait until it crashes, I see this:\r\n```\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n[Switching to Thread 0x7ff73bfff700 (LWP 32420)]\r\n__memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:238\r\n238     rep movsb\r\n```\r\n\r\nThe full gdb backtrace is here:\r\n[gdb.backtrace.txt](https://github.com/apitrace/apitrace/files/68921/gdb.backtrace.txt)\r\n\r\nI'm not a developer, is this an apitrace bug, or maybe a compiler issue?\r\n\r\nI'm using today's version of apitrace (83032cb) on Fedora 23, compiled using [Fedora's spec file](http://pkgs.fedoraproject.org/cgit/apitrace.git/tree/apitrace.spec?h=f23).\r\nInstalled packages:\r\n```\r\napitrace-7.1.20151221.git83032cb-1.fc23.x86_64\r\nkernel-4.2.8-300.fc23.x86_64\r\nmesa-dri-drivers-11.0.6-1.20151122.fc23.x86_64\r\nxorg-x11-drv-ati-7.6.0-0.4.20150729git5510cd6.fc23.x86_64\r\nxorg-x11-server-Xorg-1.18.0-2.fc23.x86_64\r\nllvm-libs-3.7.0-1.fc23.x86_64\r\ngcc-c++-5.3.1-2.fc23.x86_64\r\nlibstdc++-5.3.1-2.fc23.x86_64\r\nglibc-2.22-6.fc23.x86_64\r\n```\r\nGraphics:\r\n```\r\n01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Curacao PRO [Radeon R7 370 / R9 270/370 OEM] [1002:6811]\r\nOpenGL renderer string: Gallium 0.4 on AMD PITCAIRN (DRM 2.43.0, LLVM 3.7.0)\r\nOpenGL core profile version string: 4.1 (Core Profile) Mesa 11.0.6 (git-2555e00)\r\nOpenGL core profile shading language version string: 4.10\r\nOpenGL version string: 3.0 Mesa 11.0.6 (git-2555e00)\r\nOpenGL shading language version string: 1.30\r\n```"},"comment":{"url":"https://api.github.com/repos/apitrace/apitrace/issues/comments/166452130","html_url":"https://github.com/apitrace/apitrace/issues/407#issuecomment-166452130","issue_url":"https://api.github.com/repos/apitrace/apitrace/issues/407","id":166452130,"user":{"login":"kparal","id":755451,"avatar_url":"https://avatars.githubusercontent.com/u/755451?v=3","gravatar_id":"","url":"https://api.github.com/users/kparal","html_url":"https://github.com/kparal","followers_url":"https://api.github.com/users/kparal/followers","following_url":"https://api.github.com/users/kparal/following{/other_user}","gists_url":"https://api.github.com/users/kparal/gists{/gist_id}","starred_url":"https://api.github.com/users/kparal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kparal/subscriptions","organizations_url":"https://api.github.com/users/kparal/orgs","repos_url":"https://api.github.com/users/kparal/repos","events_url":"https://api.github.com/users/kparal/events{/privacy}","received_events_url":"https://api.github.com/users/kparal/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T23:08:55Z","updated_at":"2015-12-21T23:08:55Z","body":"The trace is here (it's 1.5GB compressed):\r\nhttps://drive.google.com/file/d/0B0Opr_geiK5nWUMwVEhJVnZPR2s/view?usp=sharing\r\n\r\nPlease note that this trace is supposed to contain a gpu hang reproducer for the radeonsi driver:\r\nhttps://bugs.freedesktop.org/show_bug.cgi?id=80419#c73\r\nEventually I managed to get a gpu hang when replaying this trace (see the next comment), so it seems it does. But I can reproduce the same glretrace crash even in other XCOM traces which didn't contain a gpu hang during the recording. So I'm not sure how closely these two issues are related. There seems to be something very fishy in there, because both seem to point to `__memcpy_avx_unaligned`.\r\n\r\nI can record and upload a different trace file, if you prefer.\r\n\r\n> which call nos it crashes the most?\r\n\r\nThis is my first time using apitrace, please excuse my dumbness. If you refer to those numbers next to the crash, e.g.:\r\n```\r\n46593800: error: caught an unhandled exception\r\n```\r\nthen it crashes completely randomly. I have tried to run it a few times, and I received these numbers:\r\n```\r\n36098102\r\n6713619\r\n11560053\r\n13368473\r\n30363117\r\n8865026\r\n```\r\nI don't think there are ever two same numbers. Also, after I reported this, I managed to get 2 full replays which didn't crash at all (in my ~10 attempts before reporting this, it always crashed). So this seems to be very racy."}}